1 dnl Copyright (C) 2009 Sun Microsystems
2 dnl This file is free software; Sun Microsystems
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 #--------------------------------------------------------------------
8 #--------------------------------------------------------------------
11 AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
12 AC_REQUIRE([AC_LIB_PREFIX])
14 AC_LIB_HAVE_LINKFLAGS(pcre,,
20 AS_IF([test "x$ac_cv_libpcre" = "xno"],
27 AC_LIB_HAVE_LINKFLAGS(pcre,,
28 [#include <pcre/pcre.h>],
33 AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
34 ac_cv_pcre_location="<pcre/pcre.h>"
37 ac_cv_pcre_location="<pcre.h>"
40 AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
43 AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
45 AC_ARG_ENABLE([libpcre],
46 [AS_HELP_STRING([--disable-libpcre],
47 [Build with libpcre support @<:@default=on@:>@])],
48 [ac_enable_libpcre="$enableval"],
49 [ac_enable_libpcre="yes"])
51 _PANDORA_SEARCH_LIBPCRE
55 AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
56 AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
59 AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
60 ac_enable_libpcre="yes"
61 _PANDORA_SEARCH_LIBPCRE
63 AS_IF([test x$ac_cv_libpcre = xno],[
64 AC_MSG_ERROR([libpcre is required for ${PACKAGE}. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.])
66 AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
67 [Location of pcre header])
71 AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
72 AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])