You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@locus.apache.org on 2000/05/03 02:00:55 UTC

cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

jim         00/05/02 17:00:55

  Modified:    src/lib/apr aclocal.m4 configure.in
  Added:       src/lib/apr hints.m4
  Log:
  Initial hack of the Apache/APR "hints" file, which uses information
  from the 1.3.x builds and "preloads" various compile-time ENV
  vars, such as CC, CFLAGS, LIBS, etc... with values.
  
  At present, the design is as follows:
  	o First of all, we only use these hints if they haven't already
  	  been set on the command line. For example:
  
  	   % CC=c89 ./configure
  
  	  will override the setting of CC in hints.m4. If this isn't
  	  correct for some platforms, we can use the APR_ADDTO macro
  	  instead.
  
  	o If we set them, we also export them... This makes the
  	  most sense at present, but we may rethink this. Methinks
  	  another macro?? :)
  
  	o In many cases, this is a straight grab from the 1.3.x
  	  tree.
  
  The hooks for Apache will come soon.
  
  Revision  Changes    Path
  1.12      +1 -0      apache-2.0/src/lib/apr/aclocal.m4
  
  Index: aclocal.m4
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/aclocal.m4,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- aclocal.m4	2000/04/06 02:28:29	1.11
  +++ aclocal.m4	2000/05/03 00:00:54	1.12
  @@ -197,3 +197,4 @@
   [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])
   
   sinclude(threads.m4)
  +sinclude(hints.m4)
  
  
  
  1.85      +3 -0      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- configure.in	2000/05/02 03:55:35	1.84
  +++ configure.in	2000/05/03 00:00:54	1.85
  @@ -15,6 +15,9 @@
   dnl # Some initial steps for configuration.  We setup the default directory
   dnl # and which files are to be configured.
   
  +dnl Preload
  +APR_PRELOAD
  +
   dnl Absolute source/build directory
   abs_srcdir=`(cd $srcdir && pwd)`
   abs_builddir=`pwd`
  
  
  
  1.1                  apache-2.0/src/lib/apr/hints.m4
  
  Index: hints.m4
  ===================================================================
  dnl
  dnl Apache and APR "hints" file
  dnl  We preload various configure settings depending
  dnl  on previously obtained platform knowledge.
  dnl  We allow all settings to be overridden from
  dnl  the command-line.
  dnl
  
  dnl
  dnl APR_SETIFNULL(variable, value)
  dnl
  dnl Set variable iff it's currently null
  dnl
  AC_DEFUN(APR_SETIFNULL,[
    if test -z "$$1"; then
      $1="$2$3$4$5$6$7$8$9"; export $1
    fi
  ])
  
  dnl
  dnl APR_ADDTO(variable, value)
  dnl
  dnl Add value to variable
  dnl
  AC_DEFUN(APR_ADDTO,[
     $1="$$1 $2$3$4$5$6$7$8$9"; export $1
  ])
  
  dnl
  dnl APR_PRELOAD
  dnl
  dnl Preload various ENV/makefile paramsm such as CC, CFLAGS, etc
  dnl based on outside knowledge
  AC_DEFUN(APR_PRELOAD, [
  echo "Applying hints file rules"
  PLAT=`$ac_config_guess`
  PLAT=`$ac_config_sub $PLAT`
  
  case "$PLAT" in
      *mint)
  	APR_SETIFNULL(CFLAGS, -DMINT)
  	APR_SETIFNULL(LIBS, -lportlib -lsocket)
  	;;
      *MPE/iX*)
  	APR_SETIFNULL(CFLAGS, -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE)
  	APR_SETIFNULL(LIBS, -lsocket -lsvipc -lcurses)
  	APR_SETIFNULL(LDFLAGS, -Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\")
  	APR_SETIFNULL(CAT, /bin/cat)
  	;;
      *-apple-aux3*)
  	APR_SETIFNULL(CFLAGS, -DAUX3 -D_POSIX_SOURCE)
  	APR_SETIFNULL(LIBS, -lposix -lbsd)
  	APR_SETIFNULL(LDFLAGS, -s)
  	;;
      i386-ibm-aix*)
  	APR_SETIFNULL(CFLAGS, -DAIX=1 -U__STR__ -DUSEBCOPY)
  	;;
      *-ibm-aix[1-2].*)
  	APR_SETIFNULL(CFLAGS, -DAIX=1 -DNEED_RLIM_T -U__STR__)
  	;;
      *-ibm-aix3.*)
  	APR_SETIFNULL(CFLAGS, -DAIX=30 -DNEED_RLIM_T -U__STR__)
  	;;
      *-ibm-aix4.1)
  	APR_SETIFNULL(CFLAGS, -DAIX=41 -DNEED_RLIM_T -U__STR__)
  	;;
      *-ibm-aix4.2)
  	APR_SETIFNULL(CFLAGS, -DAIX=42 -U__STR__)
  	APR_SETIFNULL(LDFLAGS, -lm)
  	;;
      *-ibm-aix4.3)
  	APR_SETIFNULL(CFLAGS, -DAIX=43 -U__STR__)
  	APR_SETIFNULL(LDFLAGS, -lm)
  	;;
      *-ibm-aix*)
  	APR_SETIFNULL(CFLAGS, -DAIX=1 -U__STR__)
  	APR_SETIFNULL(LDFLAGS, -lm)
  	;;
      *-apollo-*)
  	APR_SETIFNULL(CFLAGS, -DAPOLLO)
  	;;
      *-dg-dgux*)
  	APR_SETIFNULL(CFLAGS, -DDGUX)
  	;;
      *OS/2*)
  	APR_SETIFNULL(CFLAGS, -DOS2 -DTCPIPV4 -g -Zmt)
  	APR_SETIFNULL(LDFLAGS, -Zexe -Zmtd -Zsysv-signals -Zbin-files)
  	APR_SETIFNULL(LIBS, -lsocket -lufc -lbsd)
  	APR_SETIFNULL(SHELL, sh)
  	;;
      *-hi-hiux)
  	APR_SETIFNULL(CFLAGS, -DHIUX)
  	;;
      *-hp-hpux11.*)
  	APR_SETIFNULL(CFLAGS, -DHPUX11)
  	APR_SETIFNULL(LIBS, -lm -lpthread)
  	;;
      *-hp-hpux10.*)
  	APR_SETIFNULL(CFLAGS, -DHPUX10)
   	case $PLAT in
   	  *-hp-hpux10.01)
  dnl	       # We know this is a problem in 10.01.
  dnl	       # Not a problem in 10.20.  Otherwise, who knows?
  	       APR_ADDTO(CFLAGS, -DSELECT_NEEDS_CAST)
  	       ;;	     
   	esac
  	;;
      *-hp-hpux*)
  	APR_SETIFNULL(CFLAGS, -DHPUX)
  	APR_SETIFNULL(LIBS, -lm)
  	;;
      *-linux2)
  	APR_SETIFNULL(CFLAGS, -DLINUX=2)
  	APR_SETIFNULL(LIBS, -lm)
  	;;
      *-GNU*)
  	APR_SETIFNULL(CFLAGS, -DHURD)
  	APR_SETIFNULL(LIBS, -lm -lcrypt)
  	;;
      *-linux1)
  	APR_SETIFNULL(CFLAGS, -DLINUX=1)
  	;;
      *-lynx-lynxos)
  	APR_SETIFNULL(CFLAGS, -D__NO_INCLUDE_WARN__ -DLYNXOS)
  	APR_SETIFNULL(LIBS, -lbsd -lcrypt)
  	;;
      *486-*-bsdi*)
  	APR_SETIFNULL(CFLAGS, -m486)
  	;;
      *-netbsd*)
  	APR_SETIFNULL(CFLAGS, -DNETBSD)
  	APR_SETIFNULL(LIBS, -lcrypt)
  	;;
      *-freebsd*)
  	case $PLAT in
  	    *freebsd[2345]*)
  		APR_SETIFNULL(CFLAGS, -funsigned-char)
  		;;
  	esac
  	APR_SETIFNULL(LIBS, -lcrypt)
  	;;
      *-next-nextstep*)
  	APR_SETIFNULL(OPTIM, -O)
  	APR_SETIFNULL(CFLAGS, -DNEXT)
  	;;
      *-next-openstep*)
  	APR_SETIFNULL(CC, cc)
  	APR_SETIFNULL(OPTIM, -O)
  	APR_SETIFNULL(CFLAGS, -DNEXT)
  	;;
  dnl    *-apple-rhapsody*)
  dnl	APR_SETIFNULL(CFLAGS, -DDARWIN -DMAC_OS_X_SERVER)
  dnl	;;
      *-apple-darwin*)
  	APR_SETIFNULL(CFLAGS, -DDARWIN)
  	;;
      *-dec-osf*)
  	APR_SETIFNULL(CFLAGS, -DOSF1)
  	APR_SETIFNULL(LIBS, -lm)
  	;;
      *-qnx)
  	APR_SETIFNULL(CFLAGS, -DQNX)
  	APR_SETIFNULL(LIBS, -N128k -lsocket -lunix)
  	;;
      *-qnx32)
          APR_SETIFNULL(CC, cc -F)
  	APR_SETIFNULL(CFLAGS, -DQNX -mf -3)
  	APR_SETIFNULL(LIBS, -N128k -lsocket -lunix)
  	;;
      *-isc4*)
  	APR_SETIFNULL(CC, gcc)
  	APR_SETIFNULL(CFLAGS, -posix -DISC)
  	APR_SETIFNULL(LDFLAGS, -posix)
  	APR_SETIFNULL(LIBS, -linet)
  	;;
      *-sco3*)
  	APR_SETIFNULL(CFLAGS, -DSCO -Oacgiltz)
  	APR_SETIFNULL(LIBS, -lPW -lsocket -lmalloc -lcrypt_i)
  	;;
      *-sco5*)
  	APR_SETIFNULL(CFLAGS, -DSCO5)
  	APR_SETIFNULL(LIBS, -lsocket -lmalloc -lprot -ltinfo -lx -lm)
  	;;
      *-sco_sv*|*-SCO_SV*)
  	APR_SETIFNULL(CFLAGS, -DSCO)
  	APR_SETIFNULL(LIBS, -lPW -lsocket -lmalloc -lcrypt_i)
  	;;
      *-solaris2*)
      	PLATOSVERS=`echo $PLAT | sed 's/^.*solaris2.//'`
  	APR_SETIFNULL(CFLAGS, -DSOLARIS2=$PLATOSVERS)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl)
  	;;
      *-sunos4*)
  	APR_SETIFNULL(CFLAGS, -DSUNOS4 -DUSEBCOPY)
  	;;
      *-unixware1)
  	APR_SETIFNULL(CFLAGS, -DUW=100)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lcrypt)
  	;;
      *-unixware2)
  	APR_SETIFNULL(CFLAGS, -DUW=200)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lcrypt -lgen)
  	;;
      *-unixware211)
  	APR_SETIFNULL(CFLAGS, -DUW=211)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lcrypt -lgen)
  	;;
      *-unixware212)
  	APR_SETIFNULL(CFLAGS, -DUW=212)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lcrypt -lgen)
  	;;
      *-unixware7)
  	APR_SETIFNULL(CFLAGS, -DUW=700)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lcrypt -lgen)
  	;;
      maxion-*-sysv4*)
  	APR_SETIFNULL(CFLAGS, -DSVR4)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc -lgen)
  	;;
      *-*-powermax*)
  	APR_SETIFNULL(CFLAGS, -DSVR4)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lgen)
  	;;
      TPF)
         APR_SETIFNULL(CC, c89)
         APR_SETIFNULL(CFLAGS, -DTPF -DCHARSET_EBCDIC -D_POSIX_SOURCE)
         ;;
      BS2000*-siemens-sysv4*)
  	APR_SETIFNULL(CC, c89 -XLLML -XLLMK -XL -Kno_integer_overflow)
  	APR_SETIFNULL(CFLAGS, -DCHARSET_EBCDIC -DSVR4 -D_XPG_IV)
  	;;
      *-siemens-sysv4*)
  	APR_SETIFNULL(CFLAGS, -DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT -DNEED_UNION_SEMUN)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      pyramid-pyramid-svr4)
  	APR_SETIFNULL(CFLAGS, -DSVR4 -DNO_LONG_DOUBLE)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      DS/90\ 7000-*-sysv4*)
  	APR_SETIFNULL(CFLAGS, -DUXPDS)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl)
  	;;
      *-tandem-sysv4*)
  	APR_SETIFNULL(CFLAGS, -DSVR4)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl)
  	;;
      *-ncr-sysv4)
  	APR_SETIFNULL(CFLAGS, -DSVR4 -DMPRAS)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc -L/usr/ucblib -lucb)
  	;;
      *-sysv4*)
  	APR_SETIFNULL(CFLAGS, -DSVR4)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      88k-encore-sysv4)
  	APR_SETIFNULL(CFLAGS, -DSVR4 -DENCORE)
  	APR_SETIFNULL(LIBS, -lPW)
  	;;
      *-uts*)
  	PLATOSVERS=`echo $PLAT | sed 's/^.*,//'`
  	case $PLATOSVERS in
  	    2*) APR_SETIFNULL(CFLAGS, -Xa -eft -DUTS21 -DUSEBCOPY)
  	        APR_SETIFNULL(LIBS, -lsocket -lbsd -la)
  	        ;;
  	    *)  APR_SETIFNULL(CFLAGS, -Xa -DSVR4)
  	        APR_SETIFNULL(LIBS, -lsocket -lnsl)
  	        ;;
  	esac
  	;;
      *-ultrix)
  	APR_SETIFNULL(CFLAGS=-DULTRIX)
  	APR_SETIFNULL(SHELL=/bin/sh5)
  	;;
      *powerpc-tenon-machten*)
  	APR_SETIFNULL(LDFLAGS, -Xlstack=0x14000 -Xldelcsect)
  	;;
      *-machten*)
  	APR_SETIFNULL(LDFLAGS, -stack 0x14000)
  	;;
      *convex-v11*)
  	APR_SETIFNULL(CFLAGS, -ext -DCONVEXOS11)
  	APR_SETIFNULL(OPTIM, -O1)
  	APR_SETIFNULL(CC, cc)
  	;;
      i860-intel-osf1)
  	APR_SETIFNULL(CFLAGS, -DPARAGON)
  	;;
      *-sequent-ptx2.*.*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=20 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -linet -lnsl -lc -lseq)
  	;;
      *-sequent-ptx4.0.*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=40 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -linet -lnsl -lc)
  	;;
      *-sequent-ptx4.[123].*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=41 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      *-sequent-ptx4.4.*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=44 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      *-sequent-ptx4.5.*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=45 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      *-sequent-ptx5.0.*)
  	APR_SETIFNULL(CFLAGS, -DSEQUENT=50 -Wc,-pw)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc)
  	;;
      *NEWS-OS*)
  	APR_SETIFNULL(CFLAGS, -DNEWSOS)
  	;;
      *-riscix)
  	APR_SETIFNULL(CFLAGS, -DRISCIX)
  	APR_SETIFNULL(OPTIM, -O)
  	APR_SETIFNULL(MAKE, make)
  	;;
      *-BeOS*)
  	APR_SETIFNULL(CFLAGS, -DBEOS)
  	;;
      4850-*.*)
  	APR_SETIFNULL(CFLAGS, -DSVR4 -DMPRAS)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc -L/usr/ucblib -lucb)
  	;;
      drs6000*)
  	APR_SETIFNULL(CFLAGS, -DSVR4)
  	APR_SETIFNULL(LIBS, -lsocket -lnsl -lc -L/usr/ucblib -lucb)
  	;;
      m88k-*-CX/SX|CYBER)
  	APR_SETIFNULL(CFLAGS, -D_CX_SX -Xa)
  	APR_SETIFNULL(CC, cc)
  	;;
      *-tandem-oss)
  	APR_SETIFNULL(CFLAGS=-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1)
  	APR_SETIFNULL(CC, c89)
  	;;
      *-IBM-OS390*)
         APR_SETIFNULL(CC, c89)
         APR_SETIFNULL(CFLAGS, -DOS390 -DCHARSET_EBCDIC -D_ALL_SOURCE)
         ;;
  esac
  ])
  
  
  

Re: cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

Posted by Sascha Schumann <sa...@schumann.cx>.
On Tue, May 02, 2000 at 09:21:34PM -0400, Jim Jagielski wrote:
> Manoj Kasichainula wrote:
> > 
> > On Wed, May 03, 2000 at 02:41:41AM +0200, Sascha Schumann wrote:
> > > Can we please cutdown this file to what we *cannot* find out
> > > using feature checks. 90% of the entries seem to be perfect
> > > candidates for feature checks (if it is not already covered by a
> > > feature check).
> > 
> > +1. It will be a painful process, though, because it's not documented
> > anywhere which hints were determined through painful experience.
> > 
> 
> I agree that when all is said and done, hints.m4 will be much smaller.
> So as we know the current autoconf is picking the right stuff for
> Foobar, for example, we can trim what we don't need from hints.m4.
> All we can say is that these _are_ what worked for 1.3. It's
> a start, nothing more.

I completely agree here.

> But this also allows us to, for example, preselect the right MPM
> for a particular OS. For example, right now if the OS doesn't support
> threads, configure dies and says "try --with-mpm=prefork" but that's
> bogus. If we know a platform doesn't support threads, we should
> automagically default to it.

"Check for features, not operating systems."

No POSIX threads? Default to prefork. 

- Sascha

Re: cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

Posted by Sascha Schumann <sa...@schumann.cx>.
On Tue, May 02, 2000 at 06:13:50PM -0700, Manoj Kasichainula wrote:
> On Wed, May 03, 2000 at 02:41:41AM +0200, Sascha Schumann wrote:
> > Can we please cutdown this file to what we *cannot* find out
> > using feature checks. 90% of the entries seem to be perfect
> > candidates for feature checks (if it is not already covered by a
> > feature check).
> 
> +1. It will be a painful process, though, because it's not documented
> anywhere which hints were determined through painful experience.

Well, there are some goodies in there, but there is also lots of
crap from 1.3. After removing some of the latter, we get this:

$ wc hints*
    241     526    5717 hints.m4
    345     736    8536 hints.m4~

> My idea originally was to just let the people doing the porting for
> each platform rederive these values (using the 1.3 ap_config.h as a
> guide). 

Let's take the pearls and throw away the rest.

- Sascha

Re: cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

Posted by Manoj Kasichainula <ma...@collab.net>.
On Wed, May 03, 2000 at 02:41:41AM +0200, Sascha Schumann wrote:
> Can we please cutdown this file to what we *cannot* find out
> using feature checks. 90% of the entries seem to be perfect
> candidates for feature checks (if it is not already covered by a
> feature check).

+1. It will be a painful process, though, because it's not documented
anywhere which hints were determined through painful experience.

My idea originally was to just let the people doing the porting for
each platform rederive these values (using the 1.3 ap_config.h as a
guide). 

Re: cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

Posted by Sascha Schumann <sa...@schumann.cx>.
>   	o In many cases, this is a straight grab from the 1.3.x
>   	  tree.

Can we please cutdown this file to what we *cannot* find out
using feature checks. 90% of the entries seem to be perfect
candidates for feature checks (if it is not already covered by a
feature check).

There are also some broken entries, like linking always against
libpthread.

- Sascha

Re: cvs commit: apache-2.0/src/lib/apr hints.m4 aclocal.m4 configure.in

Posted by Sascha Schumann <sa...@schumann.cx>.
>   	o In many cases, this is a straight grab from the 1.3.x
>   	  tree.

Can we please cutdown this file to what we *cannot* find out
using feature checks. 90% of the entries seem to be perfect
candidates for feature checks (if it is not already covered by a
feature check).

There are also some broken entries, like linking always against
libpthread.

- Sascha