From: Justin Erenkrantz Date: Wed, 10 Oct 2001 05:04:40 +0000 (+0000) Subject: Allow mod_so to be enabled by default even if no shared libraries from the X-Git-Tag: 2.0.26~62 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f624792711e8bb123a1ef36dacf138634238f56f;p=thirdparty%2Fapache%2Fhttpd.git Allow mod_so to be enabled by default even if no shared libraries from the core are requested. If you want to disable shared library support, pass --disable-so to configure (as always). This will enforce that your httpd can NOT use shared libraries - which may be a good thing for you to do. Justin added the APR_HAS_DSO check per discussion on-list between Aaron, Ryan, Greg, and the rest of the peanut gallery. This should allow us to not build mod_so when it isn't supported. However, the rest of the configure scripts need to know that shared objects aren't supported and complain accordingly. (sharedobjs = yes, error out?) Submitted by: Aaron Bannert Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91393 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4 index ff7ac5de5dc..2aa86478457 100644 --- a/modules/mappers/config9.m4 +++ b/modules/mappers/config9.m4 @@ -17,11 +17,16 @@ APACHE_MODULE(rewrite, regex URL translation, , , most, [ APR_ADDTO(CFLAGS,-DNO_DBM_REWRITEMAP) ]) -if test "$sharedobjs" = "yes"; then - APACHE_MODULE(so, DSO capability, , , static) -else - APACHE_MODULE(so, DSO capability, , , no) -fi +ap_old_cppflags=$CPPFLAGS +CPPFLAGS="$CPPFLAGS -I$APR_SOURCE_DIR/include" +AC_TRY_COMPILE([#include ], +[#if !APR_HAS_DSO +#error You need APR DSO support to use mod_so. +#endif],ap_enable_so="static",ap_enable_so="no") +CPPFLAGS=$ap_old_cppflags + +APACHE_MODULE(so, DSO capability, , , $ap_enable_so) + dnl ### why save the cache? AC_CACHE_SAVE