httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sas...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr configure.in
Date Sun, 30 Apr 2000 18:10:35 GMT
sascha      00/04/30 11:10:35

  Modified:    src/lib/apr configure.in
  Log:
  Add VPATH support to APR:
  
    If mm and vpath are enabled, we first prepare mm's home directory by
    populating it with some files from its source directory. After mm's
    Makefile is created, we add -I$(srcdir) -I. to CFLAGS, and delete a
    dependency line (causes problems with BSD makes).
  
    If vpath is enabled, we prepend a header to each Makefile, consisting of
    srcdir and VPATH. Then we substitute -I$(INCDIRn) with -I$(INCDIRn)
    -I($srcdir)/$(INCDIRn).
  
  Additionally, we try to preserve the modification time of apr.h and
  apr_private.h to avoid unnecessary rebuilds of APR.
  
  Revision  Changes    Path
  1.77      +72 -2     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.76
  retrieving revision 1.77
  diff -u -u -r1.76 -r1.77
  --- configure.in	2000/04/29 23:41:09	1.76
  +++ configure.in	2000/04/30 18:10:35	1.77
  @@ -15,6 +15,14 @@
   dnl # Some initial steps for configuration.  We setup the default directory
   dnl # and which files are to be configured.
   
  +dnl Absolute source/build directory
  +abs_srcdir=`(cd $srcdir && pwd)`
  +abs_builddir=`pwd`
  +
  +if test "$abs_builddir" != "$abs_srcdir"; then
  +  USE_VPATH=1
  +fi
  +
   # These added to allow default directories to be used...
   DEFAULT_OSDIR="unix"
   echo "(Default will be ${DEFAULT_OSDIR})"
  @@ -433,6 +441,8 @@
   # run the MM config script regardless of whether we are going to use
   # it or not.  When we have a much better idea of who is using MM, we can
   # run this on a more conditional basis.
  +USE_MM=yes
  +mm_dir=shmem/unix/mm
   AC_CONFIG_SUBDIRS($config_subdirs)
   
   AC_MSG_CHECKING(Checking for Shared memory support)
  @@ -512,6 +522,16 @@
   
   AC_SUBST(have_in_addr)
   
  +dnl #----------------------------- Prepare mm directory for VPATH support
  +if test -n "$USE_MM" && test -n "$USE_VPATH"; then
  +  test -d $mm_dir || mkdir -p $mm_dir
  +
  +  for i in shtool config.guess config.sub fbtool ltconfig \
  +           ltmain.sh mm_vers.c; do
  +    test -r $mm_dir/$i || ln -s $abs_srcdir/$mm_dir/$i $mm_dir/$i
  +  done
  +fi
  +
   dnl #----------------------------- Construct the files
   AC_SUBST(LDLIBS)
   AC_SUBST(OPTIM)
  @@ -528,7 +548,8 @@
   SUBDIRS="lib "
   for dir in $MODULES
   do
  -    if test -f $dir/$OSDIR/Makefile.in; then
  +    test -d $dir || mkdir -p $dir
  +    if test -f $srcdir/$dir/$OSDIR/Makefile.in; then
           MAKEFILE2="$MAKEFILE2 $dir/$OSDIR/Makefile "
           SUBDIRS="$SUBDIRS $dir/$OSDIR "
       else
  @@ -544,6 +565,55 @@
   if test -n "$CPPFLAGS"; then
     CFLAGS="$CFLAGS $CPPFLAGS"
   fi
  +
  +SAVE_FILES="include/apr.h include/apr_private.h"
  +
  +for i in $SAVE_FILES; do
  +  test -r $i && mv $i $i.save
  +done
   
  -AC_OUTPUT($MAKEFILE1 $MAKEFILE2 $MAKEFILE3 include/apr.h)
  +AC_OUTPUT($MAKEFILE1 $MAKEFILE2 $MAKEFILE3 include/apr.h,[
  +
  +SAVE_FILES="include/apr.h include/apr_private.h"
  +
  +for i in $SAVE_FILES; do
  +  if cmp -s $i $i.save 2>/dev/null; then
  +    mv $i.save $i
  +    AC_MSG_RESULT($i is unchanged)
  +  fi
  +  rm -f $i.save
  +done
  +
  +])
  +
  +dnl #----------------------------- Fixup Makefiles for VPATH support
  +
  +changequote({,})
  +
  +if test -n "$USE_VPATH"; then
  +  if test -n "$USE_MM"; then
  +    MAKEFILE3="$MAKEFILE3 $mm_dir/Makefile"
  +  fi
  +  for makefile in $MAKEFILE1 $MAKEFILE2 $MAKEFILE3; do
  +    dir=`echo $makefile|sed 's%[^/][^/]*$%%'`
  +    (cat <<EOF
  +srcdir = $abs_srcdir/$dir
  +VPATH  = $abs_srcdir/$dir
  +
  +EOF
  +)    |  cat - $makefile | \
  +        sed -e 's#-I\($(INCDIR[0-9]*)\)#-I\1 -I$(srcdir)/\1#g' > tmp
  +    cp tmp $makefile
  +  done
  +  if test -n "$USE_MM"; then
  +    cat $mm_dir/Makefile | \
  +       sed \
  +       -e 's#\($(CFLAGS)\)#\1 -I$(srcdir) -I.#' \
  +       -e '/mm_global\.c/d' \
  +       > tmp
  +    cp tmp $mm_dir/Makefile
  +  fi
  +  rm -f tmp
  +fi
   
  +changequote([,])
  
  
  

Mime
View raw message