httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2 acinclude.m4 configure.ac
Date Thu, 10 Jun 2004 03:17:43 GMT
joes        2004/06/09 20:17:43

  Modified:    .        acinclude.m4 configure.ac
  Log:
  Add config.nice support by copying the relevant m4 macros from apr's build/apr_common.m4
file.
  
  Revision  Changes    Path
  1.18      +78 -0     httpd-apreq-2/acinclude.m4
  
  Index: acinclude.m4
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/acinclude.m4,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- acinclude.m4	16 Apr 2004 13:20:51 -0000	1.17
  +++ acinclude.m4	10 Jun 2004 03:17:43 -0000	1.18
  @@ -168,3 +168,81 @@
       done
     fi
   ])
  +
  +dnl Iteratively interpolate the contents of the second argument
  +dnl until interpolation offers no new result. Then assign the
  +dnl final result to $1.
  +dnl
  +dnl Example:
  +dnl
  +dnl foo=1
  +dnl bar='${foo}/2'
  +dnl baz='${bar}/3'
  +dnl APR_EXPAND_VAR(fraz, $baz)
  +dnl   $fraz is now "1/2/3"
  +dnl 
  +AC_DEFUN(APR_EXPAND_VAR,[
  +ap_last=
  +ap_cur="$2"
  +while test "x${ap_cur}" != "x${ap_last}";
  +do
  +  ap_last="${ap_cur}"
  +  ap_cur=`eval "echo ${ap_cur}"`
  +done
  +$1="${ap_cur}"
  +])
  +
  +
  +dnl APR_CONFIG_NICE(filename)
  +dnl
  +dnl Saves a snapshot of the configure command-line for later reuse
  +dnl
  +AC_DEFUN(APR_CONFIG_NICE,[
  +  rm -f $1
  +  cat >$1<<EOF
  +#! /bin/sh
  +#
  +# Created by configure
  +
  +EOF
  +  if test -n "$CC"; then
  +    echo "CC=\"$CC\"; export CC" >> $1
  +  fi
  +  if test -n "$CFLAGS"; then
  +    echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
  +  fi
  +  if test -n "$CPPFLAGS"; then
  +    echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
  +  fi
  +  if test -n "$LDFLAGS"; then
  +    echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
  +  fi
  +  if test -n "$LTFLAGS"; then
  +    echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
  +  fi
  +  if test -n "$LIBS"; then
  +    echo "LIBS=\"$LIBS\"; export LIBS" >> $1
  +  fi
  +  if test -n "$INCLUDES"; then
  +    echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
  +  fi
  +  if test -n "$NOTEST_CFLAGS"; then
  +    echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
  +  fi
  +  if test -n "$NOTEST_CPPFLAGS"; then
  +    echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
  +  fi
  +  if test -n "$NOTEST_LDFLAGS"; then
  +    echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
  +  fi
  +  if test -n "$NOTEST_LIBS"; then
  +    echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
  +  fi
  +
  +  for arg in [$]0 "[$]@"; do
  +    APR_EXPAND_VAR(arg, $arg)
  +    echo "\"[$]arg\" \\" >> $1
  +  done
  +  echo '"[$]@"' >> $1
  +  chmod +x $1
  +])dnl
  
  
  
  1.16      +3 -0      httpd-apreq-2/configure.ac
  
  Index: configure.ac
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/configure.ac,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- configure.ac	16 Apr 2004 13:20:51 -0000	1.15
  +++ configure.ac	10 Jun 2004 03:17:43 -0000	1.16
  @@ -2,6 +2,9 @@
   
   AC_PREREQ(2.53)
   AC_INIT(libapreq - Apache Request Library, 2.03-dev, apreq-dev@httpd.apache.org, libapreq2)
  +dnl Generate config.nice script- macro must be here at the top
  +dnl to avoid corruption of $0 and $@.
  +APR_CONFIG_NICE(config.nice)
   
   dnl this:
   dnl AC_CONFIG_AUX_DIR(build)
  
  
  

Mime
View raw message