[asterisk-commits] tilghman: branch 1.6.2 r294429 - in /branches/1.6.2: configure configure.ac
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 9 14:27:40 CST 2010
Author: tilghman
Date: Tue Nov 9 14:27:23 2010
New Revision: 294429
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=294429
Log:
Detect GMime properly on systems where gmime flags and libs are configured with pkg-config.
(closes issue #16155)
Reported by: jcollie
Patches:
20100917__issue16155.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman
Modified:
branches/1.6.2/configure
branches/1.6.2/configure.ac
Modified: branches/1.6.2/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/configure.ac?view=diff&rev=294429&r1=294428&r2=294429
==============================================================================
--- branches/1.6.2/configure.ac (original)
+++ branches/1.6.2/configure.ac Tue Nov 9 14:27:23 2010
@@ -817,6 +817,9 @@
else if test $ac_cv_sizeof_long_long = $ac_cv_sizeof_fd_set_fds_bits; then
AC_DEFINE([TYPEOF_FD_SET_FDS_BITS], [long long], [Define to a type of the same size as fd_set.fds_bits[[0]]])
fi ; fi ; fi
+
+# PKGCONFIG is used in later tests
+AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
# do the package library checks now
@@ -1708,7 +1711,22 @@
AST_CHECK_OSPTK([3], [5], [0])
fi
-AST_EXT_TOOL_CHECK([GMIME], [gmime], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
+AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
+if test "x${PBX_GMIME}" = "x0"; then
+ # Later versions of GMime use pkg-config
+ if test "x${PKGCONFIG}" = xNo; then :; else
+ GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.0 --cflags 2>/dev/null)
+ GMIME_LIB=$(${PKGCONFIG} gmime-2.0 --libs)
+ if test "x${GMIME_INCLUDE}${GMIME_LIB}" = "x"; then
+ GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.2 --cflags 2>/dev/null)
+ GMIME_LIB=$(${PKGCONFIG} gmime-2.2 --libs)
+ fi
+ if test "x${GMIME_INCLUDE}${GMIME_LIB}" != "x"; then
+ PBX_GMIME=1
+ AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
+ fi
+ fi
+fi
AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
@@ -1845,7 +1863,6 @@
AST_EXT_TOOL_CHECK([GTK], [gtk], [--cflags gthread], [--libs gthread])
PBX_GTK2=0
-AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
if test ! "x${PKGCONFIG}" = xNo; then
GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
More information about the asterisk-commits
mailing list