]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Allow mod_so to be enabled by default even if no shared libraries from the
authorJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 10 Oct 2001 05:04:40 +0000 (05:04 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Wed, 10 Oct 2001 05:04:40 +0000 (05:04 +0000)
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 <aaron@clove.org>
Reviewed by: Justin Erenkrantz

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91393 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/config9.m4

index ff7ac5de5dcde7a8fbb4853506e25c2380b2fa82..2aa86478457c2bdb161c58331b12d01b0637b7ff 100644 (file)
@@ -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 <apr.h>], 
+[#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