build: Fix Gnulib compilation when $builddir != $srcdir.
authorLudovic Courtès <ludo@gnu.org>
Wed, 12 Mar 2014 13:24:11 +0000 (14:24 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 12 Mar 2014 13:24:54 +0000 (14:24 +0100)
* configure.ac: Add -I$top_srcdir_absolute to 'CPPFLAGS'.  Fixes
  out-of-source-tree compilation of lib/regex.c.  Reported at
  <https://lists.gnu.org/archive/html/guile-devel/2014-03/msg00022.html>.

configure.ac

index 947296b..3969929 100644 (file)
@@ -1636,6 +1636,9 @@ AC_SUBST(top_builddir_absolute)
 top_srcdir_absolute=`(cd $srcdir && pwd)`
 AC_SUBST(top_srcdir_absolute)
 
+dnl Add -I flag so that lib/glthread/lock.h finds <libguile/threads.h>.
+CPPFLAGS="-I$top_srcdir_absolute $CPPFLAGS"
+
 dnl `sitedir' goes into libpath.h and the pkg-config file.
 pkgdatadir="$datadir/$PACKAGE_TARNAME"
 sitedir="$pkgdatadir/site/$GUILE_EFFECTIVE_VERSION"