From: Akim Demaille Date: Tue, 5 Oct 1999 09:03:05 +0000 (+0000) Subject: 1999-10-05 Akim Demaille X-Git-Tag: exp-dead-end~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7837bd5f25998f054b782bc96d7daaf4979bcc6c;p=thirdparty%2Fautoconf.git 1999-10-05 Akim Demaille The sed quoting script depends on the shape of the commands used by AC_SUBST. The latter was changed, but not the former. Bug triggered with FOO='%\c' AC_SUBST(FOO). * acgeneral.m4 (AC_OUTPUT_FILES): Fix the sed quoting script. --- diff --git a/ChangeLog b/ChangeLog index aa69cb5c..0f5ff15d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,16 @@ +1999-10-05 Akim Demaille + + The sed quoting script depends on the shape of the commands used + by AC_SUBST. The latter was changed, but not the former. + Bug triggered with FOO='%\c' AC_SUBST(FOO). + + * acgeneral.m4 (AC_OUTPUT_FILES): Fix the sed quoting script. + 1999-10-05 Akim Demaille When you rely on the `t' flag of sed for the immediately preceding substitution, use a combination of `: foo; t foo'. + Bug triggered if you AC_DEFINE(FOO, "%"). Additionally, work around a bug in IRIX sed. Suggested by Ken Pizzini. diff --git a/acgeneral.m4 b/acgeneral.m4 index 16fcda4c..eb178f7d 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1826,9 +1826,12 @@ EOF dnl ### Setting output variables +dnl AC_SUBST(VARIABLE) +dnl ------------------ dnl This macro protects VARIABLE from being diverted twice dnl if this macro is called twice for it. -dnl AC_SUBST(VARIABLE) +dnl Beware that if you change this macro, you also have to change the +dnl sed script at the top of AC_OUTPUT_FILES. define(AC_SUBST, [ifdef([AC_SUBST_$1], , [define([AC_SUBST_$1], )dnl @@ -1838,6 +1841,8 @@ AC_DIVERT_POP()dnl ])]) dnl AC_SUBST_FILE(VARIABLE) +dnl ----------------------- +dnl Read the comments of the preceding macro. define(AC_SUBST_FILE, [ifdef([AC_SUBST_$1], , [define([AC_SUBST_$1], )dnl @@ -3137,9 +3142,12 @@ dnl Upon exit, no here document shall be opened. define(AC_OUTPUT_FILES, [cat >>$CONFIG_STATUS < \$ac_cs_root.subs <<\\CEOF +sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' > \$ac_cs_root.subs <<\\CEOF changequote([, ])dnl dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 16fcda4c..eb178f7d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1826,9 +1826,12 @@ EOF dnl ### Setting output variables +dnl AC_SUBST(VARIABLE) +dnl ------------------ dnl This macro protects VARIABLE from being diverted twice dnl if this macro is called twice for it. -dnl AC_SUBST(VARIABLE) +dnl Beware that if you change this macro, you also have to change the +dnl sed script at the top of AC_OUTPUT_FILES. define(AC_SUBST, [ifdef([AC_SUBST_$1], , [define([AC_SUBST_$1], )dnl @@ -1838,6 +1841,8 @@ AC_DIVERT_POP()dnl ])]) dnl AC_SUBST_FILE(VARIABLE) +dnl ----------------------- +dnl Read the comments of the preceding macro. define(AC_SUBST_FILE, [ifdef([AC_SUBST_$1], , [define([AC_SUBST_$1], )dnl @@ -3137,9 +3142,12 @@ dnl Upon exit, no here document shall be opened. define(AC_OUTPUT_FILES, [cat >>$CONFIG_STATUS < \$ac_cs_root.subs <<\\CEOF +sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' > \$ac_cs_root.subs <<\\CEOF changequote([, ])dnl dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once.