]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Oct 2006 18:53:19 +0000 (18:53 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Oct 2006 18:53:19 +0000 (18:53 +0000)
than creating a file to use with test -x; this is much faster.

ChangeLog
lib/m4sugar/m4sh.m4

index 3d9de7cc8bdf1399d59df300e82a0ffc505213ad..c5a25819a33ddf5a36e83a5cc6ac3eb4cf6d0434 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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  <bruno@clisp.org>
 
        * lib/autom4te.in (Automake-preselections): Add
index f2d6b2ff821b34a724dd9648753c9522f3658a49..405432d82b22295ecc87ffb25c024e86b8c3f7a1 100644 (file)
@@ -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