New module description section 'configure.ac-early'.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Feb 2007 19:09:25 +0000 (19:09 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Feb 2007 19:09:25 +0000 (19:09 +0000)
ChangeLog
gnulib-tool
modules/extensions
modules/lock

index 0d489e7..454adff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2007-02-04  Bruno Haible  <bruno@clisp.org>
 
 2007-02-04  Bruno Haible  <bruno@clisp.org>
 
+       New module description section 'configure.ac-early'.
+       * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
+       (func_get_autoconf_early_snippet): New function.
+       (func_import, func_create_testdir): Use it. Remove special cases for
+       modules 'extensions' and 'lock'.
+
+2007-02-04  Bruno Haible  <bruno@clisp.org>
+
        Make use of gcj-4.3's -fsource and -ftarget option.
        * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
        and if so try the options -fsource and -ftarget.
        Make use of gcj-4.3's -fsource and -ftarget option.
        * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
        and if so try the options -fsource and -ftarget.
index 0046ff5..559a25e 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2007-02-01 01:52:34 $'
+cvsdatestamp='$Date: 2007-02-04 19:09:25 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -890,6 +890,7 @@ sed_extract_prog=':[         ]*$/ {
     s/^Description:[    ]*$//
     s/^Files:[  ]*$//
     s/^Depends-on:[     ]*$//
     s/^Description:[    ]*$//
     s/^Files:[  ]*$//
     s/^Depends-on:[     ]*$//
+    s/^configure\.ac-early:[    ]*$//
     s/^configure\.ac:[  ]*$//
     s/^Makefile\.am:[   ]*$//
     s/^Include:[        ]*$//
     s/^configure\.ac:[  ]*$//
     s/^Makefile\.am:[   ]*$//
     s/^Include:[        ]*$//
@@ -939,6 +940,15 @@ func_get_dependencies ()
   sed -n -e "/^Depends-on$sed_extract_prog" < "$lookedup_file"
 }
 
   sed -n -e "/^Depends-on$sed_extract_prog" < "$lookedup_file"
 }
 
+# func_get_autoconf_early_snippet module
+# Input:
+# - local_gnulib_dir  from --local-dir
+func_get_autoconf_early_snippet ()
+{
+  func_lookup_file "modules/$1"
+  sed -n -e "/^configure\.ac-early$sed_extract_prog" < "$lookedup_file"
+}
+
 # func_get_autoconf_snippet module
 # Input:
 # - local_gnulib_dir  from --local-dir
 # func_get_autoconf_snippet module
 # Input:
 # - local_gnulib_dir  from --local-dir
@@ -2107,12 +2117,13 @@ func_import ()
     if grep AC_GNU_SOURCE "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then
       echo "  AC_REQUIRE([AC_GNU_SOURCE])"
     fi
     if grep AC_GNU_SOURCE "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then
       echo "  AC_REQUIRE([AC_GNU_SOURCE])"
     fi
-    if grep gl_USE_SYSTEM_EXTENSIONS "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then
-      echo "  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])"
-    fi
-    if grep gl_LOCK "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then
-      echo "  AC_REQUIRE([gl_LOCK_EARLY])"
-    fi
+    for module in $modules; do
+      func_verify_module
+      if test -n "$module"; then
+        func_get_autoconf_early_snippet "$module"
+      fi
+    done \
+      | sed -e '/^$/d;' -e 's/^/  /'
     echo "])"
     echo
     echo "# This macro should be invoked from $configure_ac, in the section"
     echo "])"
     echo
     echo "# This macro should be invoked from $configure_ac, in the section"
@@ -2478,14 +2489,13 @@ func_create_testdir ()
        echo "AC_GNU_SOURCE"
        echo
      fi
        echo "AC_GNU_SOURCE"
        echo
      fi
-     if grep gl_USE_SYSTEM_EXTENSIONS "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then
-       echo "gl_USE_SYSTEM_EXTENSIONS"
-       echo
-     fi
-     if grep gl_LOCK "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then
-       echo "gl_LOCK_EARLY"
-       echo
-     fi
+     for module in $modules; do
+       func_verify_module
+       if test -n "$module"; then
+         func_get_autoconf_early_snippet "$module"
+       fi
+     done \
+       | sed -e '/^$/d;' -e 's/AC_REQUIRE(\[\([^()]*\)\])/\1/'
      if test "$libtool" = true; then
        echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
        echo "gl_cond_libtool=true"
      if test "$libtool" = true; then
        echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
        echo "gl_cond_libtool=true"
@@ -2598,14 +2608,13 @@ func_create_testdir ()
      echo "AC_GNU_SOURCE"
      echo
    fi
      echo "AC_GNU_SOURCE"
      echo
    fi
-   if grep gl_USE_SYSTEM_EXTENSIONS "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then
-     echo "gl_USE_SYSTEM_EXTENSIONS"
-     echo
-   fi
-   if grep gl_LOCK "$testdir/$m4base"/*.m4 >/dev/null 2>/dev/null; then
-     echo "gl_LOCK_EARLY"
-     echo
-   fi
+   for module in $modules; do
+     func_verify_nontests_module
+     if test -n "$module"; then
+       func_get_autoconf_early_snippet "$module"
+     fi
+   done \
+     | sed -e '/^$/d;' -e 's/AC_REQUIRE(\[\([^()]*\)\])/\1/'
    if test "$libtool" = true; then
      echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
      echo "gl_cond_libtool=true"
    if test "$libtool" = true; then
      echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
      echo "gl_cond_libtool=true"
index a76790f..0167901 100644 (file)
@@ -6,8 +6,10 @@ m4/extensions.m4
 
 Depends-on:
 
 
 Depends-on:
 
+configure.ac-early:
+AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
 configure.ac:
 configure.ac:
-dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
 
 Makefile.am:
 
 
 Makefile.am:
 
index 6d4a287..45d8f60 100644 (file)
@@ -10,6 +10,9 @@ build-aux/config.rpath
 Depends-on:
 havelib
 
 Depends-on:
 havelib
 
+configure.ac-early:
+AC_REQUIRE([gl_LOCK_EARLY])
+
 configure.ac:
 gl_LOCK
 
 configure.ac:
 gl_LOCK