Subject: bin/4851: IFS bug in /bin/sh
To: None <gnats-bugs@gnats.netbsd.org>
From: Benjamin Lorenz <lorenz@talo.ps.uni-sb.de>
List: netbsd-bugs
Date: 01/20/1998 21:46:57
>Number: 4851
>Category: bin
>Synopsis: sh has problems with IFS not separating correctly
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 20 12:50:01 1998
>Last-Modified:
>Originator: Benjamin Lorenz
>Organization:
Fachbereich Programmiersysteme, Uni des Saarlandes
>Release: 1.3
>Environment:
System: NetBSD talo 1.3 NetBSD 1.3 (BENNI) #0: Mon Jan 19 03:03:53 CET 1998 \
lorenz@talo:/opt/src/sys/arch/i386/compile/BENNI i386
>Description:
GNU autoconf (v2.12) creates a `configure' shell script to be
executed by sh. However, with NetBSD's sh, this created script fails
with an error.
>How-To-Repeat:
What follows is an extract of the created script:
#!/bin/sh
srcdir=.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in .:$srcdir; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/XX; then
ac_cv_path_XX="$ac_dir/XX"
break
fi
done
IFS="$ac_save_ifs"
echo ${ac_cv_path_XX}
>Fix:
If you replace the 'for...' line with the following, it works:
for ac_dir in `echo .:$srcdir`; do
>Audit-Trail:
>Unformatted: