~noskcaj/ubuntu/saucy/sflphone/merge-1.2.3-2

« back to all changes in this revision

Viewing changes to daemon/m4/ax_path_lib_pcre.m4

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-19 21:46:37 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120519214637-la8rbrford5kj6m3
Tags: 1.1.0-1
* New upstream release 
  - Fixes "FTBFS with libccrtp-dev/2.0.2 from experimental" (Closes: #663282)
* NEW Maintainer: Debian VoIP Team - Thanks Francois for your work.
  - (Closes: #665789: O: sflphone -- SIP and IAX2 compatible VoIP phone)
* Added Build-Depends: libdbus-c++-bin
* Add gcc47-fixes.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ===========================================================================
 
2
#     http://www.gnu.org/software/autoconf-archive/ax_path_lib_pcre.html
 
3
# ===========================================================================
 
4
#
 
5
# SYNOPSIS
 
6
#
 
7
#   AX_PATH_LIB_PCRE [(A/NA)]
 
8
#
 
9
# DESCRIPTION
 
10
#
 
11
#   check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly.
 
12
#
 
13
#   also provide --with-pcre option that may point to the $prefix of the
 
14
#   pcre installation - the macro will check $pcre/include and $pcre/lib to
 
15
#   contain the necessary files.
 
16
#
 
17
#   the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported and
 
18
#   they can take advantage of the LIBS/CFLAGS additions.
 
19
#
 
20
# LICENSE
 
21
#
 
22
#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
 
23
#
 
24
#   This program is free software; you can redistribute it and/or modify it
 
25
#   under the terms of the GNU General Public License as published by the
 
26
#   Free Software Foundation; either version 3 of the License, or (at your
 
27
#   option) any later version.
 
28
#
 
29
#   This program is distributed in the hope that it will be useful, but
 
30
#   WITHOUT ANY WARRANTY; without even the implied warranty of
 
31
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 
32
#   Public License for more details.
 
33
#
 
34
#   You should have received a copy of the GNU General Public License along
 
35
#   with this program. If not, see <http://www.gnu.org/licenses/>.
 
36
#
 
37
#   As a special exception, the respective Autoconf Macro's copyright owner
 
38
#   gives unlimited permission to copy, distribute and modify the configure
 
39
#   scripts that are the output of Autoconf when processing the Macro. You
 
40
#   need not follow the terms of the GNU General Public License when using
 
41
#   or distributing such scripts, even though portions of the text of the
 
42
#   Macro appear in them. The GNU General Public License (GPL) does govern
 
43
#   all other use of the material that constitutes the Autoconf Macro.
 
44
#
 
45
#   This special exception to the GPL applies to versions of the Autoconf
 
46
#   Macro released by the Autoconf Archive. When you make and distribute a
 
47
#   modified version of the Autoconf Macro, you may extend this special
 
48
#   exception to the GPL to apply to your modified version as well.
 
49
 
 
50
#serial 7
 
51
 
 
52
AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
 
53
AC_MSG_CHECKING([lib pcre])
 
54
AC_ARG_WITH(pcre,
 
55
[  --with-pcre[[=prefix]]    compile xmlpcre part (via libpcre check)],,
 
56
     with_pcre="yes")
 
57
if test ".$with_pcre" = ".no" ; then
 
58
  AC_MSG_RESULT([disabled])
 
59
  m4_ifval($2,$2)
 
60
else
 
61
  AC_MSG_RESULT([(testing)])
 
62
  AC_CHECK_LIB(pcre, pcre_study)
 
63
  if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
 
64
     PCRE_LIBS="-lpcre"
 
65
     AC_MSG_CHECKING([lib pcre])
 
66
     AC_MSG_RESULT([$PCRE_LIBS])
 
67
     m4_ifval($1,$1)
 
68
  else
 
69
     OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib"
 
70
     OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include"
 
71
     AC_CHECK_LIB(pcre, pcre_compile)
 
72
     CPPFLAGS="$OLDCPPFLAGS"
 
73
     LDFLAGS="$OLDLDFLAGS"
 
74
     if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
 
75
        AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre)
 
76
        PCRE_LIBS="-L$with_pcre/lib -lpcre"
 
77
        test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
 
78
        AC_MSG_CHECKING([lib pcre])
 
79
        AC_MSG_RESULT([$PCRE_LIBS])
 
80
        m4_ifval($1,$1)
 
81
     else
 
82
        AC_MSG_CHECKING([lib pcre])
 
83
        AC_MSG_RESULT([no, (WARNING)])
 
84
        m4_ifval($2,$2)
 
85
     fi
 
86
  fi
 
87
fi
 
88
AC_SUBST([PCRE_LIBS])
 
89
AC_SUBST([PCRE_CFLAGS])
 
90
])