by -DHAVE_CONFIG_H.
* MODULES.html.sh (Support for building libraries and executables):
Add config-h.
* modules/config-h: New file.
* gnulib-tool (nl, sed_transform_lib_file): New vars.
(func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
the config-h module is used.
* m4/config-h.m4: New file.
2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
+ New config-h module, so that "make" output needn't be cluttered
+ by -DHAVE_CONFIG_H.
+ * MODULES.html.sh (Support for building libraries and executables):
+ Add config-h.
+ * modules/config-h: New file.
+ * gnulib-tool (nl, sed_transform_lib_file): New vars.
+ (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
+ the config-h module is used.
+
New configmake module, so that "make" output needn't be cluttered
by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
* MODULES.html.sh (Support for building libraries and executables):
func_echo "$element"
func_begin_table
+ func_module config-h
func_module configmake
func_module dummy
func_module elisp-comp
progname=$0
package=gnulib
-cvsdatestamp='$Date: 2006-08-24 13:48:29 $'
+cvsdatestamp='$Date: 2006-08-26 06:39:32 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
SORT=sort
fi
+nl='
+'
+
# func_usage
# outputs to stdout the --help usage message.
func_usage ()
done
fi
+ # Determine script to apply to imported library files.
+ sed_transform_lib_file=
+ case $nl$modules$nl in
+ *"${nl}config-h$nl"*)
+ # Assume config.h exists, and that -DHAVE_CONFIG_H is omitted.
+ sed_transform_lib_file=$sed_transform_lib_file'
+ s/^#ifdef[ ]*HAVE_CONFIG_H[ ]*$/#if 1/
+ ' ;;
+ esac
+ if test -n "$lgpl"; then
+ # Update license.
+ sed_transform_lib_file=$sed_transform_lib_file'
+ s/GNU General/GNU Lesser General/g
+ s/version 2\([ ,]\)/version 2.1\1/g
+ '
+ fi
+
# Determine final file list.
func_modules_to_filelist
echo "File list:"
func_dest_tmpfilename "$g"
func_lookup_file "$f"
cp "$lookedup_file" "$tmpfile" || func_fatal_error "failed"
- if test -n "$lgpl"; then
- # Update license.
+ if test -n "sed_transform_lib_file"; then
case "$f" in
lib/*)
- sed -e 's/GNU General/GNU Lesser General/g' \
- -e 's/version 2\([ ,]\)/version 2.1\1/g' \
+ sed -e "$sed_transform_lib_file" \
< "$lookedup_file" > "$tmpfile" || func_fatal_error "failed"
;;
esac
+2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config-h.m4: New file.
+
2006-08-23 Bruno Haible <bruno@clisp.org>
* fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
--- /dev/null
+# Say that -DHAVE_CONFIG_H is not needed.
+
+dnl Copyright (C) 2006 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.
+
+dnl Written by Paul Eggert.
+
+# This package's source files all include config.h unconditionally,
+# so there's no need to pass -DHAVE_CONFIG_H to the compiler.
+AC_DEFUN([gl_CONFIG_H],
+ [AC_CONFIG_COMMANDS_PRE([test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=])])
--- /dev/null
+Description:
+Assume config.h exists, to avoid -DHAVE_CONFIG_H clutter in 'make' output.
+
+Files:
+m4/config-h.m4
+
+Depends-on:
+
+configure.ac:
+gl_CONFIG_H
+
+Makefile.am:
+
+Include:
+
+License:
+LGPL
+
+Maintainer:
+Paul Eggert, Jim Meyering