--- apache_1.3.33/src/Configure.orig 2006-01-16 06:45:59.000000000 +0100 +++ apache_1.3.33/src/Configure 2006-01-16 06:48:28.000000000 +0100 @@ -76,7 +76,7 @@ ## Now see if Configuration.tmpl is more recent than $file. If ## so, then we complain and bail out ## -if ls -lt $file Configuration.tmpl | head -1 | \ +if ls -lt $file Configuration.tmpl | head -n 1 | \ grep 'Configuration.tmpl' > /dev/null then echo "Configuration.tmpl is more recent than $file;" @@ -901,7 +901,7 @@ # # If $TCC is null, then no such line exists in Configuration # -TCC=`egrep '^CC=' Makefile.config | tail -1 | awk -F= '{print $2}'` +TCC=`egrep '^CC=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` if [ "x$TCC" = "x" ]; then if [ "x$CC" = "x" ]; then # At this point, CC is not set in Configuration or above, so we @@ -941,7 +941,7 @@ #################################################################### ## Now check how we can _directly_ run the C pre-processor ## -TCPP=`egrep '^CPP=' Makefile.config | tail -1 | awk -F= '{print $2}'` +TCPP=`egrep '^CPP=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` if [ "x$TCPP" != "x" ]; then CPP=`CPP="$TCPP"; export CPP CC; ./helpers/findcpp.sh` else @@ -1008,18 +1008,18 @@ #################################################################### ## Look for OPTIM and save for later ## -TOPTIM=`egrep '^OPTIM=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TRANLIB=`egrep '^RANLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TTARGET=`egrep '^TARGET=' Makefile.config | tail -1 | awk -F= '{print $2}'` +TOPTIM=`egrep '^OPTIM=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TRANLIB=`egrep '^RANLIB=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TTARGET=`egrep '^TARGET=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` #################################################################### ## Check for user provided flags for shared object support ## -TLD_SHLIB=`egrep '^LD_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TLDFLAGS_SHLIB=`egrep '^LDFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TLDFLAGS_MOD_SHLIB=`egrep '^LDFLAGS_MOD_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TLDFLAGS_SHLIB_EXPORT=`egrep '^LDFLAGS_SHLIB_EXPORT=' Makefile.config | tail -1 | awk -F= '{print $2}'` -TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'` +TLD_SHLIB=`egrep '^LD_SHLIB=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TLDFLAGS_SHLIB=`egrep '^LDFLAGS_SHLIB=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TLDFLAGS_MOD_SHLIB=`egrep '^LDFLAGS_MOD_SHLIB=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TLDFLAGS_SHLIB_EXPORT=`egrep '^LDFLAGS_SHLIB_EXPORT=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` +TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -n 1 | awk -F= '{print $2}'` #################################################################### ## Handle TARGET name @@ -1804,7 +1804,7 @@ if [ -f $modbase.c ] ; then # Guess module structure name in case there is no # module definition in this file - modname=`egrep '^module .*;' $modbase.c | head -1 |\ + modname=`egrep '^module .*;' $modbase.c | head -n 1 |\ sed 's/^module.*[ ][ ]*//' | \ sed 's/[ ]*;[ ]*$//'` # Get any module definition part @@ -2338,7 +2338,7 @@ ## ap_config_auto.h so they are available to external modules needing to ## include Apache header files. ## -TEXTRA_CFLAGS=`egrep '^EXTRA_CFLAGS=' Makefile.config | tail -1 |\ +TEXTRA_CFLAGS=`egrep '^EXTRA_CFLAGS=' Makefile.config | tail -n 1 |\ sed -e 's;^EXTRA_CFLAGS=;;' -e 's;\`.*\`;;'` tmpstr=`echo $CFLAGS $TEXTRA_CFLAGS |\ sed -e 's;[ ]\([+-]\);!\1;g' -e 's/\([^\\\]\)"/\1/g' -e 's/\\\"/\"/g'`