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/build/rpm apr-util.spec.in
Date Tue, 10 Aug 2004 03:45:44 GMT
jerenkrantz    2004/08/09 20:45:44

  Modified:    .        .cvsignore CHANGES Makefile.in apu-config.in
                        configure.in
               build    apu-conf.m4 find_apu.m4
               build/rpm apr-util.spec.in
  Log:
  Only install apu-$MAJOR-config and add appropriate detection code to
  find_apu.m4 (APU_FIND_APU).
  
  (Justin made a few tpyo fixes and added the autoconf-2.13 required changes.)
  
  Submitted by:	Max Bowsher <maxb ukf.net>
  Reviewed by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.25      +1 -0      apr-util/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/apr-util/.cvsignore,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -u -r1.24 -r1.25
  --- .cvsignore	30 Jul 2004 19:37:22 -0000	1.24
  +++ .cvsignore	10 Aug 2004 03:45:43 -0000	1.25
  @@ -14,6 +14,7 @@
   export_vars.[ch]
   export_vars.sh
   apu-config
  +apu-*-config
   apu-config.out
   Debug
   Release
  
  
  
  1.137     +3 -0      apr-util/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr-util/CHANGES,v
  retrieving revision 1.136
  retrieving revision 1.137
  diff -u -u -r1.136 -r1.137
  --- CHANGES	3 Aug 2004 23:03:12 -0000	1.136
  +++ CHANGES	10 Aug 2004 03:45:43 -0000	1.137
  @@ -1,5 +1,8 @@
   Changes with APR-util 1.0
   
  +  *) Only install apu-$MAJOR-config and add appropriate detection code to
  +     find_apu.m4 (APU_FIND_APU).  [Max Bowsher <maxb ukf.net>]
  +
     *) Overhaul support for LDAP URL parsing. Instead of using incompatible
        URL parsers and memory that needs freeing, apr-util provides a parser
        which parses the URL and allocates memory from a pool. [Graham Leggett]
  
  
  
  1.96      +4 -5      apr-util/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/Makefile.in,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -u -r1.95 -r1.96
  --- Makefile.in	1 Jul 2004 14:37:45 -0000	1.95
  +++ Makefile.in	10 Aug 2004 03:45:43 -0000	1.96
  @@ -33,7 +33,7 @@
   DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
   	include/private/apu_config.h include/private/apu_private.h \
   	include/private/apu_select_dbm.h include/apr_ldap.h include/apu.h \
  -	export_vars.sh apu-config build/rules.mk include/apu_want.h \
  +	export_vars.sh $(APU_CONFIG) build/rules.mk include/apu_want.h \
   	apr-util.pc
   EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in \
   	exports.c build-outputs.mk \
  @@ -49,8 +49,8 @@
   top_blddir=@abs_builddir@
   
   # Create apu-config script suitable for the install tree
  -apu-config.out: apu-config
  -	sed 's,^\(location=\).*$$,\1installed,' < apu-config > $@
  +apu-config.out: $(APU_CONFIG)
  +	sed 's,^\(location=\).*$$,\1installed,' < $(APU_CONFIG) > $@
   
   install: $(TARGET_LIB) apu-config.out
   	if [ ! -d $(DESTDIR)$(includedir) ]; then \
  @@ -76,9 +76,8 @@
   	if [ ! -d $(DESTDIR)$(bindir) ]; then \
   		$(APR_MKDIR) $(DESTDIR)$(bindir); \
   	fi;
  -	$(LIBTOOL) --mode=install cp apu-config.out $(DESTDIR)$(bindir)/apu-config
   	$(LIBTOOL) --mode=install cp apu-config.out $(DESTDIR)$(bindir)/$(APU_CONFIG)
  -	chmod 755 $(DESTDIR)$(bindir)/apu-config $(DESTDIR)$(bindir)/$(APU_CONFIG)
  +	chmod 755 $(DESTDIR)$(bindir)/$(APU_CONFIG)
   
   $(TARGET_LIB): $(OBJECTS)
   	$(LINK) @lib_target@ $(ALL_LIBS) $(EXTRA_OS_LINK)
  
  
  
  1.37      +3 -3      apr-util/apu-config.in
  
  Index: apu-config.in
  ===================================================================
  RCS file: /home/cvs/apr-util/apu-config.in,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -u -r1.36 -r1.37
  --- apu-config.in	14 Jun 2004 15:43:40 -0000	1.36
  +++ apu-config.in	10 Aug 2004 03:45:43 -0000	1.37
  @@ -43,7 +43,7 @@
   show_usage()
   {
       cat << EOF
  -Usage: apu-config [OPTION]
  +Usage: apu-$APRUTIL_MAJOR_VERSION-config [OPTION]
   
   Known values for OPTION are:
     --prefix[=DIR]    change prefix to DIR
  @@ -62,9 +62,9 @@
     --help            print this help
   
   When linking with libtool, an application should do something like:
  -  APU_LIBS="\`apu-config --link-libtool --libs\`"
  +  APU_LIBS="\`apu-$APRUTIL_MAJOR_VERSION-config --link-libtool --libs\`"
   or when linking directly:
  -  APU_LIBS="\`apu-config --link-ld --libs\`"
  +  APU_LIBS="\`apu-$APRUTIL_MAJOR_VERSION-config --link-ld --libs\`"
   
   An application should use the results of --includes, and --ldflags in
   their build process.
  
  
  
  1.77      +4 -2      apr-util/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr-util/configure.in,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -u -r1.76 -r1.77
  --- configure.in	14 Jun 2004 15:43:40 -0000	1.76
  +++ configure.in	10 Aug 2004 03:45:43 -0000	1.77
  @@ -199,7 +199,7 @@
   MAKEFILES="Makefile $test_Makefile"
   AC_OUTPUT([
       export_vars.sh
  -    apu-config
  +    apu-$APRUTIL_MAJOR_VERSION-config:apu-config.in
       apr-util.pc
       include/private/apu_select_dbm.h
       include/apr_ldap.h
  @@ -207,5 +207,7 @@
       include/apu_want.h
       $MAKEFILES
   	],[
  -chmod +x apu-config
  +chmod +x apu-$APRUTIL_MAJOR_VERSION-config
  +],[
  +APRUTIL_MAJOR_VERSION=$APRUTIL_MAJOR_VERSION
   ])
  
  
  
  1.62      +1 -1      apr-util/build/apu-conf.m4
  
  Index: apu-conf.m4
  ===================================================================
  RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -u -r1.61 -r1.62
  --- apu-conf.m4	30 Jun 2004 15:14:00 -0000	1.61
  +++ apu-conf.m4	10 Aug 2004 03:45:43 -0000	1.62
  @@ -8,7 +8,7 @@
   AC_DEFUN(APU_FIND_APR,[
   
     dnl use the find_apr.m4 script to locate APR. sets apr_found and apr_config
  -  APR_FIND_APR
  +  APR_FIND_APR(,,,[1])
     if test "$apr_found" = "no"; then
       AC_MSG_ERROR(APR could not be located. Please use the --with-apr option.)
     fi
  
  
  
  1.8       +95 -36    apr-util/build/find_apu.m4
  
  Index: find_apu.m4
  ===================================================================
  RCS file: /home/cvs/apr-util/build/find_apu.m4,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- find_apu.m4	5 Nov 2002 22:13:42 -0000	1.7
  +++ find_apu.m4	10 Aug 2004 03:45:43 -0000	1.8
  @@ -6,14 +6,22 @@
   dnl embedding APU into the application source, or locating an installed
   dnl copy of APU.
   dnl
  -dnl APR_FIND_APU([srcdir, path, implicit-install-check])
  +dnl APR_FIND_APU(srcdir, builddir, implicit-install-check, acceptable-majors)
   dnl
   dnl   where srcdir is the location of the bundled APU source directory, or
   dnl   empty if source is not bundled.
  -dnl   where path is the prefix to the location where the bundled APU will
  -dnl   will be built.
  +dnl
  +dnl   where builddir is the location where the bundled APU will be built,
  +dnl   or empty if the build will occur in the srcdir.
  +dnl
   dnl   where implicit-install-check set to 1 indicates if there is no
  -dnl   --with-apr option specified, we will look for installed copies.
  +dnl   --with-apr-util option specified, we will look for installed copies.
  +dnl
  +dnl   where acceptable-majors is a space separated list of acceptable major
  +dnl   version numbers. Often only a single major version will be acceptable.
  +dnl   If multiple versions are specified, and --with-apr-util=PREFIX or the
  +dnl   implicit installed search are used, then the first (leftmost) version
  +dnl   in the list that is found will be used.  Currently defaults to [0 1].
   dnl
   dnl Sets the following variables on exit:
   dnl
  @@ -23,6 +31,9 @@
   dnl                apu_found is "reconfig", then the bundled directory
   dnl                should be reconfigured *before* using apu_config.
   dnl
  +dnl Note: this macro file assumes that apr-config has been installed; it
  +dnl       is normally considered a required part of an APR installation.
  +dnl
   dnl Note: At this time, we cannot find *both* a source dir and a build dir.
   dnl       If both are available, the build directory should be passed to
   dnl       the --with-apr-util switch.
  @@ -44,57 +55,105 @@
   AC_DEFUN(APR_FIND_APU, [
     apu_found="no"
   
  +  if test "$ac_cv_emxos2" = "yes"; then
  +    # Scripts don't pass test -x on OS/2
  +    TEST_X="test -f"
  +  else
  +    TEST_X="test -x"
  +  fi
  +
  +  ifelse([$4], [],
  +  [
  +    ifdef(AC_WARNING,([$0: missing argument 4 (acceptable-majors): Defaulting to APU 0.x
then APU 1.x]))
  +    acceptable_majors="0 1"
  +  ], [acceptable_majors="$4"])
  +
  +  apu_temp_acceptable_apu_config=""
  +  for apu_temp_major in $acceptable_majors
  +  do
  +    case $apu_temp_major in
  +      0)
  +      apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-config"
  +      ;;
  +      *)
  +      apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-$apu_temp_major-config"
  +      ;;
  +    esac
  +  done
  +
     AC_MSG_CHECKING(for APR-util)
     AC_ARG_WITH(apr-util,
  -  [  --with-apr-util=DIR     prefix for installed APU, or path to APU build tree],
  +  [  --with-apr-util=PATH    prefix for installed APU, path to APU build tree,
  +                          or the full path to apu-config],
     [
       if test "$withval" = "no" || test "$withval" = "yes"; then
  -      AC_MSG_ERROR([--with-apr-util requires a directory to be provided])
  +      AC_MSG_ERROR([--with-apr-util requires a directory or file to be provided])
       fi
   
  -    if test -x "$withval/bin/apu-config"; then
  -       apu_found="yes"
  -       apu_config="$withval/bin/apu-config"
  -    elif test -x "$withval/apu-config"; then
  -       dnl Already configured build dir
  -       apu_found="yes"
  -       apu_config="$withval/apu-config"
  -    elif test -x "$withval" && $withval --help > /dev/null 2>&1 ; then
  -       apu_found="yes"
  -       apu_config="$withval"
  +    for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
  +    do
  +      for lookdir in "$withval/bin" "$withval"
  +      do
  +        if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then
  +          apu_found="yes"
  +          apu_config="$lookdir/$apu_temp_apu_config_file"
  +          break 2
  +        fi
  +      done
  +    done
  +
  +    if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help
> /dev/null 2>&1 ; then
  +      apu_found="yes"
  +      apu_config="$withval"
       fi
   
  -    dnl if --with-apr-util is used, then the target prefix/directory must
  -    dnl be valid
  +    dnl if --with-apr-util is used, it is a fatal error for its argument
  +    dnl to be invalid
       if test "$apu_found" != "yes"; then
  -      AC_MSG_ERROR([
  -The directory given to --with-apr-util does not specify a prefix for an 
  -installed APU, nor an APR-util build directory.])
  +      AC_MSG_ERROR([the --with-apr-util parameter is incorrect. It must specify an install
prefix, a build directory, or an apu-config file.])
       fi
     ],[
       dnl if we have a bundled source directory, use it
       if test -d "$1"; then
  +      apu_temp_abs_srcdir="`cd $1 && pwd`"
         apu_found="reconfig"
  +      echo "sed -n '/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apu_version.h\""
  +      apu_bundled_major="`sed -n '/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p'
\"$1/include/apu_version.h\"`"
  +      case $apu_bundled_major in
  +        "")
  +          AC_MSG_ERROR([failed to find major version of bundled APU])
  +        ;;
  +        0)
  +          apu_temp_apu_config_file="apu-config"
  +        ;;
  +        *)
  +          apu_temp_apu_config_file="apu-$apu_bundled_major-config"
  +        ;;
  +      esac
         if test -n "$2"; then
  -        apu_config="$2/apu-config"
  +        apu_config="$2/$apu_temp_apu_config_file"
         else
  -        apu_config="$1/apu-config"
  +        apu_config="$1/$apu_temp_apu_config_file"
         fi
       fi
       if test "$apu_found" = "no" && test -n "$3" && test "$3" = "1"; then
  -      if apu-config --help > /dev/null 2>&1 ; then
  -        apu_found="yes"
  -        apu_config="apu-config"
  -      else
  -        dnl look in the some standard places (apparently not in builtin/default)
  -        for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
  -          if test -x "$lookdir/bin/apu-config"; then
  -            apu_found="yes"
  -            apu_config="$lookdir/bin/apu-config"
  -            break
  -          fi
  -        done
  -      fi
  +      for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config
  +      do
  +        if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then
  +          apu_found="yes"
  +          apu_config="$apu_temp_apu_config_file"
  +          break
  +        else
  +          dnl look in some standard places (apparently not in builtin/default)
  +          for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
  +            if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then
  +              apu_found="yes"
  +              apu_config="$lookdir/bin/$apu_temp_apu_config_file"
  +              break 2
  +            fi
  +          done
  +        fi
  +      done
       fi
     ])
   
  
  
  
  1.2       +0 -1      apr-util/build/rpm/apr-util.spec.in
  
  Index: apr-util.spec.in
  ===================================================================
  RCS file: /home/cvs/apr-util/build/rpm/apr-util.spec.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- apr-util.spec.in	1 Jul 2004 22:45:06 -0000	1.1
  +++ apr-util.spec.in	10 Aug 2004 03:45:43 -0000	1.2
  @@ -73,7 +73,6 @@
   
   %files devel
   %defattr(-,root,root,-)
  -%{_bindir}/apu-config
   %{_bindir}/apu-%{apuver}-config
   %{_libdir}/libaprutil-%{apuver}.*a
   %{_libdir}/libaprutil-%{apuver}.so
  
  
  

Mime
View raw message