Hello,
in project libgsf, I noticed the following:
AH_TEMPLATE([S_ISREG], [Define S_ISREG if stat.h doesn't])
AC_DEFINE([S_ISREG(m)], [(((m) & S_IFMT) == S_IFREG)])
This is a workaround for the following bug:
With mere
AC_DEFINE([S_ISREG(m)], [(((m) & S_IFMT) == S_IFREG)],
[Define S_ISREG if stat.h doesn't])
the generated template file contains
#undef S_ISREG(m)
which config status is not able to parse.
Attached please find a proposed patch. OK to commit?
Have a nice day,
Stepan Kasal
2005-08-12 Stepan Kasal <[EMAIL PROTECTED]>
* lib/autoconf/general.m4 (_AC_DEFINE_Q): Strip the parameter list
before passing the macro name to AH_TEMPLATE.
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.879
diff -u -r1.879 general.m4
--- lib/autoconf/general.m4 25 Jul 2005 18:10:25 -0000 1.879
+++ lib/autoconf/general.m4 12 Aug 2005 10:47:30 -0000
@@ -1930,7 +1930,7 @@
# -----------------------------------------------------
m4_define([_AC_DEFINE_Q],
[AC_DEFINE_TRACE([$2])dnl
-m4_ifval([$4], [AH_TEMPLATE([$2], [$4])])dnl
+m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl
cat >>confdefs.h <<$1_ACEOF
[EMAIL PROTECTED]:@define] $2 m4_if($#, 2, 1, [$3])
_ACEOF