summaryrefslogtreecommitdiff
path: root/hints.m4
diff options
context:
space:
mode:
authorjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2000-05-09 01:40:14 +0000
committerjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2000-05-09 01:40:14 +0000
commitb8913d93267f92de2dce9c18771703ebde3171c2 (patch)
tree423e2452a5900bb24daf87630823e3efc57b3825 /hints.m4
parentdfebace758a6ccea97c806aff17b8f3edc23e96e (diff)
downloadlibapr-b8913d93267f92de2dce9c18771703ebde3171c2.tar.gz
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 PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60029 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'hints.m4')
-rw-r--r--hints.m435
1 files changed, 31 insertions, 4 deletions
diff --git a/hints.m4 b/hints.m4
index 0608e5fc6..adc8143fb 100644
--- a/hints.m4
+++ b/hints.m4
@@ -5,11 +5,36 @@ dnl on previously obtained platform knowledge.
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 @@ AC_DEFUN(APR_SETIFNULL,[
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
@@ -29,8 +54,9 @@ AC_DEFUN(APR_ADDTO,[
dnl
dnl APR_PRELOAD
dnl
-dnl Preload various ENV/makefile paramsm such as CC, CFLAGS, etc
-dnl based on outside knowledge
+dnl Preload various ENV/makefile paramsm such as CC, CFLAGS, etc
+dnl based on outside knowledge
+dnl
AC_DEFUN(APR_PRELOAD, [
PLAT=`$ac_config_guess`
PLAT=`$ac_config_sub $PLAT`
@@ -342,4 +368,5 @@ dnl ;;
APR_ADDTO(CFLAGS, -U_NO_PROTO)
;;
esac
+APR_DOEXTRA
])