From: Bruno Haible Date: Tue, 2 Jan 2007 20:59:11 +0000 (+0000) Subject: Indicate the presence of gnulib modules through C macros. X-Git-Tag: cvs-readonly~1447 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=b0410f1d26da0e9ce5f4f645e3d1fd6d90a709d7;p=gnulib.git Indicate the presence of gnulib modules through C macros. --- diff --git a/gnulib-tool b/gnulib-tool index 6c7f50b4f..5985810e4 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1,6 +1,6 @@ #! /bin/sh # -# Copyright (C) 2002-2006 Free Software Foundation, Inc. +# Copyright (C) 2002-2007 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-12-31 06:29:50 $' +cvsdatestamp='$Date: 2007-01-02 20:59:11 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` nl=' @@ -185,7 +185,7 @@ Written by" "Bruno Haible" "and" "Simon Josefsson" # outputs to stdout a header for a generated file. func_emit_copyright_notice () { - echo "# Copyright (C) 2004-2006 Free Software Foundation, Inc." + echo "# Copyright (C) 2004-2007 Free Software Foundation, Inc." echo "#" echo "# This file is free software, distributed under the terms of the GNU" echo "# General Public License. As a special exception to the GNU General" @@ -935,6 +935,9 @@ 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