#! /bin/sh /usr/share/dpatch/dpatch-run
## Stolen from the fedora package
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Support "--enable-modules=none" to build an httpd binary with 
## DP: no optional modules enabled.

@DPATCH@
diff -urNad trunk~/acinclude.m4 trunk/acinclude.m4
--- trunk~/acinclude.m4	2005-11-13 07:33:15.000000000 +0100
+++ trunk/acinclude.m4	2008-03-14 01:28:42.379287995 +0100
@@ -289,14 +289,19 @@
 
   AC_ARG_ENABLE(modules,
   APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most"),[
-    for i in $enableval; do
-      if test "$i" = "all" -o "$i" = "most"; then
-        module_selection=$i
-      else
-        i=`echo $i | sed 's/-/_/g'`
-        eval "enable_$i=yes"
-      fi
-    done
+    if test "$enableval" = "none"; then
+       module_default=no
+       module_selection=none
+    else
+      for i in $enableval; do
+        if test "$i" = "all" -o "$i" = "most"; then
+          module_selection=$i
+        else
+          i=`echo $i | sed 's/-/_/g'`
+          eval "enable_$i=yes"
+        fi
+      done
+    fi
   ])
   
   AC_ARG_ENABLE(mods-shared,
diff -urNad trunk~/configure trunk/configure
--- trunk~/configure	2008-01-10 17:54:40.000000000 +0100
+++ trunk/configure	2008-03-14 01:31:55.675287371 +0100
@@ -8106,6 +8106,10 @@
   # Check whether --enable-modules was given.
 if test "${enable_modules+set}" = set; then
   enableval=$enable_modules;
+  if test "$enableval" = "none"; then
+     module_default=no
+     module_selection=none
+  else
     for i in $enableval; do
       if test "$i" = "all" -o "$i" = "most"; then
         module_selection=$i
@@ -8114,7 +8118,7 @@
         eval "enable_$i=yes"
       fi
     done
-
+  fi
 fi
 
 
