]> granicus.if.org Git - apache/commitdiff
If the user explicitly requests --enable-so, --enable-so=yes,
authorAaron Bannert <aaron@apache.org>
Tue, 23 Oct 2001 23:13:27 +0000 (23:13 +0000)
committerAaron Bannert <aaron@apache.org>
Tue, 23 Oct 2001 23:13:27 +0000 (23:13 +0000)
--enable-so=static, or --enable-so=shared but APR_HAS_DSO is
not defined on their system, then it is a fatal error.

Tested on Solaris, but I think it should work everywhere else.

Feel free to change the error message to something
better/more descriptive/etc.

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

modules/mappers/config9.m4

index d7f07c5f01f3f51f0e36ab1c0f25dc2c8591e1a4..cfd3b61fb4e8b928011fb3a7a500c4f38d37daff 100644 (file)
@@ -19,10 +19,17 @@ APACHE_MODULE(rewrite, regex URL translation, , , most, [
 
 ap_old_cppflags=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS -I$APR_SOURCE_DIR/include -I$abs_builddir/srclib/apr/include"
-AC_TRY_COMPILE([#include <apr.h>], 
-[#if !APR_HAS_DSO
+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")
+#endif
+], ap_enable_so="static", [
+if test "$enable_so" = "yes" -o "$enable_so" = "static" -o "$enable_so" = "shared"; then
+    AC_MSG_ERROR([mod_so has been requested but cannot be built on your system])
+else
+    ap_enable_so="no"
+fi
+])
 CPPFLAGS=$ap_old_cppflags
 
 APACHE_MODULE(so, DSO capability, , , $ap_enable_so)