[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Idea to support 'test -x' for AS_EXECUTABLE_P again
From: |
Sander Niemeijer |
Subject: |
Idea to support 'test -x' for AS_EXECUTABLE_P again |
Date: |
Tue, 19 Nov 2002 17:20:23 +0100 |
It seems that in the _AS_TEST_PREPARE part of the m4sugar/m4sh.m4 file,
as_executable_p is not set to 'test -x' if this can be done. An old
seemingly 'buggy' version was renamed to _AS_BROKEN_TEST_PREPARE.
I was wondering whether the old test can't be rewritten to test
executability of '/bin/sh' (which is always available and executable,
right?). This would turn it into something like:
---
m4_defun([_AS_TEST_PREPARE],
[if test -x /bin/sh >/dev/null 2>&1; then
as_executable_p="test -x"
elif test -f /bin/sh >/dev/null 2>&1; then
as_executable_p="test -f"
else
AS_ERROR([cannot check whether a file is executable on this system])
fi
])# _AS_TEST_PREPARE
---
Anybody got any idea whether this is a portable solution?
Regards,
Sander
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Idea to support 'test -x' for AS_EXECUTABLE_P again,
Sander Niemeijer <=