rse         98/05/29 13:45:54

  Modified:    .        configure
               src      CHANGES
  Log:
  Avoid problems with braindead Awks by additionally searching for gawk
  and nawk in APACI's configure script.
  
  Submitted by: Dave Dykstra <[EMAIL PROTECTED]> and Ralf S. Engelschall
  Reviewed by: Ralf S. Engelschall
  PR: 2319
  
  Revision  Changes    Path
  1.30      +25 -3     apache-1.3/configure
  
  Index: configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/configure,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- configure 1998/05/29 20:41:57     1.29
  +++ configure 1998/05/29 20:45:52     1.30
  @@ -134,6 +134,28 @@
   PERL="`echo $PERL | sed -e 's://:/:'`"
   
   ##
  +##  look for the best Awk we can find because some
  +##  standard Awks are really braindead and cause 
  +##  problems for our scripts under some platforms.
  +##
  +
  +AWK=awk
  +OIFS="$IFS" IFS=':'
  +for dir in $PATH; do
  +    OIFS2="$IFS" IFS="$DIFS"
  +    if [ -x "$dir/nawk" ]; then
  +        AWK="$dir/nawk"
  +        break 2
  +    fi
  +    if [ -x "$dir/gawk" ]; then
  +        AWK="$dir/gawk"
  +        break 2
  +    fi
  +    IFS="$OIFS2"
  +done
  +IFS="$OIFS"
  +
  +##
   ##  determine default parameters
   ##
   
  @@ -267,7 +289,7 @@
               ;;
           --shadow)
               #   determine GNU platform triple
  -            gnutriple=`$aux/GuessOS | awk '{ printf("%s",$1); }' | sed -e 
's:/:-:g'`
  +            gnutriple=`$aux/GuessOS | $AWK '{ printf("%s",$1); }' | sed -e 
's:/:-:g'`
               #   create Makefile wrapper (the first time only)
               if [ ".`ls $top/src.* 2>/dev/null`" = . ]; then
                   if [ .$quiet = .no ]; then
  @@ -277,7 +299,7 @@
                   echo "##  Apache Makefile (shadow wrapper)" >> Makefile
                   echo "##" >> Makefile
                   echo "" >> Makefile
  -                echo "GNUTRIPLE=\`$aux/GuessOS | awk '{ 
printf(\"%s\",\$\$1); }' | sed -e 's:/:-:g'\`" >> Makefile
  +                echo "GNUTRIPLE=\`$aux/GuessOS | $AWK '{ 
printf(\"%s\",\$\$1); }' | sed -e 's:/:-:g'\`" >> Makefile
                   echo "" >> Makefile
                   echo "all build install install-quiet clean distclean:" >> 
Makefile
                   echo "       @\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) 
\$@" >> Makefile
  @@ -936,7 +958,7 @@
   
   #   split sedsubst into chunks of 50 commands
   #   to workaround limits in braindead seds
  -files=`awk <$sedsubst '
  +files=`$AWK <$sedsubst '
       BEGIN { line=0; cnt=0; }
       {
           if (line % 50 == 0) {
  
  
  
  1.878     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.877
  retrieving revision 1.878
  diff -u -r1.877 -r1.878
  --- CHANGES   1998/05/29 18:20:34     1.877
  +++ CHANGES   1998/05/29 20:45:53     1.878
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b8
   
  +  *) Avoid problems with braindead Awks by additionally searching for gawk 
  +     and nawk in APACI's configure script.
  +     [Dave Dykstra <[EMAIL PROTECTED]>, Ralf S. Engelschall] PR#2319
  +
     *) Rename md5.h to ap_md5.h to avoid conflicts with native MD5 on
        some systems. [Randy Terbush]
   
  
  
  

Reply via email to