autoconf-patches
[Top][All Lists]
Advanced

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

Re: Initial draft patch: AS_EXECUTABLE_P


From: Pavel Roskin
Subject: Re: Initial draft patch: AS_EXECUTABLE_P
Date: Tue, 23 Jan 2001 12:55:10 -0500 (EST)

On Mon, 22 Jan 2001, Tim Van Holder wrote:

> Here is an initial draft of an AS_EXECUTABLE_P macro to
> replace the current 'test -f'. It works on my system
> (tested using a basic "AC_INIT; AC_PROG_CC" configure.in),
> but the _AS_TEST_PREPARE macro will probably need some
> refining. And of course, names will probably need changing
> too.
>
> 2001-01-22    Tim Van Holder <address@hidden>
>
>       * m4sh.m4 (AS_EXECUTABLE_P, _AS_TEST_PREPARE):
>       New macros.

AS_EXECUTABLE_P should provably be named AS_OS_EXECUTABLE. This is one of
the few cases when Autoconf is dealing with the OS, not with the
libraries. Another case would be the maximal length of the arguments.

Besides, why that "_P" on the end? My first guess was "profiling" as in
libc_p.a.

>       (AS_SANITIZE_SHELL): Call _AS_TEST_PREPARE.
>       * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Use
>       AS_EXECUTABLE_P instead of test -f.

Sounds good but see below.

> +chmod 100 conftest.file
> +if test -x conftest.file; then
> +  as_executable_p="test -x"
> +elif test -f conftest.file; then
> +  as_executable_p="test -f"

Are you sure this won't break Cygwin? OS/2-EMX? DJGPP?

They all will probably fall back to "test -f" which won't be successul if
".exe" is omitted, i.e. "test -f m4" will fail for m4.exe as opposed to
"test -x m4" that should find it.

I cannot check it myself, but I can only approve this patch if it at least
doesn't break Cygwin.

Regards,
Pavel Roskin




reply via email to

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