bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

portability problem with autoconf 2.49c on Solaris 7


From: Paul Eggert
Subject: portability problem with autoconf 2.49c on Solaris 7
Date: Mon, 29 Jan 2001 22:27:03 -0800 (PST)

I ran into a portability problem when running autoconf 2.49c on Solaris 7.
Solaris 7's /bin/sh 'echo' interprets backslashes, e.g.:

$ echo 'a\\b'
a\b

When I ran autoheader against fileutils 4.0.38, it generated the following
in config.h.in:

    #if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
    # define ISSLASH(C) ((C) == '/' || (C) == '\')
    #else
    # define ISSLASH(C) ((C) == '/')
    #endif

Notice the '\'.  It should have been '\\', but an "echo" inside
autoheader turned the '\\' into '\'.

Here is a patch.  Unfortunately, I suspect that this slows autoheader
down considerably.


2001-01-29  Paul Eggert  <address@hidden>

        * autoheader.sh: Don't pass a string to 'echo' that might
        possibly contain backslashes.

===================================================================
RCS file: autoheader.sh,v
retrieving revision 2.49.3.0
retrieving revision 2.49.3.1
diff -pu -r2.49.3.0 -r2.49.3.1
--- autoheader.sh       2001/01/16 10:19:56     2.49.3.0
+++ autoheader.sh       2001/01/30 06:16:59     2.49.3.1
@@ -310,8 +310,11 @@ test -r $localdir/acconfig.h &&
 
 # Dump the templates from `configure.ac'.
 for verb in `(set) 2>&1 | sed -n -e '/^ac_verbatim/s/^\([^=]*\)=.*$/\1/p' | 
sort`; do
-  echo >>$tmp/config.hin
-  eval echo '"${'$verb'}"' >>$tmp/config.hin
+  eval value=\$$verb
+  cat >>$tmp/config.hin <<EOF
+
+$value
+EOF
 done
 
 # Handle the case where @BOTTOM@ is the first line of acconfig.h.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]