You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <co...@decus.org> on 1997/07/14 13:55:27 UTC

[PATCH] to fix Configure's generation of support/Makefile

    PRs#666 (!) and #834 point out that the definitions of CC and OPTIM
    aren't being propagated to the support/Makefile being generated by
    Configure.  This is because Configure treats the src/Makefile
    specially, and doesn't extend the mantle of specialness to other
    files.  Makefile.config is used as the basis for both, but the CC
    and OPTIM settings are only explicitly added to src/Makefile.

    The attached patch addresses this by putting them into the
    generated Makefile.config file so they'll appear everywhere.

    #ken    :-)}

Index: Configure
===================================================================
RCS file: /export/home/cvs/apache/src/Configure,v
retrieving revision 1.108
diff -c -r1.108 Configure
*** Configure	1997/07/14 10:20:00	1.108
--- Configure	1997/07/14 11:52:13
***************
*** 124,130 ****
  #
  # Now add Makefile additions and Rules
  #
! awk >>Makefile <$tmpfile '\
      BEGIN { print "# Makefile options inherited from Configure"; \
  	    print "###############"; \
  	  } \
--- 124,130 ----
  #
  # Now add Makefile additions and Rules
  #
! awk >Makefile.config <$tmpfile '\
      BEGIN { print "# Makefile options inherited from Configure"; \
  	    print "###############"; \
  	  } \
***************
*** 524,530 ****
  
  # Show the final values of the rules
  
! echo "###############" > Makefile.config
  echo "# Platform: $OS" >> Makefile.config
  echo "# Final Rules:" >> Makefile.config
  echo "#  Rule WANTHSREGEX=$RULE_WANTHSREGEX" >> Makefile.config
--- 524,530 ----
  
  # Show the final values of the rules
  
! echo "###############" >> Makefile.config
  echo "# Platform: $OS" >> Makefile.config
  echo "# Final Rules:" >> Makefile.config
  echo "#  Rule WANTHSREGEX=$RULE_WANTHSREGEX" >> Makefile.config
***************
*** 544,576 ****
  # then we use the "found" location of COMPILERS above
  # and set a "safe" optimization level
  #
! 
! if egrep "^CC[ 	]*=" Makefile > /dev/null; then
!     CC=""	# clear it just in case
! else
!     if [ "x$CC" = "x" ]; then
!     	if [ "x$COMPILER" = "x" ]; then
! 	    echo "Error: could not find any of these C compilers"
! 	    echo " anywhere in your PATH: $lookedfor"
! 	    echo "Configure terminated"
! 	    exit 1
! 	fi
! 	CC=$COMPILER
      fi
!     echo " + setting C compiler to $CC"
  fi
  
  #
  # Ditto for optimization
  #
! if  egrep "^OPTIM[ 	]*=" Makefile > /dev/null; then
!     OPTIM=""	# ditto
  else
!     if [ "x$OPTIM" = "x" ]; then
! 	OPTIM="-O2"
!     fi
!     echo " + setting C compiler optimization-level to $OPTIM"
  fi
  
  #
  # Are they using the status monitor module? If so, check
--- 544,571 ----
  # then we use the "found" location of COMPILERS above
  # and set a "safe" optimization level
  #
! TCC=`egrep '^CC[ 	]*=' Makefile.config | tail -1 | awk -F= '{print $2}'`
! if [ "x$CC" = "x" ]; then
!     if [ "x$COMPILER" = "x" ]; then
! 	echo "Error: could not find any of these C compilers"
! 	echo " anywhere in your PATH: $lookedfor"
! 	echo "Configure terminated"
! 	exit 1
      fi
!     CC=$COMPILER
  fi
+ echo " + setting C compiler to $CC"
  
  #
  # Ditto for optimization
  #
! TOPTIM=`egrep '^OPTIM[ 	]*=' Makefile.config | tail -1 | awk -F= '{print $2}'`
! if [ "x$TOPTIM" = "x" ]; then
!     OPTIM="-O2"
  else
!     OPTIM=$TOPTIM
  fi
+ echo " + setting C compiler optimization-level to $OPTIM"
  
  #
  # Are they using the status monitor module? If so, check
***************
*** 620,630 ****
  #
  # Good enough
  #
  echo  >> Makefile
! if [ "x$CC" != "x" ]; then
      echo "CC=$CC" >> Makefile.config
  fi
! if [ "x$OPTIM" != "x" ]; then
      echo "OPTIM=$OPTIM" >> Makefile.config
  fi
  echo "CFLAGS1=$CFLAGS">> Makefile.config
--- 615,628 ----
  #
  # Good enough
  #
+ # Add the CC and OPTIM values if they weren't specified in the
+ # Configuration file and we had to calculate them.
+ #
  echo  >> Makefile
! if [ "x$TCC" = "x" ]; then
      echo "CC=$CC" >> Makefile.config
  fi
! if [ "x$TOPTIM" = "x" ]; then
      echo "OPTIM=$OPTIM" >> Makefile.config
  fi
  echo "CFLAGS1=$CFLAGS">> Makefile.config