autoconf-patches
[Top][All Lists]
Advanced

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

loading config.site when $prefix contains IFS characters


From: Alexandre Duret-Lutz
Subject: loading config.site when $prefix contains IFS characters
Date: Sat, 02 Jul 2005 20:01:32 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

While investigating why Paul's test case for Automake
(http://lists.gnu.org/archive/html/automake-patches/2005-07/msg00002.html)
doesn't work for me, I've noticed the following output in the
trace (piped thru `cat -A' for clarity).

+ for test in build install$
+ case $test in$
+ build=sub1$
++ pwd$
+ dest='/home/adl/projs/cvs/automake/HEAD3/tests/testSubDir/^I'$
+ mkdir sub1 './^I'$
+ cd sub1$
+ case $test-$file in$
+ ../configure --prefix '/^I-prefix'$
configure: loading site script /$
sed: read error on /: Is a directory$
../configure: line 1514: .: /: is a directory$
configure: loading site script /$
sed: read error on /: Is a directory$
../configure: line 1514: .: /: is a directory$
checking for a BSD-compatible install... /usr/bin/install -c$
checking whether build environment is sane... yes$

here configure sets

CONFIG_SITE="/^I/share/config.site /^I/etc/config.site"

and then split this in four components in the `for ac_site_file in $CONFIG_SITE'
loop.

The same happens with new line and space.

2005-07-02  Alexandre Duret-Lutz  <address@hidden>

        * lib/autoconf/general.m4 (AC_SITE_LOAD): Rewrite the
        for loop over config.site files using `set', to allow
        directory names containing IFS characters.

Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.872
diff -u -r1.872 general.m4
--- lib/autoconf/general.m4     1 Jul 2005 22:20:56 -0000       1.872
+++ lib/autoconf/general.m4     2 Jul 2005 17:46:05 -0000
@@ -1738,14 +1738,19 @@
 # Look for site or system specific initialization scripts.
 m4_define([AC_SITE_LOAD],
 [# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
+if test "x$CONFIG_SITE" = x; then
   if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    set x "$prefix/share/config.site" "$prefix/etc/config.site"
   else
-    CONFIG_SITE="$ac_default_prefix/share/config.site 
$ac_default_prefix/etc/config.site"
+    set x "$ac_default_prefix/share/config.site" \
+          "$ac_default_prefix/etc/config.site"
   fi
+else
+  set x "$CONFIG_SITE"
 fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
   if test -r "$ac_site_file"; then
     AC_MSG_NOTICE([loading site script $ac_site_file])
     sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD

-- 
Alexandre Duret-Lutz





reply via email to

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