]> granicus.if.org Git - apache/blobdiff - acinclude.m4
Note.
[apache] / acinclude.m4
index e26de5f1ee07bddfaaf367ebe1bcb34146e7797d..0fdf1d48e495b1419336f75dfd1e17abed5fa7d0 100644 (file)
@@ -118,13 +118,6 @@ AC_DEFUN([APACHE_GEN_MAKEFILES],[
   $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES
 ])
 
-dnl ## APACHE_OUTPUT(file)
-dnl ## adds "file" to the list of files generated by AC_OUTPUT
-dnl ## This macro can be used several times.
-AC_DEFUN([APACHE_OUTPUT], [
-  APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1"
-])
-
 dnl
 dnl APACHE_TYPE_RLIM_T
 dnl
@@ -312,37 +305,39 @@ AC_DEFUN([APACHE_MODULE],[
   AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),force_$1=$enableval,enable_$1=ifelse($5,,maybe-all,$5))
   undefine([optname])dnl
   _apmod_extra_msg=""
-  dnl When --enable-modules=most or --enable-modules=(really)all is set and the
-  dnl module was not explicitly requested, allow a module to disable itself if
+  dnl If the module was not explicitly requested, allow it to disable itself if
   dnl its pre-reqs fail.
   case "$enable_$1" in
     yes|static|shared)
       _apmod_required="yes"
       ;;
     *)
-      case "$module_selection" in
-      reallyall|all|most)
-        _apmod_required="no"
-        ;;
-      *)
-        _apmod_required="yes"
-        ;;
-      esac
+      _apmod_required="no"
+      ;;
   esac
-  if test "$enable_$1" = "static"; then
-    enable_$1=static
+  if test "$enable_$1" = "static" -o "$enable_$1" = "shared"; then
+    :
   elif test "$enable_$1" = "yes"; then
     enable_$1=$module_default
+  elif test "$enable_$1" = "few"; then
+    if test "$module_selection" = "few" -o "$module_selection" = "most" -o \
+            "$module_selection" = "all" -o "$module_selection" = "reallyall"
+    then
+      enable_$1=$module_default
+    else
+      enable_$1=no
+    fi
+    _apmod_extra_msg=" ($module_selection)"
   elif test "$enable_$1" = "most"; then
     if test "$module_selection" = "most" -o "$module_selection" = "all" -o \
             "$module_selection" = "reallyall"
     then
       enable_$1=$module_default
-    elif test "$module_selection" = "few" -o "$module_selection" = "none"; then
+    else
       enable_$1=no
     fi
     _apmod_extra_msg=" ($module_selection)"
-  elif test "$enable_$1" = "maybe-all"; then
+  elif test "$enable_$1" = "all" -o "$enable_$1" = "maybe-all"; then
     if test "$module_selection" = "all" -o "$module_selection" = "reallyall"
     then
       enable_$1=$module_default
@@ -350,10 +345,15 @@ AC_DEFUN([APACHE_MODULE],[
     else
       enable_$1=no
     fi
-  elif test "$enable_$1" = "no" -a "$module_selection" = "reallyall" -a \
-            "$force_$1" != "no" ; then
+  elif test "$enable_$1" = "reallyall" -o "$enable_$1" = "no" ; then
+    if test "$module_selection" = "reallyall" -a "$force_$1" != "no" ; then
       enable_$1=$module_default
       _apmod_extra_msg=" ($module_selection)"
+    else
+      enable_$1=no
+    fi
+  else
+    enable_$1=no
   fi
   if test "$enable_$1" != "no"; then
     dnl If we plan to enable it, allow the module to run some autoconf magic
@@ -365,8 +365,8 @@ AC_DEFUN([APACHE_MODULE],[
                               enable_$1=no
                               AC_MSG_WARN("mod_[]prereq is disabled but required for mod_$1")
                             elif test "$enable_$1" = "static" && test "$enable_[]prereq" != "static" ; then
-                              enable_$1=no
-                              AC_MSG_WARN("cannot build mod_$1 statically if mod_[]prereq is built shared")
+                              enable_$1=$enable_[]prereq
+                              AC_MSG_WARN("building mod_$1 shared because mod_[]prereq is built shared")
                             el])se])
             ifelse([$6],,:,[  $6])
             ifelse([$7],,:,[fi])
@@ -389,7 +389,6 @@ AC_DEFUN([APACHE_MODULE],[
       fi
       shared="";;
     *)
-      enable_$1=`echo $enable_$1|sed 's/shared,*//'`
       sharedobjs=yes
       shared=yes
       DSO_MODULES="$DSO_MODULES $1"
@@ -580,7 +579,7 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[
       dnl Run library and function checks
       liberrors=""
       AC_CHECK_HEADERS([openssl/engine.h])
-      AC_CHECK_FUNCS([SSLeay_version SSL_CTX_new], [], [liberrors="yes"])
+      AC_CHECK_FUNCS([SSL_CTX_new], [], [liberrors="yes"])
       AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines RAND_egd])
       if test "x$liberrors" != "x"; then
         AC_MSG_WARN([OpenSSL libraries are unusable])
@@ -735,7 +734,7 @@ AC_DEFUN([APACHE_ADD_GCC_CFLAG], [
     AC_CACHE_CHECK([whether gcc accepts $1], ap_gcc_ckvar, [
       save_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS $1"
-      AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo() { return 0; }])],
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
         [ap_gcc_ckvar=yes], [ap_gcc_ckvar=no])
       CFLAGS="$save_CFLAGS"
     ])