Bug 69354 - AC_PATH_PROG doesn't work when PATH isn't expanded yet
AC_PATH_PROG doesn't work when PATH isn't expanded yet
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: autoconf (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-07-22 05:37 EDT by Akira TAGOH
Modified: 2007-04-18 12:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-11-22 09:54:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
configure.in (119 bytes, text/plain)
2002-07-22 05:41 EDT, Akira TAGOH
no flags Details

  None (edit)
Description Akira TAGOH 2002-07-22 05:37:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020610
Debian/1.2.5-1

Description of problem:
When $PATH isn't expanded, autoconf generates as the following:
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
for as_dir in $PATH:/usr/lib:/usr/sbin  
do 
  IFS=$as_save_IFS 
  test -z "$as_dir" && as_dir=. 
  for ac_exec_ext in '' $ac_executable_extensions; do 
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext" 
    echo "$as_me:$LINENO: found 
$as_dir/$ac_word$ac_exec_ext" >&5 
    break 2 
  fi 
done 
done 

but bash's man page is described about IFS:
       IFS    The  Internal Field Separator that is used for word
              splitting after expansion and to split  lines  into
              words  with  the read builtin command.  The default
              value is ``<space><tab><newline>''.

So IFS doesn't work for 'for'. I think AC_PATH_PROG's 4th argument always needs
to be set as the variable. I mean the above script needs  to be generated as the
following:
ac_dummy="$PATH:/usr/lib:/usr/sbin"
for as_dir in $ac_dummy

or

for as_dir in $($PATH:/usr/lib:/usr/sbin)


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.runs autoconf with attached configure.in
2.runs configure without /usr/sbin in PATH
3.
	

Actual Results:  program doesn't found.

Expected Results:  program should found.

Additional info:
Comment 1 Akira TAGOH 2002-07-22 05:41:29 EDT
Created attachment 66224 [details]
configure.in
Comment 2 Akira TAGOH 2002-07-22 05:46:37 EDT
this problem seems to not appear with autoconf-2.13
Comment 3 Enrico Scholz 2002-07-22 16:40:53 EDT
Using ':' as path separator seems to be wrong. autoconf.info states in 'File
System Conventions':

|    Also, because the colon is used as part of a drivespec, these
| systems don't use it as path separator.  When creating or accessing
| paths, use the `PATH_SEPARATOR' output variable instead.

When using '${PATH_SEPARATOR}' instead of ':' in your example, it works as expected.
Comment 4 Akira TAGOH 2002-07-22 23:21:35 EDT
Huh? the colon isn't used as part of a drivespace on Linux. I think that
description mention an use on DOS.
Comment 5 Enrico Scholz 2002-07-23 04:51:55 EDT
Usually, ./configure scripts are intented for use on general Posix compliant
systems and not on GNU/Linux only. Most of these systems have special quirks
which must be handled by autoconf correctly.

AFAIK, Cygwin tries to provide such a Posix environment, but inherits ':' as
special character in pathnames from its underlying OS.
Comment 6 Joe Orton 2002-11-22 09:54:38 EST
This is known autoconf bug which is fixed in autoconf 2.54:

""
- AC_PATH_PROG
  Now colon in the optional path arguments are properly handled.
""


Comment 7 Jens Petersen 2002-11-22 19:04:25 EST
Yes, this looks to be ok in autoconf-2.56-1.

Note You need to log in before you can comment on or make changes to this bug.