summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Belanger <paul.belanger@polybeacon.com>2010-06-11 20:14:13 +0000
committerPaul Belanger <paul.belanger@polybeacon.com>2010-06-11 20:14:13 +0000
commitf19405516d956da0e7c5f3c632a1599814481a8a (patch)
tree1caae3f77fe2f297b7b1f13d18ad249693cf3c78 /configure.ac
parent479ce4351e91b18f0e9ca6ba83e0fa7a1c60e8ff (diff)
Use pkg-config to find gmime libraries
This way the libraries can be found even if they are in non-standard locations. (closes issue #16155) Reported by: jcollie Patches: 0008-change-configure.ac-to-look-for-pkg-config-gmime-2.0.patch uploaded by jcollie (license 412) Tested by: jsmith, tilghman, pabelanger git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c588301de..deacdc095 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1766,7 +1766,20 @@ fi
AST_EXT_LIB_CHECK([SRTP], [srtp], [srtp_init], [srtp/srtp.h])
-AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
+# will make it easy for someone to debug, if the replacement breaks their system
+#AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
+
+PBX_GMIME=0
+AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
+if test ! "x${PKGCONFIG}" = xNo; then
+ GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.0 --cflags 2>/dev/null)
+ GMIME_LIB=$(${PKGCONFIG} gmime-2.0 --libs)
+ PBX_GMIME=1
+ AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
+fi
+AC_SUBST(PBX_GMIME)
+AC_SUBST(GMIME_INCLUDE)
+AC_SUBST(GMIME_LIB)
AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])