From: Paul Eggert Date: Wed, 4 Oct 2006 18:53:19 +0000 (+0000) Subject: * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather X-Git-Tag: AUTOCONF-2.60b~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fd58f160c638ea40fd6905cb45459d7f652ab1c;p=thirdparty%2Fautoconf.git * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather than creating a file to use with test -x; this is much faster. --- diff --git a/ChangeLog b/ChangeLog index 3d9de7cc8..c5a25819a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-04 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather + than creating a file to use with test -x; this is much faster. + 2006-10-02 Bruno Haible * lib/autom4te.in (Automake-preselections): Add diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index f2d6b2ff8..405432d82 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -1017,18 +1017,12 @@ esac[]dnl # ---------------- # Find out ahead of time whether ``test -x'' can be used to distinguish # executables from other regular files. -# FIXME: This should use "test -x /"; that's much faster. m4_defun([_AS_TEST_PREPARE], -[# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -echo '#! /bin/sh' >conf$$.file -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' else as_executable_p=: fi -rm -f conf$$.file ])# _AS_TEST_PREPARE