apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr-util/test Makefile.in
Date Tue, 14 May 2002 08:37:17 GMT
jerenkrantz    02/05/14 01:37:17

  Modified:    .        Makefile.in configure.in
               build    apu-conf.m4
               test     Makefile.in
  Log:
  Ensure that apu-config --libs does not print any libtool libraries.  PHP
  is specifically adversely affected by this since they refuse to compile
  modules with libtool, so we have to stop doing this.
  
  This require some internal reshuffling.  If Greg's suggestions to use
  libtool-1.4+ is accepted, then we are also in a position to easily turn on
  the dependency tracking code in libtool.
  
  - Add APRUTIL_LDFLAGS to Makefile
  - New variable APRUTIL_LIBS that replaces the old LIBS value - we should
    not be overriding the LIBS value.
  - Deprecate internal overrides of LIBS in favor of APRUTIL_LIBS
  - Fix GDBM so that it adds its -L value to LDFLAGS not to EXPORT_LIBS
  - Add expat_libtool, expat_ldflags output parameter from the expat
    detection code.  If the expat ostensibly has .la support, we want to use
    that over -L/-l combinations.  But, for export (APRUTIL_EXPORT_LIBS), we
    must provide -L/-l combinations.
      - expat_ldflags may only have -L<library path>
        (if using automated detection, we will not specifically not add
         -L/usr/lib because we know that's trouble.)
      - expat_libs may only have -l<library>
      - expat_libtool may be either the .la file path or it will end up
        being the concat of expat_ldflags and expat_libs if the found expat
        doesn't support libtool.
  - Rework test/Makefile so that it has a PROGRAM_DEPENDENCIES rather than
    the misnomer of LIBS.
  
  Revision  Changes    Path
  1.66      +2 -0      apr-util/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/Makefile.in,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Makefile.in	13 May 2002 08:59:39 -0000	1.65
  +++ Makefile.in	14 May 2002 08:37:17 -0000	1.66
  @@ -7,6 +7,8 @@
   VPATH = @srcdir@
   
   INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
  +APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@
  +APRUTIL_LIBS = @APRUTIL_LIBS@
   
   TARGET_LIB = libaprutil.la
   INSTALL_SUBDIRS = @APR_XML_DIR@
  
  
  
  1.50      +2 -2      apr-util/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr-util/configure.in,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- configure.in	14 May 2002 07:50:36 -0000	1.49
  +++ configure.in	14 May 2002 08:37:17 -0000	1.50
  @@ -84,14 +84,14 @@
   dnl
   dnl Prep all the flags and stuff for compilation and export to other builds
   dnl
  -APR_ADDTO(LIBS, [$APR_LIBS])
  +APR_ADDTO(APRUTIL_LIBS, [$APR_LIBS])
   
   AC_SUBST(APRUTIL_EXPORT_LIBS)
   AC_SUBST(APRUTIL_PRIV_INCLUDES)
   AC_SUBST(APRUTIL_INCLUDES)
   AC_SUBST(APRUTIL_LDFLAGS)
  +AC_SUBST(APRUTIL_LIBS)
   AC_SUBST(LDFLAGS)
  -APR_ADDTO(LIBS,[$APRUTIL_EXPORT_LIBS])
   
   dnl
   dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles
  
  
  
  1.40      +45 -15    apr-util/build/apu-conf.m4
  
  Index: apu-conf.m4
  ===================================================================
  RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- apu-conf.m4	14 May 2002 07:50:36 -0000	1.39
  +++ apu-conf.m4	14 May 2002 08:37:17 -0000	1.40
  @@ -219,7 +219,7 @@
           AC_MSG_CHECKING(checking for gdbm in $withval)
           AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
           if test "$apu_have_gdbm" != "0"; then
  -            APR_ADDTO(APRUTIL_EXPORT_LIBS, [-L$withval/lib])
  +            APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
               APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
           fi
       fi
  @@ -378,13 +378,13 @@
   dnl we know the library is there.
   if test "$apu_have_gdbm" = "1"; then
     APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lgdbm])
  -  APR_ADDTO(LIBS,[-lgdbm])
  +  APR_ADDTO(APRUTIL_LIBS,[-lgdbm])
   fi
   
   if test "$apu_db_version" != "0"; then
     if test -n "$apu_db_lib"; then
       APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l$apu_db_lib])
  -    APR_ADDTO(LIBS,[-l$apu_db_lib])
  +    APR_ADDTO(APRUTIL_LIBS,[-l$apu_db_lib])
     fi
   fi
   
  @@ -398,53 +398,67 @@
   AC_DEFUN(APU_TEST_EXPAT,[
     AC_MSG_CHECKING(for Expat in ifelse($2,,$1,$2))
   
  +  expat_libtool=""
  +
     if test -r "$1/lib/expat.h.in"; then
       dnl Expat 1.95.* distribution
       expat_include_dir="$1/lib"
  -    expat_libs="$1/lib/libexpat.la"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
  +    expat_libtool="$1/lib/libexpat.la"
     elif test -r "$1/include/expat.h" -a \
       -r "$1/lib/libexpat.la"; then
       dnl Expat 1.95.* installation (with libtool)
       expat_include_dir="$1/include"
  -    expat_libs="$1/lib/libexpat.la"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
  +    expat_libtool="$1/lib/libexpat.la"
     elif test -r "$1/include/expat.h" -a \
       -r "$1/lib/libexpat.a"; then
       dnl Expat 1.95.* installation (without libtool)
       dnl FreeBSD textproc/expat2
       expat_include_dir="$1/include"
  -    expat_libs="-L$1/lib -lexpat"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
     elif test -r "$1/xmlparse.h"; then
       dnl maybe an expat-lite. use this dir for both includes and libs
       expat_include_dir="$1"
  -    expat_libs="$1/libexpat.la"
  +    expat_ldflags="-L$1"
  +    expat_libs="-lexpat"
  +    expat_libtool="$1/libexpat.la"
       expat_old=yes
     elif test -r "$1/include/xmlparse.h" -a \
          -r "$1/lib/libexpat.a"; then
       dnl previously installed expat
       expat_include_dir="$1/include"
  -    expat_libs="-L$1/lib -lexpat"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
       expat_old=yes
     elif test -r "$1/include/xml/xmlparse.h" -a \
          -r "$1/lib/xml/libexpat.a"; then
       dnl previously installed expat
       expat_include_dir="$1/include/xml"
  -    expat_libs="-L$1/lib -lexpat"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
       expat_old=yes
     elif test -r "$1/include/xmltok/xmlparse.h"; then
       dnl Debian distribution
       expat_include_dir="$1/include/xmltok"
  -    expat_libs="-L$1/lib -lxmlparse -lxmltok"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lxmlparse -lxmltok"
       expat_old=yes
     elif test -r "$1/include/xml/xmlparse.h" -a \
          -r "$1/lib/libexpat.a"; then
       dnl FreeBSD textproc/expat package
       expat_include_dir="$1/include/xml"
  -    expat_libs="-L$1/lib -lexpat"
  +    expat_ldflags="-L$1/lib"
  +    expat_libs="-lexpat"
       expat_old=yes
     elif test -r "$1/xmlparse/xmlparse.h"; then
       dnl Expat 1.0 or 1.1 source directory
       expat_include_dir="$1/xmlparse"
  -    expat_libs="-L$1 -lexpat"
  +    expat_ldflags="-L$1"
  +    expat_libs="-lexpat"
       expat_old=yes
     fi
     dnl ### test for installed Expat 1.95.* distros
  @@ -482,6 +496,10 @@
     for d in /usr /usr/local xml/expat-cvs xml/expat $srcdir/xml/expat ; do
       APU_TEST_EXPAT($d)
       if test -n "$expat_include_dir"; then
  +      dnl For /usr installs of expat, we can't specify -L/usr/lib
  +      if test "$d" = "/usr"; then
  +        expat_ldflags=""
  +      fi
         break
       fi
     done
  @@ -490,6 +508,12 @@
     AC_MSG_ERROR([could not locate Expat. use --with-expat])
   fi
   
  +dnl If this expat doesn't use libtool natively, we'll mimic it for our
  +dnl dependency library generation.
  +if test -z "$expat_libtool"; then
  +  expat_libtool="$expat_ldflags $expat_libs" 
  +fi
  +
   if test -n "$expat_old"; then
     AC_DEFINE(APR_HAVE_OLD_EXPAT, 1, [define if Expat 1.0 or 1.1 was found])
   fi
  @@ -499,7 +523,9 @@
     bundled_subdir="`echo $expat_include_dir | sed -e 's%/lib%%'`"
     APR_SUBDIR_CONFIG($bundled_subdir)
     expat_include_dir=$top_builddir/$bundled_subdir/lib
  -  expat_libs=$top_builddir/$bundled_subdir/lib/libexpat.la
  +  expat_ldflags="-L$top_builddir/$bundled_subdir/lib"
  +  expat_libs="-lexpat"
  +  expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
     APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
   else
   if test "$expat_include_dir" = "$srcdir/xml/expat/include" -o "$expat_include_dir" = "$srcdir/xml/expat/lib";
then
  @@ -508,7 +534,9 @@
     bundled_subdir="xml/expat"
     APR_SUBDIR_CONFIG($bundled_subdir)
     expat_include_dir=$top_builddir/$bundled_subdir/lib
  -  expat_libs=$top_builddir/$bundled_subdir/lib/libexpat.la
  +  expat_ldflags="-L$top_builddir/$bundled_subdir/lib"
  +  expat_libs="-lexpat"
  +  expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
     APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
   fi
   fi
  @@ -522,6 +550,8 @@
     APR_ADDTO(APRUTIL_INCLUDES, [-I$expat_include_dir])
   fi
   APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libs])
  +APR_ADDTO(APRUTIL_LDFLAGS, [$expat_ldflags])
  +APR_ADDTO(APRUTIL_LIBS, [$expat_libtool])
   ])
   
   
  @@ -536,8 +566,8 @@
       AC_CHECK_LIB(${ldaplib}, ldap_init, 
         [
   dnl        APR_ADDTO(CPPFLAGS,[-DAPU_HAS_LDAP])
  -        APR_ADDTO(LIBS,[-l${ldaplib} ${extralib}])
           APR_ADDTO(APRUTIL_EXPORT_LIBS,[-l${ldaplib} ${extralib}])
  +        APR_ADDTO(APRUTIL_LIBS,[-l${ldaplib} ${extralib}])
           AC_CHECK_LIB(${ldaplib}, ldapssl_install_routines, apu_has_ldap_netscape_ssl="define",
, ${extralib})
           AC_CHECK_LIB(${ldaplib}, ldap_start_tls_s, apu_has_ldap_starttls="define", , ${extralib})
           apu_has_ldap="define";
  
  
  
  1.27      +7 -7      apr-util/test/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/test/Makefile.in,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Makefile.in	9 May 2002 16:35:59 -0000	1.26
  +++ Makefile.in	14 May 2002 08:37:17 -0000	1.27
  @@ -7,36 +7,36 @@
   
   # bring in rules.mk for standard functionality
   @INCLUDE_RULES@
  -LIBS = @APRUTIL_LDFLAGS@ @LIBS@
  +PROGRAM_DEPENDENCIES = @APRUTIL_LDFLAGS@ @APRUTIL_LIBS@
   
   test: $(PROGRAMS)
   
   testdbm_OBJECTS = testdbm.lo
   testdbm_LDADD =  ../libaprutil.la
   testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD)
  -	$(LINK) $(testdbm_OBJECTS) $(testdbm_LDADD) $(LIBS)
  +	$(LINK) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES)
   
   testdate_OBJECTS = testdate.lo
   testdate_LDADD =  ../libaprutil.la
   testdate: $(testdate_OBJECTS) $(testdate_LDADD)
  -	$(LINK) $(testdate_OBJECTS) $(testdate_LDADD) $(LIBS)
  +	$(LINK) $(testdate_OBJECTS) $(testdate_LDADD) $(PROGRAM_DEPENDENCIES)
   
   testxml_OBJECTS = testxml.lo
   testxml_LDADD =  ../libaprutil.la
   testxml: $(testxml_OBJECTS) $(testxml_LDADD)
  -	$(LINK) $(testxml_OBJECTS) $(testxml_LDADD) $(LIBS)
  +	$(LINK) $(testxml_OBJECTS) $(testxml_LDADD) $(PROGRAM_DEPENDENCIES)
   
   testmd4_OBJECTS = testmd4.lo
   testmd4_LDADD =  ../libaprutil.la
   testmd4: $(testmd4_OBJECTS) $(testmd4_LDADD)
  -	$(LINK) $(testmd4_OBJECTS) $(testmd4_LDADD) $(LIBS)
  +	$(LINK) $(testmd4_OBJECTS) $(testmd4_LDADD) $(PROGRAM_DEPENDENCIES)
   
   testrmm_OBJECTS = testrmm.lo
   testrmm_LDADD =  ../libaprutil.la
   testrmm: $(testrmm_OBJECTS) $(testrmm_LDADD)
  -	$(LINK) $(testrmm_OBJECTS) $(testrmm_LDADD) $(LIBS)
  +	$(LINK) $(testrmm_OBJECTS) $(testrmm_LDADD) $(PROGRAM_DEPENDENCIES)
   
   teststrmatch_OBJECTS = teststrmatch.lo
   teststrmatch_LDADD =  ../libaprutil.la
   teststrmatch: $(teststrmatch_OBJECTS) $(teststrmatch_LDADD)
  -	$(LINK) $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) $(LIBS)
  +	$(LINK) $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) $(PROGRAM_DEPENDENCIES)
  
  
  

Mime
View raw message