diff options
author | pabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-11 20:14:13 +0000 |
---|---|---|
committer | pabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-11 20:14:13 +0000 |
commit | 29a095ca831a5f1903e6bdc406e5bbadb35b7746 (patch) | |
tree | 1caae3f77fe2f297b7b1f13d18ad249693cf3c78 /configure.ac | |
parent | be23f2ed52468b2f0af9ff6e4898a0f3e111a39c (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: http://svn.digium.com/svn/asterisk/trunk@270042 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
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], []) |