Link the include dir into out-of-tree build dirs
authorRon <ron@debian.org>
Tue, 18 Sep 2012 22:26:17 +0000 (07:56 +0930)
committerRalph Giles <giles@mozilla.com>
Tue, 18 Sep 2012 23:03:56 +0000 (16:03 -0700)
Mostly this is for people building other things using an uninstalled
opus tree so that the opus-uninstalled.pc will return a working -I
with --cflags when PKG_CONFIG_PATH is set to point to the build dir.

The version of AC_OUTPUT that takes parameters has long been
deprecated now, and replaced by AC_CONFIG_* macros, so pass them
with AC_CONFIG_FILES, since we're now using AC_CONFIG_COMMANDS
to do the above.

configure.ac

index 475449f..5b0c296 100644 (file)
@@ -291,8 +291,18 @@ fi
 AC_SUBST([PC_BUILD])
 AC_SUBST([PC_LIBM])
 
-AC_OUTPUT([Makefile opus.pc opus-uninstalled.pc
-           doc/Makefile doc/Doxyfile])
+
+AC_CONFIG_COMMANDS([builddir-include],
+                   [ if test ! -e include; then
+                        $LN_S $ac_top_srcdir/include include
+                     fi
+                   ],[ LN_S="$LN_S" ]
+                  )
+
+AC_CONFIG_FILES([Makefile opus.pc opus-uninstalled.pc
+                 doc/Makefile doc/Doxyfile])
+
+AC_OUTPUT
 
 AC_MSG_RESULT([
 ------------------------------------------------------------------------