Back from an automatic module-indicator macro to a module-indicator macro
authorBruno Haible <bruno@clisp.org>
Mon, 8 Jan 2007 19:20:07 +0000 (19:20 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Jan 2007 19:20:07 +0000 (19:20 +0000)
that needs to be invoked explicitly.

ChangeLog
gnulib-tool
m4/gnulib-common.m4 [new file with mode: 0644]

index 4947817..12c57ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-01-08  Bruno Haible  <bruno@clisp.org>
 
+       * m4/gnulib-common.m4: New file.
+       * gnulib-tool (func_get_autoconf_snippet): Undo last change.
+       (func_get_filelist): Add m4/gnulib-common.m4.
+
+2007-01-08  Bruno Haible  <bruno@clisp.org>
+
        * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
        command.
 
 
 2007-01-01  Bruno Haible  <bruno@clisp.org>
 
+       * gnulib-tool (func_emit_copyright_notice): Bump year.
+       (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
+
+2007-01-01  Bruno Haible  <bruno@clisp.org>
+
        Improve support for OpenBSD.
        * build-aux/config.rpath (libname_spec): Export.
        (library_names_spec): New variable. Export.
index 2bd2874..7b1d9ce 100755 (executable)
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2007-01-04 18:10:42 $'
+cvsdatestamp='$Date: 2007-01-08 19:20:07 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 nl='
@@ -908,6 +908,7 @@ func_get_filelist ()
 {
   func_lookup_file "modules/$1"
   sed -n -e "/^Files$sed_extract_prog" < "$lookedup_file"
+  echo m4/gnulib-common.m4
   case "$autoconf_minversion" in
     2.59)
       #echo m4/onceonly.m4
@@ -935,9 +936,6 @@ func_get_autoconf_snippet ()
 {
   func_lookup_file "modules/$1"
   sed -n -e "/^configure\.ac$sed_extract_prog" < "$lookedup_file"
-  # Define a C macro indicating the presence of the given module.
-  echo "  AC_DEFINE([GNULIB_"`echo "$1" | LC_ALL=C tr 'a-z' 'A-Z' | sed -e 's,[-./],_,g'`"], [1],"
-  echo "    [Define to 1 when using the gnulib module $1.])"
 }
 
 # func_get_automake_snippet module
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
new file mode 100644 (file)
index 0000000..be4cb33
--- /dev/null
@@ -0,0 +1,13 @@
+# gnulib-common.m4 serial 1
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module.
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+  AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+    [Define to 1 when using the gnulib module ]$1[.])
+])