autoconf
[Top][All Lists]
Advanced

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

Why 2.53 is broken (Re: making a 2.52 macro backward compatible)


From: Lars Hecking
Subject: Why 2.53 is broken (Re: making a 2.52 macro backward compatible)
Date: Fri, 19 Apr 2002 17:02:49 +0100
User-agent: Mutt/1.5.0i

Akim Demaille writes:
> Seriously, I don't want to start useless long threads about this
> issue, but it is really an error to stick to 2.13.  It is dead and
> will no longer be maintained.

 What a pity. As long as autoconf 2.5x remains as broken as it is now,
 I will certainly stick with 2.13.

 A few weeks ago, I posted a question here about debugging autoconf.
 I didn't really follow up because I was away in the meantime, but
 I looked at it again today in the context of this thread, and found
 out some interesting stuff. The issue raised here is probably masked
 in many cases because the PATH setting in the environment is "accidentally"
 correct.

 One of my projects uses 
 AC_PATH_PROG(file,file,,/usr/local/bin:/bin:/usr/bin:$PATH)

 /bin/file is the first occurence of file in $PATH, but configure should
 surely find /usr/local/bin/file first. That's the whole point of
 AC_PATH_PROG, isn't it?

 Not so if you use autoconf 2.53. A configure script generated by 2.53
 finds /bin/file, while a script generated by 2.13 finds /usr/local/bin/file,
 as I would expect. How autoconf expands AC_PATH_PROG makes a big difference.

 2.13 generates

  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="/usr/local/bin:/bin:/usr/bin:$PATH"
  for ac_dir in $ac_dummy; do 

 2.53 generates

  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /usr/local/bin:/bin:/usr/bin:$PATH

 Why the hell does this make a difference on my platform (Solaris 8)?
 Someone more familiar with Bourne shells should take a look at my
 analysis below, I'm not sure it's correct.

 It looks like the shell does not perform blank interpretation on the string
 preceding the $. Which is, strictly speaking, exactly what the man page says
 (underlining by me):

...
     After parameter and command  substitution,  the  results  of
                                                 ^^^^^^^^^^^^^^^^
     substitution  are scanned for internal field separator char-
     ^^^^^^^^^^^^^^^^^^^^^^^^^
     acters (those found in IFS) and split  into  distinct  argu-
...

 This is probably an (sh) implementation detail, but I expect autoconf
 to deal with it!

 IMHO a detailed audit of autoconf is required to resolve this and
 similar issues. This is pretty basic stuff.




reply via email to

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