2004-12-10 Stepan Kasal * lib/m4sugar/m4sh.m4 (AS_EXECUTABLE_P): Use test -f && test -x on platforms where it works. Index: lib/m4sugar/m4sh.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v retrieving revision 1.123 diff -c -r1.123 m4sh.m4 *** lib/m4sugar/m4sh.m4 10 Dec 2004 07:08:52 -0000 1.123 --- lib/m4sugar/m4sh.m4 10 Dec 2004 13:49:12 -0000 *************** *** 658,664 **** # Check whether a file is executable. m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl ! $as_executable_p $1[]dnl ])# AS_EXECUTABLE_P --- 658,664 ---- # Check whether a file is executable. m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl ! ($as_executable_p $1 && $as_executable_p2 $1)dnl ])# AS_EXECUTABLE_P *************** *** 864,898 **** ])# AS_MKDIR_P ! # _AS_BROKEN_TEST_PREPARE ! # ----------------------- ! # FIXME: This does not work and breaks way too many things. ! # # Find out ahead of time whether we want test -x (preferred) or test -f # to check whether a file is executable. ! m4_defun([_AS_BROKEN_TEST_PREPARE], [# Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF ! @%:@! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ! as_executable_p="test -x" ! elif test -f conf$$.file >/dev/null 2>&1; then ! as_executable_p="test -f" else ! AS_ERROR([cannot check whether a file is executable on this system]) fi rm -f conf$$.file ! ])# _AS_BROKEN_TEST_PREPARE ! ! ! # _AS_TEST_PREPARE ! # ---------------- ! m4_defun([_AS_TEST_PREPARE], ! [as_executable_p="test -f" ])# _AS_TEST_PREPARE --- 864,888 ---- ])# AS_MKDIR_P ! # _AS_TEST_PREPARE ! # ---------------- # Find out ahead of time whether we want test -x (preferred) or test -f # to check whether a file is executable. ! m4_defun([_AS_TEST_PREPARE], [# Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF ! #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ! as_executable_p2="test -x" else ! as_executable_p2=":" fi rm -f conf$$.file ! as_executable_p="test -f" ])# _AS_TEST_PREPARE