Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 59417 invoked by uid 500); 9 May 2000 01:40:18 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 59393 invoked by uid 500); 9 May 2000 01:40:16 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 9 May 2000 01:40:16 -0000 Message-ID: <20000509014016.59389.qmail@locus.apache.org> From: jim@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/lib/apr hints.m4 jim 00/05/08 18:40:15 Modified: src/lib/apr hints.m4 Log: VERY ugly hack of implementing the EXTRA_* settings. Good enough for now, but those evals are painful to look at. No doubt, something more elegant is staring me in the face, but it's been a long day :) We unset all EXTRA_* settings when we first run through these, to prevent them from being constantly added, if we call APR_PRELOAD multiple times.... Zzzzzzzzz Revision Changes Path 1.4 +31 -4 apache-2.0/src/lib/apr/hints.m4 Index: hints.m4 =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/hints.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- hints.m4 2000/05/03 18:27:13 1.3 +++ hints.m4 2000/05/09 01:40:14 1.4 @@ -5,11 +5,36 @@ dnl We allow all settings to be overridden from dnl the command-line. dnl +dnl We maintain the "format" that we've used +dnl under 1.3.x, so we don't exactly follow +dnl what is "recommended" by autoconf. dnl +dnl APR_DOEXTRA +dnl +dnl Handle the use of EXTRA_* variables. +dnl Basically, EXTRA_* vars are added to the +dnl current settings of their "parents". We +dnl can expand as needed. This is ugly +dnl +AC_DEFUN(APR_DOEXTRA, [ + for i in CFLAGS LDFLAGS LIBS + do + XYZ="APR_TMP=\$EXTRA_$i"; eval $XYZ + if test -n "$APR_TMP"; then + XYZ="$i=\"\$$i $APR_TMP\"" + eval $XYZ + eval export $i + eval unset EXTRA_${i} + eval export EXTRA_${i} + fi + done +]) + +dnl dnl APR_SETIFNULL(variable, value) dnl -dnl Set variable iff it's currently null +dnl Set variable iff it's currently null dnl AC_DEFUN(APR_SETIFNULL,[ if test -z "$$1"; then @@ -20,7 +45,7 @@ dnl dnl APR_ADDTO(variable, value) dnl -dnl Add value to variable +dnl Add value to variable dnl AC_DEFUN(APR_ADDTO,[ $1="$$1 $2$3$4$5$6$7$8$9"; export $1 @@ -28,9 +53,10 @@ dnl dnl APR_PRELOAD +dnl +dnl Preload various ENV/makefile paramsm such as CC, CFLAGS, etc +dnl based on outside knowledge dnl -dnl Preload various ENV/makefile paramsm such as CC, CFLAGS, etc -dnl based on outside knowledge AC_DEFUN(APR_PRELOAD, [ PLAT=`$ac_config_guess` PLAT=`$ac_config_sub $PLAT` @@ -342,4 +368,5 @@ APR_ADDTO(CFLAGS, -U_NO_PROTO) ;; esac +APR_DOEXTRA ])