apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr/build apr_hints.m4
Date Sun, 05 Aug 2001 23:05:37 GMT
jerenkrantz    01/08/05 16:05:37

  Modified:    .        configure.in CHANGES
               build    apr_hints.m4
  Log:
  Move the required library autoconf checks before we do the first
  compilation test (threads).  This also removes the duplicate libraries
  in EXTRA_LIBS.
  
  Some OSes specified -lsocket and -lnsl in apr_hints.m4 and we'd detect
  it later on in the autoconf process (and add it to LIBS), but some
  systems need these for the threading libraries to properly link.  So, if
  we do it before our first test, we shouldn't need it to have them listed
  in our hints file.
  
  Revision  Changes    Path
  1.354     +9 -9      apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.353
  retrieving revision 1.354
  diff -u -r1.353 -r1.354
  --- configure.in	2001/08/02 19:51:57	1.353
  +++ configure.in	2001/08/05 23:05:37	1.354
  @@ -264,6 +264,15 @@
           ;;
   esac
   
  +dnl #----------------------------- Checks for Any required Libraries
  +AC_CHECK_LIB(nsl, gethostbyname)
  +AC_SEARCH_LIBS(gethostname, nsl)
  +AC_CHECK_LIB(socket, socket)
  +AC_SEARCH_LIBS(crypt, crypt ufc)
  +AC_CHECK_LIB(truerand, main)
  +AC_CHECK_LIB(iconv, iconv)
  +AC_CHECK_LIB(m, modf)
  +
   dnl #----------------------------- Checking for Threads
   echo $ac_n "${nl}Checking for Threads...${nl}"
   
  @@ -468,15 +477,6 @@
               ;;
       esac
   fi
  -
  -dnl #----------------------------- Checks for Any required Libraries
  -AC_CHECK_LIB(nsl,gethostbyname)
  -AC_SEARCH_LIBS(gethostname, nsl)
  -AC_CHECK_LIB(socket,socket)
  -AC_SEARCH_LIBS(crypt, crypt ufc)
  -AC_CHECK_LIB(truerand,main)
  -AC_CHECK_LIB(iconv,iconv)
  -AC_CHECK_LIB(m,modf)
   
   dnl #----------------------------- Checks for Any required Functions
   dnl Checks for library functions. (N.B. poll is further down)
  
  
  
  1.131     +3 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- CHANGES	2001/07/31 02:10:10	1.130
  +++ CHANGES	2001/08/05 23:05:37	1.131
  @@ -1,5 +1,8 @@
   Changes with APR b1  
   
  +  *) Detect required libraries first.  This minimizes the libraries
  +     needed in apr_hints.m4.  [Justin Erenkrantz]
  +
     *) Support the AIX, glibc2, and Solaris variants of gethostby{name|addr}_r.
        Use gethostbyaddr_r function when available.
        [Sterling Hughes <sterling@designmultimedia.com>]
  
  
  
  1.17      +29 -37    apr/build/apr_hints.m4
  
  Index: apr_hints.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_hints.m4,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- apr_hints.m4	2001/08/01 15:56:36	1.16
  +++ apr_hints.m4	2001/08/05 23:05:37	1.17
  @@ -29,11 +29,11 @@
     case "$host" in
       *mint)
   	APR_ADDTO(CPPFLAGS, [-DMINT])
  -	APR_ADDTO(LIBS, [-lportlib -lsocket])
  +	APR_ADDTO(LIBS, [-lportlib])
   	;;
       *MPE/iX*)
   	APR_ADDTO(CPPFLAGS, [-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE])
  -	APR_ADDTO(LIBS, [-lsocket -lsvipc -lcurses])
  +	APR_ADDTO(LIBS, [-lsvipc -lcurses])
   	APR_ADDTO(LDFLAGS, [-Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\"])
   	;;
       *-apple-aux3*)
  @@ -126,11 +126,10 @@
   	;;
       *-GNU*)
   	APR_ADDTO(CPPFLAGS, [-DHURD])
  -	APR_ADDTO(LIBS, [-lcrypt])
   	;;
       *-lynx-lynxos)
   	APR_ADDTO(CPPFLAGS, [-D__NO_INCLUDE_WARN__ -DLYNXOS])
  -	APR_ADDTO(LIBS, [-lbsd -lcrypt])
  +	APR_ADDTO(LIBS, [-lbsd])
   	;;
       *486-*-bsdi*)
   	APR_ADDTO(CFLAGS, [-m486])
  @@ -140,7 +139,6 @@
   	;;
       *-netbsd*)
   	APR_ADDTO(CPPFLAGS, [-DNETBSD])
  -	APR_ADDTO(LIBS, [-lcrypt])
   	;;
       *-freebsd*)
   	case $host in
  @@ -148,7 +146,6 @@
   		APR_ADDTO(CFLAGS, [-funsigned-char])
   		;;
   	esac
  -	APR_ADDTO(LIBS, [-lcrypt])
   	APR_SETIFNULL(enable_threads, [no])
   	APR_ADDTO(CPPFLAGS, [-D_REENTRANT -D_THREAD_SAFE])
   	;;
  @@ -172,13 +169,13 @@
   	;;
       *-qnx)
   	APR_ADDTO(CPPFLAGS, [-DQNX])
  -	APR_ADDTO(LIBS, [-N128k -lsocket -lunix])
  +	APR_ADDTO(LIBS, [-N128k -lunix])
   	;;
       *-qnx32)
           APR_SETVAR(CC, [cc -F])
   	APR_ADDTO(CPPFLAGS, [-DQNX])
   	APR_ADDTO(CFLAGS, [-mf -3])
  -	APR_ADDTO(LIBS, [-N128k -lsocket -lunix])
  +	APR_ADDTO(LIBS, [-N128k -lunix])
   	;;
       *-isc4*)
   	APR_SETVAR(CC, [gcc])
  @@ -189,20 +186,19 @@
       *-sco3*)
   	APR_ADDTO(CPPFLAGS, [-DSCO -D_REENTRANT])
   	APR_ADDTO(CFLAGS, [-Oacgiltz])
  -	APR_ADDTO(LIBS, [-lPW -lsocket -lmalloc -lcrypt_i])
  +	APR_ADDTO(LIBS, [-lPW -lmalloc _i])
   	;;
       *-sco5*)
   	APR_ADDTO(CPPFLAGS, [-DSCO5 -D_REENTRANT])
  -	APR_ADDTO(LIBS, [-lsocket -lmalloc -lprot -ltinfo -lx])
  +	APR_ADDTO(LIBS, [-lmalloc -lprot -ltinfo -lx])
   	;;
       *-sco_sv*|*-SCO_SV*)
   	APR_ADDTO(CPPFLAGS, [-DSCO -D_REENTRANT])
  -	APR_ADDTO(LIBS, [-lPW -lsocket -lmalloc -lcrypt_i])
  +	APR_ADDTO(LIBS, [-lPW -lmalloc _i])
   	;;
       *-solaris2*)
       	PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'`
   	APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl])
   	APR_SETIFNULL(apr_iconv_inbuf_const, [1])
   	;;
       *-sunos4*)
  @@ -210,31 +206,30 @@
   	;;
       *-unixware1)
   	APR_ADDTO(CPPFLAGS, [-DUW=100])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lcrypt])
   	;;
       *-unixware2)
   	APR_ADDTO(CPPFLAGS, [-DUW=200])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lcrypt -lgen])
  +	APR_ADDTO(LIBS, [-lgen])
   	;;
       *-unixware211)
   	APR_ADDTO(CPPFLAGS, [-DUW=211])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lcrypt -lgen])
  +	APR_ADDTO(LIBS, [-lgen])
   	;;
       *-unixware212)
   	APR_ADDTO(CPPFLAGS, [-DUW=212])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lcrypt -lgen])
  +	APR_ADDTO(LIBS, [-lgen])
   	;;
       *-unixware7)
   	APR_ADDTO(CPPFLAGS, [-DUW=700])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lcrypt -lgen])
  +	APR_ADDTO(LIBS, [-lgen])
   	;;
       maxion-*-sysv4*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc -lgen])
  +	APR_ADDTO(LIBS, [-lc -lgen])
   	;;
       *-*-powermax*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lgen])
  +	APR_ADDTO(LIBS, [-lgen])
   	;;
       TPF)
          APR_SETVAR(CC, [c89])
  @@ -246,27 +241,25 @@
   	;;
       *-siemens-sysv4*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4 -D_XPG_IV -DHAS_DLFCN -DUSE_MMAP_FILES -DUSE_SYSVSEM_SERIALIZED_ACCEPT
-DNEED_UNION_SEMUN])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       pyramid-pyramid-svr4)
   	APR_ADDTO(CPPFLAGS, [-DSVR4 -DNO_LONG_DOUBLE])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       DS/90\ 7000-*-sysv4*)
   	APR_ADDTO(CPPFLAGS, [-DUXPDS])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl])
   	;;
       *-tandem-sysv4*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl])
   	;;
       *-ncr-sysv4)
   	APR_ADDTO(CPPFLAGS, [-DSVR4 -DMPRAS])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc -L/usr/ucblib -lucb])
  +	APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
   	;;
       *-sysv4*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       88k-encore-sysv4)
   	APR_ADDTO(CPPFLAGS, [-DSVR4 -DENCORE])
  @@ -277,11 +270,10 @@
   	case $PLATOSVERS in
   	    2*) APR_ADDTO(CPPFLAGS, [-DUTS21 -DUSEBCOPY])
   	        APR_ADDTO(CFLAGS, [-Xa -eft])
  -	        APR_ADDTO(LIBS, [-lsocket -lbsd -la])
  +	        APR_ADDTO(LIBS, [-lbsd -la])
   	        ;;
   	    *)  APR_ADDTO(CPPFLAGS, [-DSVR4])
   	        APR_ADDTO(CFLAGS, [-Xa])
  -	        APR_ADDTO(LIBS, [-lsocket -lnsl])
   	        ;;
   	esac
   	;;
  @@ -307,32 +299,32 @@
       *-sequent-ptx2.*.*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=20])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -linet -lnsl -lc -lseq])
  +	APR_ADDTO(LIBS, [-linet -lc -lseq])
   	;;
       *-sequent-ptx4.0.*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=40])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -linet -lnsl -lc])
  +	APR_ADDTO(LIBS, [-linet -lc])
   	;;
       *-sequent-ptx4.[123].*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=41])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       *-sequent-ptx4.4.*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=44])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       *-sequent-ptx4.5.*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=45])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       *-sequent-ptx5.0.*)
   	APR_ADDTO(CPPFLAGS, [-DSEQUENT=50])
   	APR_ADDTO(CFLAGS, [-Wc,-pw])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc])
  +	APR_ADDTO(LIBS, [-lc])
   	;;
       *NEWS-OS*)
   	APR_ADDTO(CPPFLAGS, [-DNEWSOS])
  @@ -350,23 +342,23 @@
           case $PLATOSVERS in
               5.0.4)
                   APR_ADDTO(LDFLAGS, [-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind
-lsocket])
  -                APR_ADDTO(LIBS, [-lbind -lsocket -lbe -lroot])
  +                APR_ADDTO(LIBS, [-lbind -lbe -lroot])
                   APR_ADDTO(CPPFLAGS,[-DBONE7])
                   ;;
               5.1)
                   APR_ADDTO(LDFLAGS, [-L/boot/develop/lib/x86 -L/boot/beos/system/lib -lbind
-lsocket])
  -                APR_ADDTO(LIBS, [-lbind -lsocket -lbe -lroot])
  +                APR_ADDTO(LIBS, [-lbind -lbe -lroot])
                   ;;
   	esac
   	APR_ADDTO(CPPFLAGS, [-DSIGPROCMASK_SETS_THREAD_MASK -DAP_AUTH_DBM_USE_APR])
           ;;
       4850-*.*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4 -DMPRAS])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc -L/usr/ucblib -lucb])
  +	APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
   	;;
       drs6000*)
   	APR_ADDTO(CPPFLAGS, [-DSVR4])
  -	APR_ADDTO(LIBS, [-lsocket -lnsl -lc -L/usr/ucblib -lucb])
  +	APR_ADDTO(LIBS, [-lc -L/usr/ucblib -lucb])
   	;;
       m88k-*-CX/SX|CYBER)
   	APR_ADDTO(CPPFLAGS, [-D_CX_SX])
  
  
  

Mime
View raw message