- Use macro AC_PATH_PROG to find the apxs command, don't look for the apache
authorkouril <kouril>
Thu, 1 Apr 2004 08:21:44 +0000 (08:21 +0000)
committerkouril <kouril>
Thu, 1 Apr 2004 08:21:44 +0000 (08:21 +0000)
binary at all since information about apache version are fetched from headers
at compile time.
- Require version 2.57 of autoconf as 2.53 seems to have an error in the
AC_PATH_PROG macro

config.h.in
configure.in

index 1715a1d..c05a9cd 100644 (file)
@@ -14,6 +14,3 @@
 
 /* Define if you want to enable support for Kerberos4 */
 #undef KRB4
-
-/* Define if you are using Apache 1.3.x */
-#undef APXS1
index 0cd9bcc..9e8ce87 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 AC_REVISION($Revision$)
-AC_PREREQ(2.53)
+AC_PREREQ(2.57)
 AC_INIT(mod_auth_kerb, 0.5-rc4, modauthkerb-developers@lists.sourceforge.net)
 AC_CONFIG_SRCDIR([src/mod_auth_kerb.c])
 AC_CONFIG_HEADER([config.h])
@@ -244,52 +244,10 @@ AC_ARG_WITH(apache,
   AC_HELP_STRING([--with-apache=dir],[use apache in dir]),
   [ with_apache="$withval" ])
 
-AC_MSG_CHECKING([for Apache installation])
-HTTPD=""
-APXS=""
-if test -n "$with_apache"; then
-  apache_dirs="$with_apache/sbin $with_apache/bin"
-else
-# XXX the PATH variable should be used rather
-  apache_dirs="/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin"
-fi
-
-for dir in $apache_dirs; do
-  if test -z "$HTTPD"; then
-     for name in apache2 apache httpd; do
-        if test -x "$dir/$name"; then
-           HTTPD="$dir/$name"
-           break
-        fi
-     done
-  fi
-  if test -z "$APXS"; then
-     for name in apxs2 apxs; do
-        if test -x "$dir/$name"; then
-           APXS="$dir/$name"
-           break
-        fi
-     done
-  fi
-done
-
-if test -z "$HTTPD"; then
-   AC_MSG_ERROR([failed to find apache httpd executable])
-fi
+AC_PATH_PROG([APXS], [apxs], [], [$with_apache/bin:$with_apache/sbin:$PATH])
 if test -z "$APXS"; then
    AC_MSG_ERROR([failed to find apache apxs executable])
 fi
-
-apache_v1_3=`$HTTPD -v | grep "^Server version: Apache/1.3."`
-apache_v2_0=`$HTTPD -v | grep "^Server version: Apache/2.0."`
-if test "x$apache_v1_3" = "x" -a "x$apache_v2_0" = "x"; then
-  AC_MSG_ERROR([cannot find valid apache installation on your system])
-fi
-if test -n "$apache_v1_3"; then
-  AC_DEFINE(APXS1)
-fi
-AC_MSG_RESULT(yes)
-
 AC_SUBST(APXS)
 
 AC_CONFIG_FILES([Makefile])