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) <confdef2opt.sed>: 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 <akim@epita.fr>
+
+ 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) <confdef2opt.sed>: 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 <akim@epita.fr>
* tests/compile.at: New test.
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.
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
# 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
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}
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
# 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
# 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 ';'
# 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 ';'
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
# 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