bug-gnulib
[Top][All Lists]
Advanced

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

new module description field 'configure.ac-early'


From: Bruno Haible
Subject: new module description field 'configure.ac-early'
Date: Sun, 4 Feb 2007 20:13:55 +0100
User-agent: KMail/1.5.4

Hi,

There's more than one module which needs some autoconf macros to be executed
"early". I'm generalizing the two existing special cases into a generic
handling of a 'configure.ac-early' section.

2007-02-04  Bruno Haible  <address@hidden>

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

*** gnulib-tool 1 Feb 2007 01:52:34 -0000       1.220
--- gnulib-tool 4 Feb 2007 19:01:26 -0000
***************
*** 890,895 ****
--- 890,896 ----
      s/^Description:[   ]*$//
      s/^Files:[         ]*$//
      s/^Depends-on:[    ]*$//
+     s/^configure\.ac-early:[   ]*$//
      s/^configure\.ac:[         ]*$//
      s/^Makefile\.am:[  ]*$//
      s/^Include:[       ]*$//
***************
*** 939,944 ****
--- 940,954 ----
    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
***************
*** 2107,2118 ****
      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
      echo "])"
      echo
      echo "# This macro should be invoked from $configure_ac, in the section"
--- 2117,2129 ----
      if grep AC_GNU_SOURCE "$destdir"/$m4base/*.m4 >/dev/null 2>/dev/null; then
        echo "  AC_REQUIRE([AC_GNU_SOURCE])"
      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"
***************
*** 2478,2491 ****
         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
       if test "$libtool" = true; then
         echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
         echo "gl_cond_libtool=true"
--- 2489,2501 ----
         echo "AC_GNU_SOURCE"
         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"
***************
*** 2598,2611 ****
       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
     if test "$libtool" = true; then
       echo "AM_CONDITIONAL([GL_COND_LIBTOOL], [true])"
       echo "gl_cond_libtool=true"
--- 2608,2620 ----
       echo "AC_GNU_SOURCE"
       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"
*** modules/extensions  9 May 2005 19:45:20 -0000       1.4
--- modules/extensions  4 Feb 2007 19:01:26 -0000
***************
*** 6,13 ****
  
  Depends-on:
  
  configure.ac:
- dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
  
  Makefile.am:
  
--- 6,15 ----
  
  Depends-on:
  
+ configure.ac-early:
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ 
  configure.ac:
  
  Makefile.am:
  
*** modules/lock        1 Feb 2007 01:52:34 -0000       1.3
--- modules/lock        4 Feb 2007 19:01:26 -0000
***************
*** 10,15 ****
--- 10,18 ----
  Depends-on:
  havelib
  
+ configure.ac-early:
+ AC_REQUIRE([gl_LOCK_EARLY])
+ 
  configure.ac:
  gl_LOCK
  





reply via email to

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