]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Don't use `cat -s' to single out new-lines, it is not portable.
authorAkim Demaille <akim@epita.fr>
Fri, 11 Feb 2000 08:59:52 +0000 (08:59 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 11 Feb 2000 08:59:52 +0000 (08:59 +0000)
Also remove trailing blanks.

* tests/Makefile.am (testsuite): Use sed instead of cat.
* tests/torture.m4: No longer check for a trailing space.
* autoconf.sh: Likewise.

ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in
configure
tests/Makefile.am
tests/torture.m4

index 4736a98a7a4b456ac9c5b71ee75fa2860f1a1440..216ccfd977dcd2658a979de7f1263614b248f009 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-11  Akim Demaille  <akim@epita.fr>
+
+       Don't use `cat -s' to single out new-lines, it is not portable.
+       Also remove trailing blanks.
+
+       * tests/Makefile.am (testsuite): Use sed instead of cat.
+       * tests/torture.m4: No longer check for a trailing space.
+       * autoconf.sh: Likewise.
+
 2000-02-10  Akim Demaille  <akim@epita.fr>
 
        * tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an
index 4698dae338d1ad4875e57840d3e31bfe32f2cb25..792040b94907cfb5edd772e8273047cfde1bfac3 100644 (file)
@@ -226,11 +226,11 @@ case $task in
   # Put the real line numbers into configure to make config.log more helpful.
   # Because quoting can sometimes get really painful in m4, there are special
   # @tokens@ to substitute.
-  cat -s $tmpout |
+  sed -e 's/[  ]*$//' <$tmpout |
+    sed -e '/^$/N;/\n$/D' |
     $AWK '
       /__oline__/ { printf "%d:", NR + 1 }
-                { print }
-      ' |
+                 { print }' |
     sed '
       /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
       s/@BKL@/[/g
index 4698dae338d1ad4875e57840d3e31bfe32f2cb25..792040b94907cfb5edd772e8273047cfde1bfac3 100644 (file)
@@ -226,11 +226,11 @@ case $task in
   # Put the real line numbers into configure to make config.log more helpful.
   # Because quoting can sometimes get really painful in m4, there are special
   # @tokens@ to substitute.
-  cat -s $tmpout |
+  sed -e 's/[  ]*$//' <$tmpout |
+    sed -e '/^$/N;/\n$/D' |
     $AWK '
       /__oline__/ { printf "%d:", NR + 1 }
-                { print }
-      ' |
+                 { print }' |
     sed '
       /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
       s/@BKL@/[/g
index 4698dae338d1ad4875e57840d3e31bfe32f2cb25..792040b94907cfb5edd772e8273047cfde1bfac3 100644 (file)
@@ -226,11 +226,11 @@ case $task in
   # Put the real line numbers into configure to make config.log more helpful.
   # Because quoting can sometimes get really painful in m4, there are special
   # @tokens@ to substitute.
-  cat -s $tmpout |
+  sed -e 's/[  ]*$//' <$tmpout |
+    sed -e '/^$/N;/\n$/D' |
     $AWK '
       /__oline__/ { printf "%d:", NR + 1 }
-                { print }
-      ' |
+                 { print }' |
     sed '
       /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
       s/@BKL@/[/g
index ac879c387230fbf5491fdbbb23ee17cf2a1eb009..f72269dd0a4e433e0750487ede81b811b34a94ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -6,29 +6,23 @@
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 
-
-
-
-
-
-
-
-
-
-
-
-
 # Defaults:
 ac_arg_with_help=
 ac_arg_enable_help=
 ac_arg_var_help=
 ac_default_prefix=/usr/local
-# Any additions from configure.in:
 # Factorizing default headers for most tests.
-# Mandatory included if its is not used.
 ac_includes_default="\
 #include <stdio.h>
 #include <sys/types.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
 #if HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
@@ -39,17 +33,10 @@ ac_includes_default="\
 #  include <strings.h>
 # endif
 #endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
+# Any additions from configure.in:
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -105,10 +92,7 @@ do
     continue
   fi
 
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
+  ac_optarg=`echo "$ac_option" | sed -n 's/^[^=]*=//p'`
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
@@ -141,7 +125,7 @@ do
     ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'`
     # Reject names that are not valid shell variable names.
     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+      { echo "configure: error: invalid feature: $ac_feature" 1>&2; exit 1; }
     fi
     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
     eval "enable_${ac_feature}=no" ;;
@@ -150,7 +134,7 @@ do
     ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+      { echo "configure: error: invalid feature: $ac_feature" 1>&2; exit 1; }
     fi
     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
     case "$ac_option" in
@@ -172,7 +156,7 @@ do
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he)
+  -help | --help | --hel | --he | -h)
     # Omit some internal or obsolete options to make the list less imposing.
     # This message is too long to be a string in the A/UX 3.1 sh.
     cat <<\EOF
@@ -187,11 +171,11 @@ CFLAGS...), give to `configure' the definition as VAR=VALUE.
 Defaults for the options are specified in brackets.
 
 Configuration:
-  --cache-file=FILE   cache test results in FILE
-  --help              print this message
-  --no-create         do not create output files
-  --quiet, --silent   do not print \`checking...' messages
-  --version           print the version of autoconf that created configure
+  -h, --help              print this message
+      --version           print the version of autoconf that created configure
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE
+  -n, --no-create         do not create output files
 
 Directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -399,7 +383,7 @@ Some influent environment variables:$ac_arg_var_help"
     ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+      { echo "configure: error: invalid package: $ac_package" 1>&2; exit 1; }
     fi
     ac_package=`echo $ac_package| sed 's/-/_/g'`
     case "$ac_option" in
@@ -412,7 +396,7 @@ Some influent environment variables:$ac_arg_var_help"
     ac_package=`echo "$ac_option"|sed -e 's/-*without-//'`
     # Reject names that are not valid shell variable names.
     if echo "$ac_feature" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+      { echo "configure: error: invalid package: $ac_package" 1>&2; exit 1; }
     fi
     ac_package=`echo $ac_package| sed 's/-/_/g'`
     eval "with_${ac_package}=no" ;;
@@ -435,21 +419,23 @@ Some influent environment variables:$ac_arg_var_help"
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries="$ac_optarg" ;;
 
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+  -*) { echo "configure: error: unrecognized option: $ac_option
+Try \`configure --help' for more information." 1>&2; exit 1; }
     ;;
 
   *=*)
-    ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
+    ac_envvar=`echo "$ac_option" | sed -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; }
+    if echo "$ac_envvar" | grep '[^a-zA-Z0-9_]' >/dev/null 2>&1; then
+      { echo "configure: error: invalid variable name: $ac_envvar" 1>&2; exit 1; }
     fi
-    eval "${ac_envvar}='$ac_optarg'"
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
     export $ac_envvar ;;
 
   *)
     if echo "$ac_feature" | grep '[^-a-zA-Z0-9.]' >/dev/null 2>&1; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
+      echo "configure: warning: invalid host type: $ac_option" 1>&2
     fi
     if test "x$nonopt" != xNONE; then
       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
@@ -496,8 +482,8 @@ do
   | --no-cr | --no-c) ;;
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_arg=`echo "$ac_arg"|sed "s/'/'\\\\\\\\''/g"`
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+  ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
   esac
@@ -527,7 +513,7 @@ if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
   ac_prog=$0
-  ac_confdir=`echo "$ac_prog"|sed 's%/[^/][^/]*$%%'`
+  ac_confdir=`echo "$ac_prog" | sed 's%/[^/][^/]*$%%'`
   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
@@ -543,7 +529,7 @@ if test ! -r $srcdir/$ac_unique_file; then
     { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; }
   fi
 fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
 if test -z "$CONFIG_SITE"; then
@@ -624,7 +610,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
-echo "configure:616: checking for a BSD compatible install" 1>&5
+echo "configure:614: checking for a BSD compatible install" 1>&5
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -681,7 +667,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane... $ac_c" 1>&6
-echo "configure:673: checking whether build environment is sane" 1>&5
+echo "configure:671: checking whether build environment is sane" 1>&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -738,7 +724,7 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}... $ac_c" 1>&6
-echo "configure:730: checking whether ${MAKE-make} sets \${MAKE}" 1>&5
+echo "configure:728: checking whether ${MAKE-make} sets \${MAKE}" 1>&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -781,7 +767,7 @@ EOF
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal... $ac_c" 1>&6
-echo "configure:773: checking for working aclocal" 1>&5
+echo "configure:771: checking for working aclocal" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -794,7 +780,7 @@ else
 fi
 
 echo $ac_n "checking for working autoconf... $ac_c" 1>&6
-echo "configure:786: checking for working autoconf" 1>&5
+echo "configure:784: checking for working autoconf" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -807,7 +793,7 @@ else
 fi
 
 echo $ac_n "checking for working automake... $ac_c" 1>&6
-echo "configure:799: checking for working automake" 1>&5
+echo "configure:797: checking for working automake" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -820,7 +806,7 @@ else
 fi
 
 echo $ac_n "checking for working autoheader... $ac_c" 1>&6
-echo "configure:812: checking for working autoheader" 1>&5
+echo "configure:810: checking for working autoheader" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -833,7 +819,7 @@ else
 fi
 
 echo $ac_n "checking for working makeinfo... $ac_c" 1>&6
-echo "configure:825: checking for working makeinfo" 1>&5
+echo "configure:823: checking for working makeinfo" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -848,7 +834,7 @@ fi
 AT_TESTPATH=..
 
 echo $ac_n "checking how to suppress newlines using echo... $ac_c" 1>&6
-echo "configure:840: checking how to suppress newlines using echo" 1>&5
+echo "configure:838: checking how to suppress newlines using echo" 1>&5
 if test "${fp_cv_prog_echo_nonl+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -877,7 +863,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:869: checking for $ac_word" 1>&5
+echo "configure:867: checking for $ac_word" 1>&5
 if test "${ac_cv_path_M4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -911,7 +897,7 @@ done
 test -n "$M4" || M4="m4"
 
 echo $ac_n "checking whether m4 supports frozen files... $ac_c" 1>&6
-echo "configure:903: checking whether m4 supports frozen files" 1>&5
+echo "configure:901: checking whether m4 supports frozen files" 1>&5
 if test "${ac_cv_prog_gnu_m4+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -932,7 +918,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:924: checking for $ac_word" 1>&5
+echo "configure:922: checking for $ac_word" 1>&5
 if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -962,7 +948,7 @@ test -n "$AWK" && break
 done
 
 echo $ac_n "checking for working help2man... $ac_c" 1>&6
-echo "configure:954: checking for working help2man" 1>&5
+echo "configure:952: checking for working help2man" 1>&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -977,7 +963,7 @@ fi
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word... $ac_c" 1>&6
-echo "configure:969: checking for $ac_word" 1>&5
+echo "configure:967: checking for $ac_word" 1>&5
 if test "${ac_cv_path_PERL+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1025,7 +1011,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
-echo "configure:1017: checking for a BSD compatible install" 1>&5
+echo "configure:1015: checking for a BSD compatible install" 1>&5
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1152,7 +1138,7 @@ fi
 # If the first sed substitution is executed (which looks for macros that
 # take arguments), then we branch to the cleanup section.  Otherwise,
 # look for a macro that doesn't take arguments.
-cat >$ac_cs_root.defs <<\EOF
+cat >conftest.defs <<\EOF
 s%^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)%-D\1=\2%g
 t cleanup
 s%^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)%-D\1=\2%g
@@ -1169,8 +1155,8 @@ EOF
 # platform that uses two characters for line-breaks (e.g., DOS), tr
 # would break.
 ac_LF_and_DOT=`echo; echo .`
-DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
-rm -f $ac_cs_root.defs
+DEFS=`sed -f conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f conftest.defs
 
 : ${CONFIG_STATUS=./config.status}
 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
@@ -1210,8 +1196,8 @@ Report bugs to <bug-autoconf@gnu.org>."
 
 ac_cs_version="\\
 $CONFIG_STATUS generated by autoconf version 2.14a.
-Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by running
-  $0 $ac_configure_args"
+Configured on host `(hostname || uname -n) 2>/dev/null | sed 1q` by
+  `echo "$0 $ac_configure_args" | sed 's/[\\"\`\$]/\\\\&/g'`"
 
 # Root of the tmp file names.  Use pid to allow concurrent executions.
 ac_cs_root=cs\$\$
@@ -1247,7 +1233,8 @@ do
     echo "\$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    echo "$CONFIG_STATUS: ambiguous option: \$ac_option"; exit 1 ;;
+    echo "$CONFIG_STATUS: ambiguous option: \$ac_option
+Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
   -help | --help | --hel )
     echo "\$ac_cs_usage"; exit 0 ;;
   --file | --fil | --fi | --f )
@@ -1268,7 +1255,8 @@ do
   'tests/atconfig' ) CONFIG_FILES="\$CONFIG_FILES tests/atconfig" ;;
 
   # This is an error.
-  -*) echo "$CONFIG_STATUS: invalid option: \$1"; exit 1 ;;
+  -*) echo "$CONFIG_STATUS: unrecognized option: \$1
+Try \\\`$CONFIG_STATUS --help' for more information."; exit 1 ;;
   *) echo "$CONFIG_STATUS: invalid argument: \$1"; exit 1 ;;
   esac
   shift
@@ -1276,16 +1264,22 @@ done
 
 EOF
 
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<\EOF
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
-if \$ac_need_defaults; then
-  : \${CONFIG_FILES="\$config_files"}
+if $ac_need_defaults; then
+  : ${CONFIG_FILES=$config_files}
 fi
 
-# Remove all the CONFIG_FILES, and trap to remove the temp files.
-rm -fr \`echo "\$CONFIG_FILES" | sed "s/:[^ ]*//g"\`
-trap 'rm -fr \$ac_cs_root*; exit 1' 1 2 15
+# Trap to remove the temp files.
+trap 'rm -fr $ac_cs_root*; exit 1' 1 2 15
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+#
+# INIT-COMMANDS section.
+#
 
 EOF
 
@@ -1393,21 +1387,21 @@ cat >>$CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *:*) ac_file_in=`echo "$ac_file" | sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file" | sed 's%:.*%%'` ;;
   *) ac_file_in="${ac_file}.in" ;;
   esac
 
   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
   # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  ac_dir=`echo "$ac_file" | sed 's%/[^/][^/]*$%%'`
   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
     # The file is in a subdirectory.
     test ! -d "$ac_dir" && mkdir "$ac_dir"
     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
     # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+    ac_dots=`echo "$ac_dir_suffix" | sed 's%/[^/]*%../%g'`
   else
     ac_dir_suffix= ac_dots=
   fi
@@ -1439,7 +1433,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 
   # Don't redirect the output to AC_FILE directly: use `mv' so that updating
   # is atomic, and doesn't need trapping.
-  ac_file_inputs=`echo $ac_file_in |
+  ac_file_inputs=`echo "$ac_file_in" |
                   sed -e "s%^%$ac_given_srcdir/%;s%:% $ac_given_srcdir/%g"`
   for ac_file_input in $ac_file_inputs;
   do
@@ -1466,15 +1460,12 @@ fi; done
 rm -f $ac_cs_root.s*
 EOF
 
-cat >>$CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<\EOF
 
 #
 # CONFIG_COMMANDS section.
 #
 
-EOF
-cat >>$CONFIG_STATUS <<\EOF
-
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
@@ -1482,3 +1473,4 @@ rm -fr confdefs* $ac_clean_files
 trap 'exit 1' 1 2 15
 
 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
+
index 3321ddacfea4952274627a707624e9a5b67f7e48..5ab9346a266eb1c61b9eb487c66c2a2e04480925 100644 (file)
@@ -34,7 +34,9 @@ check-local: atconfig testsuite
        $(SHELL) testsuite
 
 testsuite: atgeneral.m4 atspecific.m4 suite.m4 macros.m4 $(SUITE)
-       m4 -I $(srcdir) atspecific.m4 suite.m4 | cat -s > $@-tmp
+       m4 -I $(srcdir) atspecific.m4 suite.m4 | \
+          sed -e 's/[  ]*$$//' | \
+         sed -e '/^$$/N;/\n$$/D' > $@-tmp
        chmod +x $@-tmp
        mv $@-tmp $@
 
index 141ec0a61d51cf0945696cab96b78376e8cfd2fe..5bf95d495ebab950c1af72638be96c7265ce61b6 100644 (file)
@@ -184,9 +184,9 @@ AT_DATA(expout,
 ]])
 AT_CHECK([cat config.h], 0, expout)
 
-# Check the value of DEFS.  Note the leading and trailing spaces.
+# Check the value of DEFS.  Note the leading space.
 AT_DATA(expout,
-[[ -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA ]
+[[ -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA]
 ])
 
 AT_CHECK([cat defs], 0, expout)