ref: c40d5004dd7211d836ac89862f29342668a4d88f
parent: bdf0abc08f5582a809358ddd9cd42768bb8845e5
author: Ron <[email protected]>
date: Wed Sep 19 03:56:17 EDT 2012
Link the include dir into out-of-tree build dirs 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.
--- a/configure.ac
+++ b/configure.ac
@@ -291,8 +291,18 @@
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([
------------------------------------------------------------------------