summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2005-09-27 16:57:24 +0200
committerJoe Orton <jorton@apache.org>2005-09-27 16:57:24 +0200
commit859e696860b98c06603f6bc4fec7e606a6d4b4a5 (patch)
tree733a3900a12c12c9003a0485b1f1d999f060e9e9 /acinclude.m4
parentWhen doing a subrequest lookup, do not lookup using the quickhandler if (diff)
downloadapache2-859e696860b98c06603f6bc4fec7e606a6d4b4a5.tar.xz
apache2-859e696860b98c06603f6bc4fec7e606a6d4b4a5.zip
* acinclude.m4 (APACHE_CHECK_APxVER): New macro, for checking
an apr/apu version requirement. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291972 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m441
1 files changed, 41 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 38d3993fd6..34ae672631 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -528,3 +528,44 @@ AC_DEFUN(APACHE_EXPORT_ARGUMENTS,[
APACHE_SUBST_EXPANDED_ARG(proxycachedir)
])
+dnl
+dnl APACHE_CHECK_APxVER({apr|apu}, major, minor,
+dnl [actions-if-ok], [actions-if-not-ok])
+dnl
+dnl Checks for APR or APR-util of given major/minor version or later;
+dnl if so, runs actions-if-ok; otherwise runs actions-if-not-ok if given.
+dnl If the version is not satisfactory and actions-if-not-ok is not
+dnl given, then an error is printed and the configure script is aborted.
+dnl
+dnl The first argument must be [apr] or [apu].
+dnl
+AC_DEFUN([APACHE_CHECK_APxVER], [
+define(ap_ckver_major, translit($1, [apru], [APRU])[_MAJOR_VERSION])
+define(ap_ckver_minor, translit($1, [apru], [APRU])[_MINOR_VERSION])
+define(ap_ckver_cvar, [ap_cv_$1ver$2$3])
+define(ap_ckver_name, ifelse([$1],[apr],[APR],[APR-util]))
+
+ap_ckver_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS `$[$1]_config --includes`"
+
+AC_CACHE_CHECK([for ap_ckver_name version $2.$3.0 or later], ap_ckver_cvar, [
+AC_EGREP_CPP([good], [
+#include <$1_version.h>
+#if ]ap_ckver_major[ > $2 || (]ap_ckver_major[ == $2 && ]ap_ckver_minor[ >= $3)
+good
+#endif
+], [ap_ckver_cvar=yes], [ap_ckver_cvar=no])])
+
+if test "$ap_ckver_cvar" = "yes"; then
+ ifelse([$4],[],[:],[$4])
+else
+ ifelse([$5],[],[AC_MSG_ERROR([ap_ckver_name version $2.$3.0 or later is required])], [$5])
+fi
+
+CPPFLAGS="$ap_ckver_CPPFLAGS"
+
+undefine([ap_ckver_major])
+undefine([ap_ckver_minor])
+undefine([ap_ckver_cvar])
+undefine([ap_ckver_name])
+])