# HG changeset patch # User Bruno Haible # Date 1167771551 0 # Node ID c9ae009bb4e7859e85bd20a9e500bfa1996dd605 # Parent 15d36d1dc32d6b2ee63ff0a8a4384ebd5eae6e11 Indicate the presence of gnulib modules through C macros. diff --git a/gnulib-tool b/gnulib-tool --- 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 @@ # 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_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