diff --git a/acgeneral.m4 b/acgeneral.m4 index 10006029..9c359eef 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1534,14 +1534,14 @@ dnl AC_OUTPUT_MAKE_DEFS() define(AC_OUTPUT_MAKE_DEFS, [# Transform confdefs.h into DEFS. dnl Using a here document instead of a string reduces the quoting nightmare. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. cat > conftest.defs <<\EOF changequote(<<, >>)dnl s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g -# Protect against shell expansion while executing Makefile rules. s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g -# Protect against Makefile macro expansion. s%\$%$$%g changequote([, ])dnl EOF diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 10006029..9c359eef 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1534,14 +1534,14 @@ dnl AC_OUTPUT_MAKE_DEFS() define(AC_OUTPUT_MAKE_DEFS, [# Transform confdefs.h into DEFS. dnl Using a here document instead of a string reduces the quoting nightmare. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. cat > conftest.defs <<\EOF changequote(<<, >>)dnl s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g -# Protect against shell expansion while executing Makefile rules. s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g -# Protect against Makefile macro expansion. s%\$%$$%g changequote([, ])dnl EOF