use `echo` followed by a non-blank, within quotes.
* autoheader.sh (syms): Likewise.
* configure: Rebuilt.
Reported by Christian Krone <krischan@sql.de>
1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+ * 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 <krischan@sql.de>
+
* acgeneral.m4 (AC_INCLUDE): New macro.
* autoconf.texi: Document it.
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
])
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 "
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
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
])