jim 98/04/11 07:30:33
Modified: src Configure src/helpers TestCompile Log: Submitted by: Jim Jagielski Have TestCompile use PrintPath to get around those platforms that still create executables with link errors. In those cases, the binary exists but isn't executable, so testing -f isn't good enough. However, -x isn't portable :/ PrintPath handles this, so we use that. Revision Changes Path 1.235 +6 -4 apache-1.3/src/Configure Index: Configure =================================================================== RCS file: /export/home/cvs/apache-1.3/src/Configure,v retrieving revision 1.234 retrieving revision 1.235 diff -u -r1.234 -r1.235 --- Configure 1998/04/11 12:00:15 1.234 +++ Configure 1998/04/11 14:30:32 1.235 @@ -251,9 +251,10 @@ TARGET="httpd" SUBTARGET="target_static" SHLIB_SUFFIX_LIST="" -PRINTPATH=PrintPath +AP_PRINTPATH=PrintPath +export AP_PRINTPATH CAT="cat" -if ./helpers/$PRINTPATH -s ranlib; then +if ./helpers/$AP_PRINTPATH -s ranlib; then RANLIB="ranlib" else RANLIB="true" @@ -330,7 +331,8 @@ LIBS="$LIBS -lsocket -lufc -lbsd" DBM_LIB="-lgdbm" SHELL=sh - PRINTPATH=PrintPathOS2 + AP_PRINTPATH=PrintPathOS2 + export AP_PRINTPATH ;; *-hi-hiux) OS='HI-UX' @@ -695,7 +697,7 @@ for compilers in "gcc" "cc" "acc" "c89" do lookedfor="$lookedfor $compilers" - if ./helpers/$PRINTPATH -s $compilers; then + if ./helpers/$AP_PRINTPATH -s $compilers; then COMPILER="$compilers" break fi 1.10 +12 -3 apache-1.3/src/helpers/TestCompile Index: TestCompile =================================================================== RCS file: /export/home/cvs/apache-1.3/src/helpers/TestCompile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- TestCompile 1998/03/05 12:42:30 1.9 +++ TestCompile 1998/04/11 14:30:33 1.10 @@ -120,8 +120,17 @@ # Now run that Makefile eval "make $TARGET >/dev/null $ERRDIR" -# And see if dummy exists, if so, then we assume the -# condition we are testing for is good -if [ -f $TARGET ]; then +# And see if dummy exists and is executable, if so, then we +# assume the condition we are testing for is good +# +# Use our PrintPath helper script, knowing that we have +# 2 versions of it though... Configure should set AP_PRINTPATH +# but if not, just assume we use our "generic" version +if [ "x$AP_PRINTPATH" = "x" ] ; then + AP_PRINTPATH=PrintPath +fi + +TESTTARG=`PATH=".:$PATH" ./$AP_PRINTPATH $TARGET` +if [ "x$TESTTARG" = "x./$TARGET" ] ; then exstat=0 fi