You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2004/09/01 12:17:39 UTC

cvs commit: apr-util CHANGES configure.in Makefile.in .cvsignore apu-config.in

jorton      2004/09/01 03:17:39

  Modified:    .        Tag: APU_0_9_BRANCH CHANGES configure.in
                        Makefile.in .cvsignore apu-config.in
  Log:
  Backport from HEAD:
  
    Remove "location detection" from apu-config:
  
    * configure.in: Substitute APU_CONFIG_LOCATION as "build" or "source"
    appropriately.
  
    * apu-config.in: Set location to @APU_CONFIG_LOCATION@ rather than
    using fragile pwd/realpath guesswork.
  
    * Makefile.in (apu-config.out): New target.
    (install): Install apu-config.out instead of apu-config.
  
  PR: 8867 (episode two)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.117.2.11 +2 -2      apr-util/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr-util/CHANGES,v
  retrieving revision 1.117.2.10
  retrieving revision 1.117.2.11
  diff -d -w -u -r1.117.2.10 -r1.117.2.11
  --- CHANGES	30 Aug 2004 04:20:16 -0000	1.117.2.10
  +++ CHANGES	1 Sep 2004 10:17:39 -0000	1.117.2.11
  @@ -1,7 +1,7 @@
   Changes with APR-util 0.9.5
   
  -  *) If available, use 'readlink -f' to resolve symlinks in apu-config.
  -     [Justin Erenkrantz]
  +  *) Fix build issues in paths containing symlinks.  PR 8867.
  +     [Joe Orton]
   
     *) Fix corrupt output from the apr_xlate_* interfaces on AIX 4.x.
        [Joe Orton]
  
  
  
  1.70.2.2  +5 -0      apr-util/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr-util/configure.in,v
  retrieving revision 1.70.2.1
  retrieving revision 1.70.2.2
  diff -d -w -u -r1.70.2.1 -r1.70.2.2
  --- configure.in	7 Dec 2003 09:59:54 -0000	1.70.2.1
  +++ configure.in	1 Sep 2004 10:17:39 -0000	1.70.2.2
  @@ -28,7 +28,12 @@
   
   if test "$abs_builddir" != "$abs_srcdir"; then
     USE_VPATH=1
  +  APU_CONFIG_LOCATION=build
  +else
  +  APU_CONFIG_LOCATION=source
   fi
  +
  +AC_SUBST(APU_CONFIG_LOCATION)
   
   AC_CANONICAL_SYSTEM
   
  
  
  
  1.76.2.3  +6 -2      apr-util/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apr-util/Makefile.in,v
  retrieving revision 1.76.2.2
  retrieving revision 1.76.2.3
  diff -d -w -u -r1.76.2.2 -r1.76.2.3
  --- Makefile.in	16 Mar 2004 14:23:35 -0000	1.76.2.2
  +++ Makefile.in	1 Sep 2004 10:17:39 -0000	1.76.2.3
  @@ -25,7 +25,7 @@
   SUBDIRS = buckets crypto dbm encoding hooks ldap uri xml misc strmatch xlate
   CLEAN_SUBDIRS = test
   
  -CLEAN_TARGETS = exports.c export_vars.h aprutil.exp
  +CLEAN_TARGETS = exports.c export_vars.h aprutil.exp apu-config.out
   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 \
  @@ -52,6 +52,10 @@
   	    fi; \
   	fi
   
  +apu-config.out: apu-config
  +	sed 's,^\(location=\).*$$,\1installed,' < apu-config > $@
  +
  +install: $(TARGET_LIB) apu-config.out
   install: $(TARGET_LIB)
   	if [ ! -d $(DESTDIR)$(includedir) ]; then \
   	    @APR_SOURCE_DIR@/build/mkdir.sh $(DESTDIR)$(includedir); \
  @@ -72,7 +76,7 @@
   	if [ ! -d $(DESTDIR)$(bindir) ]; then \
   		@APR_SOURCE_DIR@/build/mkdir.sh $(DESTDIR)$(bindir); \
   	fi;
  -	$(LIBTOOL) --mode=install cp apu-config $(DESTDIR)$(bindir)
  +	$(LIBTOOL) --mode=install cp apu-config.out $(DESTDIR)$(bindir)/apu-config
   	chmod 755 $(DESTDIR)$(bindir)/apu-config
   
   $(TARGET_LIB):
  
  
  
  1.16.2.1  +1 -0      apr-util/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/apr-util/.cvsignore,v
  retrieving revision 1.16
  retrieving revision 1.16.2.1
  diff -d -w -u -r1.16 -r1.16.2.1
  --- .cvsignore	28 Sep 2002 04:19:33 -0000	1.16
  +++ .cvsignore	1 Sep 2004 10:17:39 -0000	1.16.2.1
  @@ -15,6 +15,7 @@
   export_vars.h
   export_vars.sh
   apu-config
  +apu-config.out
   Debug
   Release
   LibD
  
  
  
  1.34.2.3  +7 -36     apr-util/apu-config.in
  
  Index: apu-config.in
  ===================================================================
  RCS file: /home/cvs/apr-util/apu-config.in,v
  retrieving revision 1.34.2.2
  retrieving revision 1.34.2.3
  diff -d -w -u -r1.34.2.2 -r1.34.2.3
  --- apu-config.in	30 Aug 2004 04:20:16 -0000	1.34.2.2
  +++ apu-config.in	1 Sep 2004 10:17:39 -0000	1.34.2.3
  @@ -37,6 +37,9 @@
   APR_XML_EXPAT_OLD="@APR_XML_EXPAT_OLD@"
   APU_DB_VERSION="@apu_db_version@"
   
  +# NOTE: the following line is modified during 'make install': alter with care!
  +location=@APU_CONFIG_LOCATION@
  +
   show_usage()
   {
       cat << EOF
  @@ -73,38 +76,6 @@
       exit 1
   fi
   
  -thisdir="`dirname $0`"
  -thisdir="`cd $thisdir && pwd`"
  -if test -d $bindir; then
  -    tmpbindir="`cd $bindir && pwd`"
  -else
  -    tmpbindir=""
  -fi
  -# If we have the realpath program, use it to resolve symlinks.
  -# Otherwise, being in a symlinked dir may result in incorrect output.
  -REALPATH=
  -if test -x "`which realpath 2>/dev/null`"; then
  -  REALPATH=realpath
  -elif test -x "`which readlink 2>/dev/null`"; then
  -  REALPATH="readlink -f"
  -fi
  -if test -n "$REALPATH"; then
  -  thisdir="`$REALPATH $thisdir`"
  -  if test -d "$APU_SOURCE_DIR"; then
  -    APR_SOURCE_DIR="`$REALPATH $APU_SOURCE_DIR`"
  -  fi
  -  if test -n "$tmpbindir"; then
  -    tmpbindir="`$REALPATH $tmpbindir`"
  -  fi
  -fi
  -if test "$tmpbindir" = "$thisdir"; then
  -    location=installed
  -elif test "$APU_SOURCE_DIR" = "$thisdir"; then
  -    location=source
  -else
  -    location=build
  -fi
  -
   if test "$location" = "installed"; then
       LA_FILE="$libdir/lib${APRUTIL_LIBNAME}.la"
   
  @@ -112,7 +83,7 @@
       LDFLAGS=`echo "$LDFLAGS" | sed -e "s $APU_BUILD_DIR/xml/expat $prefix g"`
       INCLUDES=`echo "$INCLUDES" | sed -e "s $APU_BUILD_DIR/xml/expat $prefix g" -e "s -I$prefix/lib  g"`
   else
  -    LA_FILE="$thisdir/lib${APRUTIL_LIBNAME}.la"
  +    LA_FILE="$APU_BUILD_DIR/lib${APRUTIL_LIBNAME}.la"
   fi
   
   flags=""
  @@ -147,7 +118,7 @@
           flags="$APU_SOURCE_DIR/include"
       else
           # this is for VPATH builds
  -        flags="$thisdir/include $APU_SOURCE_DIR/include"
  +        flags="$APU_BUILD_DIR/include $APU_SOURCE_DIR/include"
       fi
       echo $flags
       exit 0
  @@ -159,7 +130,7 @@
           flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES"
       else
           # this is for VPATH builds
  -        flags="$flags -I$thisdir/include -I$APU_SOURCE_DIR/include $INCLUDES"
  +        flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES"
       fi
       ;;
       --ldflags)
  @@ -178,7 +149,7 @@
           ### avoid using -L if libdir is a "standard" location like /usr/lib
           flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
       else
  -        flags="$flags -L$thisdir -l$APRUTIL_LIBNAME"
  +        flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
       fi
       ;;
       --link-libtool)