dnl Licensed to the Apache Software Foundation (ASF) under one or more dnl contributor license agreements. See the NOTICE file distributed with dnl this work for additional information regarding copyright ownership. dnl The ASF licenses this file to You under the Apache License, Version 2.0 dnl (the "License"); you may not use this file except in compliance with dnl the License. You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl dnl TS_CHECK_APACHE2() dnl AC_DEFUN([TS_CHECK_APACHE2],[ AC_MSG_RESULT(Checking for Apache 2.x) AC_ARG_WITH(apxs, [ --with-apxs Specify location of apache 2 apxs] , [ CFG_=$withval ] ) if test "x$CFG_" = "x"; then apxs_places="/usr/local/apache2" for d in $apxs_places; do if test -d $d && test -d $d/bin; then TS_CHECK_APXS(["$d/bin/apxs"], [APXS]) if test "x$APXS" != "x"; then break fi fi done else AC_MSG_RESULT([Checking for apache 2 apxs in supplied path]) TS_CHECK_APXS(["$RDCFG_/bin/apxs"], [APXS]) fi if test "x$APXS" = "x"; then AC_MSG_RESULT([Unable to find apache 2 apxs]) AC_MSG_ERROR([Aborting]) fi AC_SUBST(APXS) ]) AC_DEFUN([TS_CHECK_APXS],[ AC_MSG_CHECKING([for $1]) apxs=$1 if test -e $apxs; then check="`$apxs 2>&1`" if test "$?" != "0" && test -x $apxs; then $2=$apxs AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi else AC_MSG_RESULT([not found]) fi ])