From: oliva Date: Wed, 15 Sep 1999 02:49:24 +0000 (+0000) Subject: * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is 012, X-Git-Tag: exp-1999-09-21~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8829b673f4bcedc3c8730c5a1f41f38061566a23;p=thirdparty%2Fautoconf.git * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is 012, use `echo` followed by a non-blank, within quotes. * autoheader.sh (syms): Likewise. * configure: Rebuilt. Reported by Christian Krone --- diff --git a/ChangeLog b/ChangeLog index 9857aaf6..0697e214 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-09-14 Alexandre Oliva + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, + use `echo` followed by a non-blank, within quotes. + * autoheader.sh (syms): Likewise. + * configure: Rebuilt. + Reported by Christian Krone + * acgeneral.m4 (AC_INCLUDE): New macro. * autoconf.texi: Document it. diff --git a/acgeneral.m4 b/acgeneral.m4 index 3d3b1a43..1ba3047b 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -2689,7 +2689,14 @@ s%\]%\\&%g s%\$%$$%g changequote([, ])dnl EOF -DEFS=`sed -f $conftest.defs confdefs.h | tr '\012' ' '` +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT="`echo; echo .`" +DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f $conftest.defs ]) diff --git a/autoheader.sh b/autoheader.sh index a0810145..8b0521b8 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -213,10 +213,16 @@ $syms EOF fgrep -f $fgrep_tmp rm -f $fgrep_tmp) | - tr @ \\012 + tr @. "`echo`." +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. fi -echo "$types" | tr , \\012 | sort | uniq | while read ctype; do +echo "$types" | tr ,. "`echo`." | sort | uniq | while read ctype; do test -z "$ctype" && continue sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`" echo " diff --git a/configure b/configure index 5e9b3673..3125c4ab 100755 --- a/configure +++ b/configure @@ -858,7 +858,14 @@ s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF -DEFS=`sed -f $conftest.defs confdefs.h | tr '\012' ' '` +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT="`echo; echo .`" +DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f $conftest.defs diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 3d3b1a43..1ba3047b 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2689,7 +2689,14 @@ s%\]%\\&%g s%\$%$$%g changequote([, ])dnl EOF -DEFS=`sed -f $conftest.defs confdefs.h | tr '\012' ' '` +# We use echo to avoid assuming a particular line-breaking character. +# The extra dot is to prevent the shell from consuming trailing +# line-breaks from the sub-command output. A line-break within +# single-quotes doesn't work because, if this script is created in a +# platform that uses two characters for line-breaks (e.g., DOS), tr +# would break. +ac_LF_and_DOT="`echo; echo .`" +DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f $conftest.defs ])