bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change macro of modules csharpexec, javaexec, javacomp-script


From: Bruno Haible
Subject: Re: change macro of modules csharpexec, javaexec, javacomp-script
Date: Tue, 8 Aug 2006 15:10:13 +0200
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> > --- 9,15 ----
> >   Depends-on:
> >   
> >   configure.ac:
> > ! AC_REQUIRE([gt_CSHARPCOMP])
> >   AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in])
> >   
> >   Makefile.am:
> 
> Doesn't this possibly end up in configure.ac outside of any macro
> definition?  You can use AC_REQUIRE only inside macros, otherwise
> it will always cause an error:
> | configure.ac:4: error: AC_REQUIRE(foo): cannot be used outside of an 
> AC_DEFUN'd macro

Indeed, "gnulib-tool --create-testdir" creates a configure.ac directly.
I'm changing it to allow AC_REQUIREs. But IMO the autoconf maintainers should
consider allowing AC_REQUIREs outside of functions (and in that case, the
inserted expansions should go into the current point).


2006-08-07  Bruno Haible  <address@hidden>

        * 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.

*** gnulib-tool.bak     2006-08-07 14:17:26.000000000 +0200
--- gnulib-tool 2006-08-08 02:35:48.000000000 +0200
***************
*** 1800,1805 ****
--- 1800,1813 ----
       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,1833 ****
--- 1836,1843 ----
             | 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,1886 ****
--- 1891,1904 ----
     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,1904 ****
--- 1917,1924 ----
           | 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`"])"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]