-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])