summaryrefslogtreecommitdiffstats
path: root/modules/core/config.m4
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2009-05-08 07:46:28 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2009-05-08 07:46:28 +0200
commitbc8cdc7896dbff2f4dd4af5df3cc8c5a409f7291 (patch)
treee8c4ba5efc66f831ba21d7026f32b267c044e306 /modules/core/config.m4
parentRevert to preceding version. (diff)
downloadapache2-bc8cdc7896dbff2f4dd4af5df3cc8c5a409f7291.tar.xz
apache2-bc8cdc7896dbff2f4dd4af5df3cc8c5a409f7291.zip
Here's the simpler solution to the two groups of mappers/ modules...
The mod_so and mod_watchdog are truly not mappers/ at all. Very open to better names than modules/core/ but these are clearly API's which are to be consumed by the httpd core, or generically, any module. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@772848 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/core/config.m4')
-rw-r--r--modules/core/config.m464
1 files changed, 64 insertions, 0 deletions
diff --git a/modules/core/config.m4 b/modules/core/config.m4
new file mode 100644
index 0000000000..84e71060ec
--- /dev/null
+++ b/modules/core/config.m4
@@ -0,0 +1,64 @@
+dnl modules enabled in this directory by default
+
+dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
+
+APACHE_MODPATH_INIT(core)
+
+APR_CHECK_APR_DEFINE(APR_HAS_DSO)
+
+case "x$enable_so" in
+ "xyes")
+ if test $ac_cv_define_APR_HAS_DSO = "no"; then
+ AC_MSG_ERROR([mod_so has been requested but cannot be built on your system])
+ fi
+ ;;
+ "xshared")
+ AC_MSG_ERROR([mod_so can not be built as a shared DSO])
+ ;;
+ "xno")
+ ;;
+ "x")
+ enable_so=$ac_cv_define_APR_HAS_DSO
+ ;;
+esac
+
+dnl mod_so can only be built statically. If the user wants modules to
+dnl be built as DSOs by default (eg. ./configure --enable-mods-shared=most)
+dnl then we must override the default here.
+if test "x$enable_so" = "xyes"; then
+ enable_so="static"
+fi
+
+if test "x$enable_so" = "xstatic"; then
+ APR_ADDTO(HTTPD_LDFLAGS, [-export-dynamic])
+ INSTALL_DSO=yes
+else
+ INSTALL_DSO=no
+fi
+APACHE_SUBST(INSTALL_DSO)
+
+if test "$sharedobjs" = "yes"; then
+ if test $ac_cv_define_APR_HAS_DSO = "no"; then
+ AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so cannot be built])
+ elif test $enable_so = "no"; then
+ AC_MSG_ERROR([shared objects have been requested but cannot be built since mod_so was disabled])
+ fi
+fi
+
+APACHE_MODULE(so, DSO capability, , , $enable_so)
+
+APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
+
+if test $ac_cv_define_APR_HAS_THREADS = "no"; then
+ enable_watchdog="no"
+else
+ enable_watchdog="most"
+fi
+
+APACHE_MODULE(watchdog, Watchdog module, , , $enable_watchdog, [
+ if test $ac_cv_define_APR_HAS_THREADS = "no"; then
+ AC_MSG_ERROR([mod_watchdog requires apr to be built with --enable-threads])
+ fi
+])
+
+APACHE_MODPATH_FINISH