~vjsamuel/drizzle/bug-616035

« back to all changes in this revision

Viewing changes to m4/pandora_have_libpcre.m4

pandora-build v0.72 - Moved remaining hard-coded tests into pandora-build
macros.
Add PANDORA_DRIZZLE_BUILD to run the extra checks that drizzle needs that 
plugins would also need to run so we can just use that macro in generated
external plugin builds.
Added support to register_plugins for external plugin building.
Renamed register_plugins.py to pandora-plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
5
 
 
6
#--------------------------------------------------------------------
 
7
# Check for libpcre
 
8
#--------------------------------------------------------------------
 
9
 
 
10
 
 
11
AC_DEFUN([_PANDORA_SEARCH_LIBPCRE],[
 
12
  AC_REQUIRE([AC_LIB_PREFIX])
 
13
 
 
14
  AC_LIB_HAVE_LINKFLAGS(pcre,,
 
15
  [#include <pcre.h>],
 
16
  [
 
17
    pcre *re= NULL;
 
18
    pcre_version();
 
19
  ])
 
20
  AS_IF([test "x$ac_cv_libpcre" = "xno"],
 
21
  [
 
22
    unset ac_cv_libpcre
 
23
    unset HAVE_LIBPCRE
 
24
    unset LIBPCRE
 
25
    unset LIBPCRE_PREFIX
 
26
    unset LTLIBPCRE
 
27
    AC_LIB_HAVE_LINKFLAGS(pcre,,
 
28
    [#include <pcre/pcre.h>],
 
29
    [
 
30
      pcre *re= NULL;
 
31
      pcre_version();
 
32
    ])
 
33
    AS_IF([test "x$ac_cv_libpcre" = "xyes"], [
 
34
      ac_cv_pcre_location="<pcre/pcre.h>"
 
35
    ])
 
36
  ],[
 
37
    ac_cv_pcre_location="<pcre.h>"
 
38
  ])
 
39
 
 
40
  AM_CONDITIONAL(HAVE_LIBPCRE, [test "x${ac_cv_libpcre}" = "xyes"])
 
41
])
 
42
 
 
43
AC_DEFUN([_PANDORA_HAVE_LIBPCRE],[
 
44
 
 
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"])
 
50
 
 
51
  _PANDORA_SEARCH_LIBPCRE
 
52
])
 
53
 
 
54
 
 
55
AC_DEFUN([PANDORA_HAVE_LIBPCRE],[
 
56
  AC_REQUIRE([_PANDORA_HAVE_LIBPCRE])
 
57
])
 
58
 
 
59
AC_DEFUN([_PANDORA_REQUIRE_LIBPCRE],[
 
60
  ac_enable_libpcre="yes"
 
61
  _PANDORA_SEARCH_LIBPCRE
 
62
 
 
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.])
 
65
  ],[
 
66
    AC_DEFINE_UNQUOTED(PCRE_HEADER,[${ac_cv_pcre_location}],
 
67
                       [Location of pcre header])
 
68
  ])
 
69
])
 
70
 
 
71
AC_DEFUN([PANDORA_REQUIRE_LIBPCRE],[
 
72
  AC_REQUIRE([_PANDORA_REQUIRE_LIBPCRE])
 
73
])