[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Protection against spaces in $PATH
From: |
Pavel Roskin |
Subject: |
Protection against spaces in $PATH |
Date: |
Tue, 26 Sep 2000 12:40:50 -0400 (EDT) |
Hello!
While running the testsuite on Cygwin I have found that AC_PROG_AWK fails
just because there are directories with spaces in PATH.
No, I don't think that Autoconf should quote everything and protect
against spaces in every filename. Nevertheless, it should be safe just to
scan $PATH, however you may still have a problem if your awk is indeed in
//C/Program Files/Visual AWK/bin/awk :-)
So I checked the places where $PATH is used and ensured that there is
proper quoting around $ac_dir.
Now the testsuite passes on CygWin 1.1.4, WinNT 4.0 SP6. There has been
one more quirk - I had to make a link from "gcc" to "cc" because
AC_PROG_CPP assumes that $CC is set and uses "cc" otherwise.
ChangeLog:
* acgeneral.m4 (AC_CHECK_PROG): Added protection against spaces
in $PATH.
* acspecific.m4 (AC_PROG_INSTALL): Likewise.
Regards,
Pavel Roskin
___________________________
Index: acgeneral.m4
--- acgeneral.m4 Tue Sep 26 10:47:22 2000
+++ acgeneral.m4 Tue Sep 26 11:02:05 2000
@@ -2988,7 +2988,7 @@
m4_ifvanl([$6],
[ ac_prog_rejected=no])dnl
AC_SHELL_PATH_WALK([$5],
-[test -f $ac_dir/$ac_word || continue
+[test -f "$ac_dir/$ac_word" || continue
m4_ifvanl([$6],
[if test "$ac_dir/$ac_word" = "$6"; then
ac_prog_rejected=yes
@@ -3058,7 +3058,7 @@
*)
AC_SHELL_PATH_WALK([$4],
[if test -f "$ac_dir/$ac_word"; then
- ac_cv_path_$1=$ac_dir/$ac_word
+ ac_cv_path_$1="$ac_dir/$ac_word"
break
fi])
dnl If no 3rd arg is given, leave the cache variable unset,
Index: acspecific.m4
--- acspecific.m4 Tue Sep 26 10:47:23 2000
+++ acspecific.m4 Tue Sep 26 10:51:02 2000
@@ -221,13 +221,13 @@
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+ if test -f "$ac_dir/$ac_prog"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
- grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
___________________________
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Protection against spaces in $PATH,
Pavel Roskin <=