jim         99/01/15 12:32:54

  Modified:    src      Configure
  Log:
  Found my old System 7 shell book... Looks like this "." vs "x" stuff
  isn't needed at all, as long as we wrap both sides in "". So, instead
  we'll use
  
        "$VAR" = ""
           or
        "$VAR" = "value"
  
  and this make it crystal clear.
  
  Revision  Changes    Path
  1.323     +40 -40    apache-1.3/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.322
  retrieving revision 1.323
  diff -u -r1.322 -r1.323
  --- Configure 1999/01/10 07:48:57     1.322
  +++ Configure 1999/01/15 20:32:53     1.323
  @@ -82,8 +82,8 @@
   ## Now handle any arguments, which, for now, is -file
   ## to select an alternate Configuration file
   ##
  -while [ "x$1" != "x" ]; do
  -  if [ "x$1" = "x-file" ] ; then
  +while [ "$1" != "" ]; do
  +  if [ "$1" = "-file" ] ; then
       shift 1; file=$1; shift 1
       if [ ! -r $file ]; then
         echo "$file does not exist or is not readable."
  @@ -143,7 +143,7 @@
   using_shlib=`grep  '^SharedModule' $tmpfile >/dev/null && echo 1`
   
   # But perhaps later via apxs when just mod_so is compiled in!
  -if [ "x$using_shlib" = "x" ]; then
  +if [ "$using_shlib" = "" ]; then
       using_shlib=`grep  '^AddModule modules/standard/mod_so.o' $tmpfile 
>/dev/null && echo 1`
   fi
   
  @@ -757,7 +757,7 @@
   ####################################################################
   ## set this if we haven't
   ##
  -if [ "x${MAKE}" = "x" ]; then
  +if [ "${MAKE}" = "" ]; then
       MAKE='make'; export MAKE
   fi
   
  @@ -780,7 +780,7 @@
   ## And adjust/override WANTHSREGEX as needed
   ##
   if [ "$RULE_WANTHSREGEX" = "default" ]; then
  -     if [ "x$DEF_WANTHSREGEX" = "x" ]; then
  +     if [ "$DEF_WANTHSREGEX" = "" ]; then
                RULE_WANTHSREGEX=yes
        else
                RULE_WANTHSREGEX=$DEF_WANTHSREGEX
  @@ -801,8 +801,8 @@
   # If $TCC is null, then no such line exists in Configuration
   #
   TCC=`egrep '^CC=' Makefile.config | tail -1 | awk -F= '{print $2}'`
  -if [ "x$TCC" = "x" ]; then
  -    if [ "x$CC" = "x" ]; then
  +if [ "$TCC" = "" ]; then
  +    if [ "$CC" = "" ]; then
        # At this point, CC is not set in Configuration or above, so we
        # try to find one
        for compilers in "gcc" "cc" "acc" "c89"
  @@ -813,7 +813,7 @@
                break
            fi
        done
  -     if [ "x$COMPILER" = "x" ]; then
  +     if [ "$COMPILER" = "" ]; then
            echo "Error: could not find any of these C compilers"
            echo " anywhere in your PATH: $lookedfor"
            echo "Configure terminated"
  @@ -831,7 +831,7 @@
   ## If there was an entry for it, then set $CC for our own internal
   ## use.
   ##
  -if [ "x$TCC" = "x" ]; then
  +if [ "$TCC" = "" ]; then
       echo "CC=$CC" >> Makefile.config
   else
       CC=$TCC
  @@ -841,12 +841,12 @@
   ## Now check how we can _directly_ run the C pre-processor
   ##
   TCPP=`egrep '^CPP=' Makefile.config | tail -1 | awk -F= '{print $2}'`
  -if [ "x$TCPP" != "x" ]; then
  +if [ "$TCPP" != "" ]; then
       CPP=`CC=$CC CPP=$TCPP ./helpers/findcpp.sh`
   else
       CPP=`CC=$CC ./helpers/findcpp.sh`
   fi
  -if [ "x$TCPP" = "x" ]; then
  +if [ "$TCPP" = "" ]; then
       echo "CPP=$CPP" >> Makefile.config
   fi 
   echo " + setting C pre-processor to $CPP"
  @@ -912,13 +912,13 @@
   ####################################################################
   ## Handle TARGET name
   ##
  -if [ "x$TTARGET" = "x" ]; then
  +if [ "$TTARGET" = "" ]; then
       TARGET=httpd
       echo "TARGET=$TARGET" >> Makefile.config
   else
       TARGET=$TTARGET
   fi
  -if [ "x$TARGET" != "xhttpd" ]; then
  +if [ "$TARGET" != "httpd" ]; then
       echo " + using custom target name: $TARGET"
       CFLAGS="$CFLAGS -DTARGET=\\\"$TARGET\\\""
   fi
  @@ -927,7 +927,7 @@
   ## We adjust now CFLAGS_SHLIB, LDFLAGS_SHLIB and LDFLAGS_SHLIB_EXPORT as
   ## required.  For more platforms just add the required lines below.
   ##
  -if [ "x$using_shlib" = "x1" ] ; then
  +if [ "$using_shlib" = "1" ] ; then
       LD_SHLIB="ld"
       DEF_SHARED_CORE=no
       DEF_SHARED_CHAIN=no
  @@ -956,7 +956,7 @@
            CFLAGS_SHLIB="-fpic"
            LDFLAGS_SHLIB="-Bshareable"
            OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo 
aout` 
  -         if [ "x$OBJFORMAT" = "xelf" ]; then
  +         if [ "$OBJFORMAT" = "elf" ]; then
                LDFLAGS_SHLIB_EXPORT="-Wl,-E"
                SHLIB_SUFFIX_DEPTH=0
            else
  @@ -1170,9 +1170,9 @@
                    break
                fi
            done
  -         if [ "x$PERL" != "x" ]; then
  +         if [ "$PERL" != "" ]; then
                #   cool, Perl is installed on this platform...
  -             if [ "x`$PERL -V:dlsrc 2>/dev/null | grep dlopen`" != "x" ]; 
then
  +             if [ "`$PERL -V:dlsrc 2>/dev/null | grep dlopen`" != "" ]; then
                    #   ...and actually uses the dlopen-style interface,
                    #   so we can guess the flags from its knowledge
                    CFLAGS_SHLIB="`$PERL -V:cccdlflags | cut -d\' -f2`"
  @@ -1203,9 +1203,9 @@
   ## Check if we really have some information to compile
   ## the shared objects if SharedModule was used.
   ##
  -if [ "x$using_shlib" = "x1" ] ; then
  -    if [ "x$TCFLAGS_SHLIB"  = "x" -a "x$CFLAGS_SHLIB"  = "x"  -a \
  -      "x$TLDFLAGS_SHLIB" = "x" -a "x$LDFLAGS_SHLIB" = "x" ]; then
  +if [ "$using_shlib" = "1" ] ; then
  +    if [ "$TCFLAGS_SHLIB"  = "" -a "$CFLAGS_SHLIB"  = ""  -a \
  +      "$TLDFLAGS_SHLIB" = "" -a "$LDFLAGS_SHLIB" = "" ]; then
        echo ""
        echo "** FAILURE: Sorry, no shared object support available."
        echo "** Either compile all modules statically (use AddModule instead"
  @@ -1285,15 +1285,15 @@
   ####################################################################
   ## OK, now we can write OPTIM
   ##
  -if [ "x$TOPTIM" = "x" ]; then
  +if [ "$TOPTIM" = "" ]; then
       echo "OPTIM=$OPTIM" >> Makefile.config
   fi
   
   ####################################################################
   ## OK, now handle RANLIB
   ##
  -if [ "x$RANLIB" = "x" ]; then
  -    if [ "x$TRANLIB" != "x" ]; then
  +if [ "$RANLIB" = "" ]; then
  +    if [ "$TRANLIB" != "" ]; then
        RANLIB=$TRANLIB
       else
        if ./helpers/PrintPath -s ranlib; then
  @@ -1338,7 +1338,7 @@
       CFLAGS="$CFLAGS -DSOCKS -DSOCKS4"
       CFLAGS="$CFLAGS -Dconnect=Rconnect -Dselect=Rselect"
       CFLAGS="$CFLAGS -Dgethostbyname=Rgethostbyname"
  -    if [ "x`egrep '^EXTRA_L' Makefile.config | grep lsocks`" = "x" ]; then
  +    if [ "`egrep '^EXTRA_L' Makefile.config | grep lsocks`" = "" ]; then
        LIBS="$LIBS -L/usr/local/lib -lsocks"
       fi
       case $PLAT in
  @@ -1357,7 +1357,7 @@
       CFLAGS="$CFLAGS -DSOCKS -DSOCKS5"
       CFLAGS="$CFLAGS -Dconnect=SOCKSconnect -Dselect=SOCKSselect"
       CFLAGS="$CFLAGS -Dgethostbyname=SOCKSgethostbyname -Dclose=SOCKSclose"
  -    if [ "x`egrep '^EXTRA_L' Makefile.config | grep lsocks5`" = "x" ]; then
  +    if [ "`egrep '^EXTRA_L' Makefile.config | grep lsocks5`" = "" ]; then
        LIBS="$LIBS -L/usr/local/lib -lsocks5"
       fi
       case $PLAT in
  @@ -1464,9 +1464,9 @@
   
        ext=`echo $modfile | sed 's/^.*\.//'`
        modbase=`echo $modfile | sed 's/\.[^.]*$//'`
  -     if [ "x$ext" = "x$modfile" ]; then ext=o; modbase=$modfile; 
modfile=$modbase.o; fi
  -     if [ "x$ext" = "x" ] ; then ext=o; modbase=$modfile; fi
  -     if [ "x$ext" = "xc" ] ; then ext=o; fi
  +     if [ "$ext" = "$modfile" ]; then ext=o; modbase=$modfile; 
modfile=$modbase.o; fi
  +     if [ "$ext" = "" ] ; then ext=o; modbase=$modfile; fi
  +     if [ "$ext" = "c" ] ; then ext=o; fi
   
        # modbase is the path+filename without extension, ext is the
        # extension given, or if none, o
  @@ -1505,7 +1505,7 @@
                    ext=o
                fi
        fi
  -     if [ "x$modname" = "x" ] ; then
  +     if [ "$modname" = "" ] ; then
                modname=`echo $modbase | sed 's/^.*\///' | \
                        sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
        fi
  @@ -1533,7 +1533,7 @@
   ## Now the SHARED_CHAIN stuff
   ##
   LIBS_SHLIB=''
  -if [ "x$using_shlib" = "x1" ] ; then
  +if [ "$using_shlib" = "1" ] ; then
       if [ "$RULE_SHARED_CHAIN" = "default" ] ; then
        RULE_SHARED_CHAIN=$DEF_SHARED_CHAIN
       fi
  @@ -1551,7 +1551,7 @@
   ####################################################################
   ## Now the SHARED_CORE stuff
   ##
  -if [ "x$using_shlib" = "x1" ] ; then
  +if [ "$using_shlib" = "1" ] ; then
       if [ "$RULE_SHARED_CORE" = "default" ] ; then
        RULE_SHARED_CORE=$DEF_SHARED_CORE
       fi
  @@ -1588,17 +1588,17 @@
   ## Set the value of the shared libary flags, if they aren't explicitly
   ## set in the configuration file
   ##
  -if [ "x$using_shlib" = "x1" ] ; then
  -    if [ "x$TCFLAGS_SHLIB" = "x" ]; then
  +if [ "$using_shlib" = "1" ] ; then
  +    if [ "$TCFLAGS_SHLIB" = "" ]; then
        echo "CFLAGS_SHLIB=$CFLAGS_SHLIB -DSHARED_MODULE" >> Makefile.config
       fi
  -    if [ "x$TLD_SHLIB" = "x" ]; then
  +    if [ "$TLD_SHLIB" = "" ]; then
        echo "LD_SHLIB=$LD_SHLIB" >> Makefile.config
       fi
  -    if [ "x$TLDFLAGS_SHLIB" = "x" ]; then
  +    if [ "$TLDFLAGS_SHLIB" = "" ]; then
        echo "LDFLAGS_SHLIB=$LDFLAGS_SHLIB" >> Makefile.config
       fi
  -    if [ "x$TLDFLAGS_SHLIB_EXPORT" = "x" ]; then
  +    if [ "$TLDFLAGS_SHLIB_EXPORT" = "" ]; then
        echo "LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" >> Makefile.config
       fi
   fi
  @@ -1752,7 +1752,7 @@
   ## it uses ugly looking built-in directory walk messages
   ## while we are already using our own messages
   ##
  -if [ "x`${MAKE} -v 2>/dev/null | grep 'GNU Make'`" = "x" ]; then
  +if [ "`${MAKE} -v 2>/dev/null | grep 'GNU Make'`" = "" ]; then
        MFLAGS_STATIC=
   else
        MFLAGS_STATIC=--no-print-directory
  @@ -1775,7 +1775,7 @@
   ## Some OS-related stuff for the DSO mechanism:
   ## Finding the vendor DSO functions
   ##
  -if [ "x$using_shlib" = "x1" ] ; then
  +if [ "$using_shlib" = "1" ] ; then
       DL_LIB=""
       case $PLAT in
        *-ibm-aix* )
  @@ -1800,7 +1800,7 @@
            fi
            ;;
       esac
  -    if [ "x$DL_LIB" != "x" ]; then
  +    if [ "$DL_LIB" != "" ]; then
        LIBS="$LIBS $DL_LIB"
        echo " + using $DL_LIB for vendor DSO support"
       fi
  @@ -1954,7 +1954,7 @@
                } 
                '`
            echo "OBJS=$OBJS" >> $moddir/Makefile
  -         if [ "x$OBJS" != "x" ]; then
  +         if [ "$OBJS" != "" ]; then
                echo "LIB=lib$basedir.a" >> $moddir/Makefile
            else
                #   essential!
  
  
  

Reply via email to