dnl -------------------------------------------------------- -*- autoconf -*- dnl Copyright 2005 The Apache Software Foundation dnl dnl Licensed under the Apache License, Version 2.0 (the "License"); dnl you may not use this file except in compliance with the License. dnl 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 Check for libapreq2 dnl CHECK_APREQ2(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) AC_DEFUN([CHECK_APREQ2], [dnl AC_ARG_WITH( libapreq2, [AC_HELP_STRING([--with-libapreq2=PATH], [Path to Top Level libapreq2 Install Directory])], mc_path="$withval", :) if test -z $mc_path; then test_paths="${prefix} /usr/local /usr" else test_paths="${mc_path}" fi for x in $test_paths ; do AC_MSG_CHECKING([for libapreq2 in ${x}]) if test -f ${x}/include/apreq2/apreq_parser.h; then AC_MSG_RESULT([yes]) APREQ2_LIBS="-L${x}/lib -lapreq2" APREQ2_INCLUDES="-I${x}/include" break else AC_MSG_RESULT([no]) fi done AC_SUBST(APREQ2_LIBS) AC_SUBST(APREQ2_INCLUDES) if test -z "${APREQ2_LIBS}"; then AC_MSG_NOTICE([*** libapreq2 not found.]) ifelse([$2], , AC_MSG_ERROR([libapreq2 is required]), [$2]) else AC_MSG_NOTICE([libapreq2 has been found.]) ifelse([$1], , , [$1]) fi ])