From b0fcdcbf552460595a3f0a3123639c0bea30ae8c Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)>
Date: Mon, 11 Jan 2010 18:22:08 -0500
Subject: [PATCH] [#1722] Make sure pcre is available

---
 sflphone-common/configure.ac | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac
index 41bfe9221b..aacfcc7d68 100644
--- a/sflphone-common/configure.ac
+++ b/sflphone-common/configure.ac
@@ -214,6 +214,12 @@ AC_SUBST(libssl_LIBS)
 	AC_SUBST(ZRTPCPP_LIBS)
 AC_SUBST(ZRTPCPP_CFLAGS)
 
+	dnl Check for libpcre
+#	LIBPCRE_MIN_VERSION=0.0.0
+#	PKG_CHECK_MODULES(PCRE, libpcre >= ${LIBPCRE_MIN_VERSION})
+#	AC_SUBST(PCRE_LIBS)
+#AC_SUBST(PCRE_CFLAGS)
+
 
 dnl DBus-C++ detection (used to be in library own build system)
 	DBUS_REQUIRED_VERSION=0.60
@@ -295,6 +301,15 @@ AC_CHECK_LIB([pthread], pthread_create,
 AC_MSG_ERROR([You need the POSIX Thread library (pthreads)])	
 	fi
 
+AC_CHECK_LIB([pcre], pcre_free,
+		[AC_CHECK_HEADERS(pcre.h, have_pcre=true, have_pcre=false)],
+		have_pcre=false)
+
+	if test "$have_pcre" = "false"; then
+AC_MSG_ERROR([You need the Perl-Compatible Regular Expressions library (pcre)])	
+	fi
+
+
 # For the tools/, we need libdbus-c++ for the "build" architecture as well
 
 	AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
-- 
GitLab