autoconf
[Top][All Lists]
Advanced

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

RE: autoconf 2.49c fails if '.' is in PATH


From: Tim Van Holder
Subject: RE: autoconf 2.49c fails if '.' is in PATH
Date: Mon, 19 Feb 2001 22:48:52 +0100

> On DJGPP, can't you find some other tool that would help?  For
> instance, is perl necessarily installed?  Can we use it?
No, it's not. And the DJGPP maintainers get very upset if you
try forcing users to have too many non-trivial packages
installed (and perl is certainly non-trivial).
I can't think of any tool that would help in this matter.

The only alternative I can think of is going back to -f.
DJGPP has a hack available (setting the envvar TEST_FIND_EXE will
cause test -f to act like test -x, except that it won't find dirs),
so we can do without specific support; don't know if Cygwin has
something similar though.

The only real way out is to have a list of known executable
extensions for each system, and use those in addition to a plain
'test -f'. Some macro could set up ac_exec_exts (defaulting to ''
on Unices, and '.exe .com .bat .btm .sh .pl' or something similar
on DOS). On NT, you could probably just get them from the PATHEXT
envvar if it is set (though that could be a 4NT extension, I'm not
sure).

AC_PATH_PROG and friends could then

  if test -f $ac_dir/$ac_prog; then
    BLAH=$ac_dir/$ac_prog
  elif test -n "$ac_exec_exts"; then
    for ac_ext in $ac_exec_exts; do
      if test -f $ac_dir/$ac_prog$ac_ext; then
        BLAH=$ac_dir/$ac_prog$ac_ext
      fi
    done
  fi

or something similar. The only difficulty then would be setting
up ac_exec_exts; for now, we could leave this up to config.site
(the DJGPP and Cygwin ports could simply distribute a default
config.site with the correct setting preloaded) or use uname
to guess a good default.

Alternatively, we can put this logic in an external file
(say, 'isexec-sh') and set 'as_executable_p' to this. But I'd
prefer not adding external programs.  After all, this is
autoconf, not autom4ke ;-P




reply via email to

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