summaryrefslogtreecommitdiff
path: root/apr_common.m4
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-11-28 21:31:52 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-11-28 21:31:52 +0000
commitbb92b86cc3294d16d3e934d68cddb79d7fd846aa (patch)
treeea05dc5dbb7d2aed40eab21e23972c0f2f181ab3 /apr_common.m4
parent98b81f88180ac109110787c4adae0bf56344ad7d (diff)
downloadlibapr-bb92b86cc3294d16d3e934d68cddb79d7fd846aa.tar.gz
Split the hints file into two files, one in APR and one in Apache. The APR
hints file just sets build variables, the Apache hints file just sets Apache variables. This is meant to clean up parts of APR, so that they don't include Apache information. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr_common.m4')
-rw-r--r--apr_common.m462
1 files changed, 62 insertions, 0 deletions
diff --git a/apr_common.m4 b/apr_common.m4
index 7c1545177..ade5c1ac1 100644
--- a/apr_common.m4
+++ b/apr_common.m4
@@ -211,3 +211,65 @@ else
threads_result="POSIX Threads not found"
fi
])dnl
+
+dnl
+dnl Apache and APR "hints" file
+dnl We preload various configure settings depending
+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
+ eval APR_TMP=\$EXTRA_$i
+ if test -n "$APR_TMP"; then
+ eval $i=\"\$$i $APR_TMP\"
+ 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
+AC_DEFUN(APR_SETIFNULL,[
+ if test -z "$$1"; then
+ $1="$2"; export $1
+ fi
+])
+
+dnl
+dnl APR_SETVAR(variable, value)
+dnl
+dnl Set variable no matter what
+dnl
+AC_DEFUN(APR_SETVAR,[
+ $1="$2"; export $1
+])
+
+dnl
+dnl APR_ADDTO(variable, value)
+dnl
+dnl Add value to variable
+dnl
+AC_DEFUN(APR_ADDTO,[
+ $1="$$1 $2"; export $1
+])
+