On Mon, 11 Feb 2002 00:49:39 +1000 (EST), Brian Havard wrote:
>On Fri, 8 Feb 2002 18:16:57 -0800, Greg Stein wrote:
>
>>On Fri, Feb 08, 2002 at 10:46:46PM +1000, Brian Havard wrote:
>>>...
>>> > - elif test -f "$withval/apr-config"; then
>>> > + elif test -x "$withval/apr-config"; then
>>> > apr_found="yes"
>>> > apr_config="$withval/apr-config"
>>> > elif test -x "$withval" && $withval --help > /dev/null 2>&1 ; then
>>>
>>> Was there any actual need to do this? I ask because it breaks the OS/2
>>> build due to the fact that OS/2 has no 'x' bit in the file system. "test
>>> -x" is only true if the file has a .exe extension which apr-config
>>> obviously does not.
>>
>>Well, the apr-config file is generated, so it normally comes out without an
>>executable flag. We then have a chmod +x (see at the end of configure.in)
>>which should get run during the generation step.
>>
>>I switched to -x to avoid the case of an apr-config that wasn't make
>>executable, and to avoid thinking we have a valid apr-config and then try to
>>run the thing.
>>
>>That said: I'd be fine with loosening it up to just -f, as long as you put
>>in some "dnl" comments on why we chose -f rather than -x. (otherwise, three
>>years from now, somebody will go and patch it to put the -x flags back in
>>there :-)
>
>Either that or make the test switch adjust appropriately for the platform.
>I'll see if I can figure out a nice way to do that.
Ok, this works for me. Look reasonable?
Index: find_apr.m4
===================================================================
RCS file: /home/cvs/apr/build/find_apr.m4,v
retrieving revision 1.9
diff -u -r1.9 find_apr.m4
--- find_apr.m4 2002/02/09 00:04:50 1.9
+++ find_apr.m4 2002/02/14 13:42:55
@@ -38,6 +38,13 @@
AC_DEFUN(APR_FIND_APR, [
apr_found="no"
+ if test "$ac_cv_emxos2" = "yes"; then
+ # Scripts don't pass test -x on OS/2
+ TEST_X="test -f"
+ else
+ TEST_X="test -x"
+ fi
+
AC_MSG_CHECKING(for APR)
AC_ARG_WITH(apr,
[ --with-apr=DIR|FILE prefix for installed APR, path to APR build
tree,
@@ -47,13 +54,13 @@
AC_MSG_ERROR([--with-apr requires a directory to be provided])
fi
- if test -x "$withval/bin/apr-config"; then
+ if $TEST_X "$withval/bin/apr-config"; then
apr_found="yes"
apr_config="$withval/bin/apr-config"
- elif test -x "$withval/apr-config"; then
+ elif $TEST_X "$withval/apr-config"; then
apr_found="yes"
apr_config="$withval/apr-config"
- elif test -x "$withval" && $withval --help > /dev/null 2>&1 ; then
+ elif $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
apr_found="yes"
apr_config="$withval"
fi
@@ -71,7 +78,7 @@
else
dnl look in some standard places (apparently not in builtin/default)
for lookdir in /usr /usr/local /opt/apr ; do
- if test -x "$lookdir/bin/apr-config"; then
+ if $TEST_X "$lookdir/bin/apr-config"; then
apr_found="yes"
apr_config="$lookdir/bin/apr-config"
break
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| [EMAIL PROTECTED] | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------