# HG changeset patch # User Bruno Haible # Date 1155036922 0 # Node ID dfc92f94c781357ba5aab63d7001ba0306ad5de7 # Parent 537f18903d33948eabeb04054f7531240cfa2e04 Allow AC_REQUIREs in the configure.ac snippet. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-07 Bruno Haible + + * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets + in an AC_DEFUN. Needed so that the autoconf snippets can use + AC_REQUIRE. + 2006-08-06 Ralf Wildenhues * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): diff --git a/gnulib-tool b/gnulib-tool --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-08-07 12:17:26 $' +cvsdatestamp='$Date: 2006-08-08 11:35:22 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` @@ -1800,6 +1800,14 @@ else echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [false])" fi + # Wrap the set of autoconf snippets into an autoconf macro that is then + # invoked. This is needed because autoconf does not support AC_REQUIRE + # at the top level: + # error: AC_REQUIRE(gt_CSHARPCOMP): cannot be used outside of an AC_DEFUN'd macro + # but we want the AC_REQUIRE to have its normal meaning (provide one + # expansion of the required macro before the current point, and only one + # expansion total). + echo "AC_DEFUN([gl_INIT], [" if test "$auxdir" != "build-aux"; then sed_replace_build_aux=' :a @@ -1828,6 +1836,8 @@ | sed -e "$sed_replace_build_aux" fi done + echo "])" + echo "gl_INIT" echo # Usually tests/config.h will be a superset of config.h. Verify this by # "merging" config.h into tests/config.h; look out for gcc warnings. @@ -1881,6 +1891,14 @@ else echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [false])" fi + # Wrap the set of autoconf snippets into an autoconf macro that is then + # invoked. This is needed because autoconf does not support AC_REQUIRE + # at the top level: + # error: AC_REQUIRE(gt_CSHARPCOMP): cannot be used outside of an AC_DEFUN'd macro + # but we want the AC_REQUIRE to have its normal meaning (provide one + # expansion of the required macro before the current point, and only one + # expansion total). + echo "AC_DEFUN([gl_INIT], [" if test "$auxdir" != "build-aux"; then sed_replace_build_aux=' :a @@ -1899,6 +1917,8 @@ | sed -e "$sed_replace_build_aux" fi done + echo "])" + echo "gl_INIT" echo if test -n "$subdirs_with_configure_ac"; then echo "AC_CONFIG_SUBDIRS(["`echo $subdirs_with_configure_ac`"])"