You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2005/10/11 18:05:21 UTC

svn commit: r312904 - in /httpd/httpd/branches/2.2.x: acinclude.m4 configure.in

Author: colm
Date: Tue Oct 11 09:05:15 2005
New Revision: 312904

URL: http://svn.apache.org/viewcvs?rev=312904&view=rev
Log:
Backport the APACHE_CHECK_VOID_PTR_LEN and APACHE_CHECK_APxVER autoconf macros
from the trunk branch.

Modified:
    httpd/httpd/branches/2.2.x/acinclude.m4
    httpd/httpd/branches/2.2.x/configure.in

Modified: httpd/httpd/branches/2.2.x/acinclude.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/acinclude.m4?rev=312904&r1=312903&r2=312904&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/acinclude.m4 (original)
+++ httpd/httpd/branches/2.2.x/acinclude.m4 Tue Oct 11 09:05:15 2005
@@ -528,3 +528,65 @@
   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])
+])
+
+dnl
+dnl APACHE_CHECK_VOID_PTR_LEN
+dnl
+dnl Checks if the size of a void pointer is at least as big as a "long" 
+dnl integer type.
+dnl
+AC_DEFUN([APACHE_CHECK_VOID_PTR_LEN], [
+
+AC_CACHE_CHECK([for void pointer length], [ap_void_ptr_lt_long],
+[AC_TRY_RUN([
+int main(void)
+{
+    return sizeof(void *) < sizeof(long); 
+}], [ap_void_ptr_lt_long=no], [ap_void_ptr_lt_long=yes], 
+    [ap_void_ptr_lt_long=yes])])
+
+if test "$ap_void_ptr_lt_long" = "yes"; then
+    AC_MSG_ERROR([Size of "void *" is less than size of "long"])
+fi
+])

Modified: httpd/httpd/branches/2.2.x/configure.in
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/configure.in?rev=312904&r1=312903&r2=312904&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/configure.in (original)
+++ httpd/httpd/branches/2.2.x/configure.in Tue Oct 11 09:05:15 2005
@@ -366,6 +366,9 @@
 timegm \
 )
 
+dnl confirm that a void pointer is large enough to store a long integer
+APACHE_CHECK_VOID_PTR_LEN
+
 dnl ## Check for the tm_gmtoff field in struct tm to get the timezone diffs
 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
 [AC_TRY_COMPILE([#include <sys/types.h>