From 1cb66d8c6d503575e2e3ae6350b0f703f3e49f67 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sat, 8 Mar 2003 13:54:17 +0000 Subject: [PATCH] use APR_CHECK_APR_DEFINE() where possible an anomaly noticed before and after this commit: "--enable-cgi=shared --disable-so" is not recognized as inconsistent git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98946 13f79535-47bb-0310-9956-ffa450edef68 --- modules/aaa/config.m4 | 13 ++++++------- modules/mappers/config9.m4 | 25 +++++++++---------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4 index cc9e3e7808..eb8fa7b9bd 100644 --- a/modules/aaa/config.m4 +++ b/modules/aaa/config.m4 @@ -36,13 +36,12 @@ dnl these are the front-end authentication modules APACHE_MODULE(auth_basic, basic authentication, , , yes) APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most, [ - ap_old_cppflags=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $INCLUDES" - AC_TRY_COMPILE([#include ], [ -#if !APR_HAS_RANDOM -#error You need APR random support to use mod_auth_digest. -#endif], , enable_auth_digest=no) - CPPFLAGS=$ap_old_cppflags + APR_CHECK_APR_DEFINE(APR_HAS_RANDOM) + if test $ac_cv_define_APR_HAS_RANDOM = "no"; then + echo "You need APR random support to use mod_auth_digest." + echo "Look at APR configure options --with-egd and --with-devrandom." + enable_auth_digest="no" + fi ]) APR_ADDTO(LT_LDFLAGS,-export-dynamic) diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4 index dfc04a8b28..04b73f7738 100644 --- a/modules/mappers/config9.m4 +++ b/modules/mappers/config9.m4 @@ -22,23 +22,16 @@ elif test "$enable_so" = "shared"; then AC_MSG_ERROR([mod_so can not be built as a shared DSO]) fi -ap_old_cppflags=$CPPFLAGS -CPPFLAGS="$CPPFLAGS $INCLUDES" -AC_TRY_COMPILE([#include ], [ -#if !APR_HAS_DSO -#error You need APR DSO support to use mod_so. -#endif -], ap_enable_so="static", [ -if test "$enable_so" = "static"; then - AC_MSG_ERROR([mod_so has been requested but cannot be built on your system]) -else if test "$sharedobjs" = "yes"; then - AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so cannot be built]) -else - ap_enable_so="no" +APR_CHECK_APR_DEFINE(APR_HAS_DSO) +if test $ac_cv_define_APR_HAS_DSO = "no"; then + if test "$enable_so" = "static"; then + AC_MSG_ERROR([mod_so has been requested but cannot be built on your system]) + elif test "$sharedobjs" = "yes"; then + AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so cannot be built]) + else + ap_enable_so="no" + fi fi -fi -]) -CPPFLAGS=$ap_old_cppflags APACHE_MODULE(so, DSO capability, , , $ap_enable_so) -- 2.40.0