jim 98/09/16 21:09:42
Modified: src CHANGES Configure
src/helpers PrintPath TestCompile findcpp.sh
Removed: src/helpers PrintPathOS2
Log:
Remove the hack of having an OS/2 version of PrintPath around.
Reviewed by: Brian Havard
Revision Changes Path
1.1061 +3 -0 apache-1.3/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
retrieving revision 1.1060
retrieving revision 1.1061
diff -u -r1.1060 -r1.1061
--- CHANGES 1998/09/16 19:38:26 1.1060
+++ CHANGES 1998/09/17 04:09:39 1.1061
@@ -1,4 +1,7 @@
Changes with Apache 1.3.2
+
+ *) Make PrintPath work generically instead of having one version
+ strictly for OS/2. [Jim Jagielski, Brian Havard]
*) Fix the recently introduced C header file checking: We now use the C
pre-processor pass only (and no longer the complete compiler pass) to
1.290 +2 -6 apache-1.3/src/Configure
Index: Configure
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/Configure,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -r1.289 -r1.290
--- Configure 1998/09/16 19:38:26 1.289
+++ Configure 1998/09/17 04:09:39 1.290
@@ -257,8 +257,6 @@
TARGET="httpd"
SUBTARGET="target_static"
SHLIB_SUFFIX_LIST=""
-AP_PRINTPATH=PrintPath
-export AP_PRINTPATH
CAT="cat"
####################################################################
@@ -350,8 +348,6 @@
LIBS="$LIBS -lsocket -lufc -lbsd"
DBM_LIB="-lgdbm"
SHELL=sh
- AP_PRINTPATH=PrintPathOS2
- export AP_PRINTPATH
;;
*-hi-hiux)
OS='HI-UX'
@@ -769,7 +765,7 @@
for compilers in "gcc" "cc" "acc" "c89"
do
lookedfor="$lookedfor $compilers"
- if ./helpers/$AP_PRINTPATH -s $compilers; then
+ if ./helpers/PrintPath -s $compilers; then
COMPILER="$compilers"
break
fi
@@ -1225,7 +1221,7 @@
if [ ".$TRANLIB" != . ]; then
RANLIB=$TRANLIB
else
- if ./helpers/$AP_PRINTPATH -s ranlib; then
+ if ./helpers/PrintPath -s ranlib; then
RANLIB="ranlib"
else
RANLIB="true"
1.13 +46 -16 apache-1.3/src/helpers/PrintPath
Index: PrintPath
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/helpers/PrintPath,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PrintPath 1998/09/16 20:49:23 1.12
+++ PrintPath 1998/09/17 04:09:41 1.13
@@ -22,6 +22,11 @@
echo="yes"
##
+# Find out what OS we are running for later on
+##
+os=`(uname) 2>/dev/null`
+
+##
# Parse command line
##
for args in $*
@@ -34,12 +39,39 @@
done
##
-# We do some funny stuff to check to see
-# if test/[] knows about -x
+# Now we make the adjustments required for OS/2 and everyone
+# else :)
+#
+# First of all, all OS/2 programs have the '.exe' extension.
+# Next, we adjust PATH (or what was given to us as PATH) to
+# be whitespace seperated directories.
+# Finally, we try to determine the best flag to use for
+# test/[] to look for an executable file. OS/2 just has '-r'
+# but with other OSs, we do some funny stuff to check to see
+# if test/[] knows about -x, which is the prefered flag.
##
-testfile="pp.t.$$"
+
+if [ "x$os" = "xOS/2" ]
+then
+ ext=".exe"
+ pathname=`echo -E $pathname |
+ sed 's/^;/.;/
+ s/;;/;.;/g
+ s/;$/;./
+ s/;/ /g
+ s/\\\\/\\//g' `
+ test_exec_flag="-r"
+else
+ ext="" # No default extensions
+ pathname=`echo $pathname |
+ sed 's/^:/.:/
+ s/::/:.:/g
+ s/:$/:./
+ s/:/ /g' `
+ # Here is how we test to see if test/[] can handle -x
+ testfile="pp.t.$$"
-cat > $testfile <<ENDTEST
+ cat > $testfile <<ENDTEST
#!/bin/sh
if [ -x / ] || [ -x /bin ] || [ -x /bin/ls ]; then
exit 0
@@ -47,24 +79,22 @@
exit 1
ENDTEST
-if `/bin/sh $testfile 2>/dev/null`; then
- test_exec_flag="-x"
-else
- test_exec_flag="-r"
+ if `/bin/sh $testfile 2>/dev/null`; then
+ test_exec_flag="-x"
+ else
+ test_exec_flag="-r"
+ fi
+ rm -f $testfile
fi
-rm -f $testfile
for program in $programs
do
- for path in `echo $pathname |
- sed 's/^:/.:/
- s/::/:.:/g
- s/:$/:./
- s/:/ /g' `
+ for path in $pathname
do
- if [ $test_exec_flag $path/$program ] && [ ! -d $path/$program ]; then
+ if [ $test_exec_flag $path/${program}${ext} ] && \
+ [ ! -d $path/${program}${ext} ]; then
if [ "$echo" = "yes" ]; then
- echo $path/$program
+ echo $path/${program}${ext}
fi
exit 0
fi
1.16 +3 -9 apache-1.3/src/helpers/TestCompile
Index: TestCompile
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/helpers/TestCompile,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- TestCompile 1998/09/16 20:49:24 1.15
+++ TestCompile 1998/09/17 04:09:41 1.16
@@ -147,15 +147,9 @@
# 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. We
-# also use the "-p" option to have PrintPath just search this directory.
+# Use our PrintPath helper script using the "-p" option to
+# have PrintPath just search this directory.
-if [ "x$AP_PRINTPATH" = "x" ] ; then
- AP_PRINTPATH=PrintPath
-fi
-
-if ./$AP_PRINTPATH -s -p`pwd` $TARGET ; then
+if ./PrintPath -s -p`pwd` $TARGET ; then
exstat=0
fi
1.3 +2 -7 apache-1.3/src/helpers/findcpp.sh
Index: findcpp.sh
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/helpers/findcpp.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- findcpp.sh 1998/09/16 20:49:24 1.2
+++ findcpp.sh 1998/09/17 04:09:42 1.3
@@ -18,11 +18,6 @@
Syntax Error
EOF
-# default in case of problems
-if [ ".$AP_PRINTPATH" = . ]; then
- AP_PRINTPATH='PrintPath'
-fi
-
# some braindead systems have a CPP define for a directory :-(
if [ ".$CPP" != . ]; then
if [ -d "$CPP" ]; then
@@ -49,9 +44,9 @@
my_error=`grep -v '^ *+' conftest.out`
if [ ".$my_error" != . ]; then
# 3. try a standalone cpp command in $PATH and lib dirs
- CPP="`./helpers/$AP_PRINTPATH cpp`"
+ CPP="`./helpers/PrintPath cpp`"
if [ ".$CPP" = . ]; then
- CPP="`./helpers/$AP_PRINTPATH -p/lib:/usr/lib:/usr/local/lib
cpp`"
+ CPP="`./helpers/PrintPath -p/lib:/usr/lib:/usr/local/lib
cpp`"
fi
if [ ".$CPP" != . ]; then
(eval "$CPP conftest.c >/dev/null") 2>conftest.out