From: Akim Demaille Date: Tue, 30 Jan 2001 19:29:38 +0000 (+0000) Subject: The recent addition of `exit's prototype in confdefs.h causes X-Git-Tag: autoconf-2.50~170 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b8d698ca1da3e7e6ffbeffb650a3d3e3b3f2885c;p=thirdparty%2Fautoconf.git The recent addition of `exit's prototype in confdefs.h causes AC_OUTPUT_MAKE_DEFS to include junky -D switches. Reported by Wolfgang Mueller. * tests/torture.at (#define header templates): Include trash in confdefs.h. * tests/atgeneral.at (AT_INIT): Don't expect `find' to support -maxdepth, hence don't use -follow either. Reported by Nicolas Joly. * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) : In the `quote' section, `p'rint the result. If neither `#define' pattern match, just call `d' to start a new cycle. Call this sed program with -n. --- diff --git a/ChangeLog b/ChangeLog index 726bc95f6..783a43d30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2001-01-30 Akim Demaille + + The recent addition of `exit's prototype in confdefs.h causes + AC_OUTPUT_MAKE_DEFS to include junky -D switches. + Reported by Wolfgang Mueller. + + * tests/torture.at (#define header templates): Include trash in + confdefs.h. + * tests/atgeneral.at (AT_INIT): Don't expect `find' to support + -maxdepth, hence don't use -follow either. + Reported by Nicolas Joly. + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) : In the + `quote' section, `p'rint the result. + If neither `#define' pattern match, just call `d' to start a new + cycle. + Call this sed program with -n. + 2001-01-30 Akim Demaille * tests/compile.at: New test. diff --git a/THANKS b/THANKS index e52e6600a..818bb9798 100644 --- a/THANKS +++ b/THANKS @@ -146,6 +146,7 @@ Tony Leneis tony@plaza.ds.adp.com Viktor Dukhovni viktor@anaheim.esm.com Volker Borchert bt@teknon.de Wilfredo Sanchez wsanchez@apple.com +Wolfgang Mueller Wolfgang.Mueller@cui.unige.ch Many people are not named here because we lost track of them. We thank them! Please, help us keeping this list up to date. diff --git a/acgeneral.m4 b/acgeneral.m4 index 6ad38f199..307fa1869 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -3787,11 +3787,14 @@ t clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g +p EOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing @@ -3800,7 +3803,7 @@ EOF # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ]])# AC_OUTPUT_MAKE_DEFS diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 0fb5ab796..7682ed2e1 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6274,6 +6274,12 @@ simple work around consists in testing @command{expr} and use a variable set to @command{expr} or to @command{false} according to the result. +@item @command{find} +@c ----------------- +The option @option{-maxdepth} seems to be GNU specific. Tru64 v5.1, +NetBSD 1.5 and Solaris 2.5 @command{find} commands do not understand it. + + @item @command{grep} @c ----------------- @cindex @command{grep} diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 6ad38f199..307fa1869 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -3787,11 +3787,14 @@ t clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +t quote +d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g +p EOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing @@ -3800,7 +3803,7 @@ EOF # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` +DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ]])# AC_OUTPUT_MAKE_DEFS diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 9f0eae7bd..2de4d118f 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -290,7 +290,7 @@ elif test $at_debug = false; then # Try to find a few ChangeLogs in case it might help determining the # exact version. - find "$at_top_srcdir" -follow -maxdepth 3 -name ChangeLog \ + find "$at_top_srcdir" -name ChangeLog \ -exec echo {} : ';' \ -exec sed 's/^/| /;10q' {} ';' \ -exec echo ';' diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index 9f0eae7bd..2de4d118f 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -290,7 +290,7 @@ elif test $at_debug = false; then # Try to find a few ChangeLogs in case it might help determining the # exact version. - find "$at_top_srcdir" -follow -maxdepth 3 -name ChangeLog \ + find "$at_top_srcdir" -name ChangeLog \ -exec echo {} : ';' \ -exec sed 's/^/| /;10q' {} ';' \ -exec echo ';' diff --git a/tests/torture.at b/tests/torture.at index 07e49b786..8cca32605 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -133,16 +133,28 @@ AT_SETUP([#define header templates]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) + # I18n of dummy variables: their French translations. AC_DEFINE(foo, toto) AC_DEFINE(bar, tata) AC_DEFINE(baz, titi) AC_DEFINE(fubar, tutu) + # Symbols which are prefixes of another. AC_DEFINE(a, A) AC_DEFINE(aaa, AAA) AC_DEFINE(aa, AA) AC_CONFIG_FILES(defs) + +# Things included in confdefs.h, but which make no sense in +# config.h, nor in $DEFS. +cat <<\EOF >>confdefs.h +/* Hi Mum! Look, I'm doing C++! */ +#ifdef __cplusplus +void exit (int status); +#endif +EOF + # In addition of config.h output a full DEFS AC_OUTPUT_MAKE_DEFS DEFS_SAVED=$DEFS @@ -187,7 +199,7 @@ AT_CHECK([cat config.h], 0, expout) # Check the value of DEFS. Note the leading space. AT_DATA([expout], -[[ -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA] +[[-Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA] ]) # Because we strip trailing spaces in `testsuite' we can't leave one in