[svn-commits] tzafrir: trunk r366351 - in /trunk: ./ autoconf/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon May 14 08:42:56 CDT 2012
Author: tzafrir
Date: Mon May 14 08:42:49 2012
New Revision: 366351
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366351
Log:
Macro AST_PKG_CONFIG_CHECK to use chkconfig
AST_PKG_CONFIG_CHECK: Similar to AST_EXT_LIB_CHECK, but simply uses
pkg-config data.
This simple version only uses pkg-config(1)'s tests.
This commit also uses the macro to test for GTK2 and GMIME (instead of
the current direct usage of pkg-config).
Review: https://reviewboard.asterisk.org/r/1906/
Added:
trunk/autoconf/ast_pkgconfig.m4 (with props)
Modified:
trunk/configure
trunk/configure.ac
Added: trunk/autoconf/ast_pkgconfig.m4
URL: http://svnview.digium.com/svn/asterisk/trunk/autoconf/ast_pkgconfig.m4?view=auto&rev=366351
==============================================================================
--- trunk/autoconf/ast_pkgconfig.m4 (added)
+++ trunk/autoconf/ast_pkgconfig.m4 Mon May 14 08:42:49 2012
@@ -1,0 +1,17 @@
+# Check for pkg-config component $2:
+# AST_PKG_CONFIG_CHECK([package], [component])
+AC_DEFUN([AST_PKG_CONFIG_CHECK],
+[
+ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+ PKG_CHECK_MODULES($1, $2, [
+ PBX_$1=1
+ $1_INCLUDE="$$1_CFLAGS"
+ $1_LIB="$$1_LIBS"
+ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
+ ], [
+ PBX_$1=0
+ ]
+ )
+ fi
+])
+
Propchange: trunk/autoconf/ast_pkgconfig.m4
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/autoconf/ast_pkgconfig.m4
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/autoconf/ast_pkgconfig.m4
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=366351&r1=366350&r2=366351
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon May 14 08:42:49 2012
@@ -1142,7 +1142,7 @@
LIBS=${old_LIBS}
# PKGCONFIG is used in later tests
-AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
+PKG_PROG_PKG_CONFIG()
# do the package library checks now
@@ -2079,21 +2079,13 @@
CFLAGS="${saved_cflags}"
fi
-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" -a "${PKGCONFIG}" != "No"; then
- # Later versions of GMime use pkg-config
- for ver in 2.0 2.2 2.4 2.6; do
- if ! ${PKGCONFIG} --exists gmime-$ver; then
- continue
- fi
- # If we got here, we have this version:
- GMIME_INCLUDE=$(${PKGCONFIG} gmime-$ver --cflags 2>/dev/null)
- GMIME_LIB=$(${PKGCONFIG} gmime-$ver --libs)
- PBX_GMIME=1
- AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
+
+for ver in 2.0 2.2 2.4 2.6; do
+ AST_PKG_CONFIG_CHECK([GMIME], gmime-$ver)
+ if test "$PBX_GMIME" = 1; then
break;
- done
-fi
+ fi
+done
AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
@@ -2214,16 +2206,7 @@
fi
AC_SUBST(PBX_LAUNCHD)
-PBX_GTK2=0
-if test "${PKGCONFIG}" != "No"; then
- GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
- GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
- PBX_GTK2=1
- AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
-fi
-AC_SUBST(PBX_GTK2)
-AC_SUBST(GTK2_INCLUDE)
-AC_SUBST(GTK2_LIB)
+AST_PKG_CONFIG_CHECK([GTK2], [gtk+-2.0])
# build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
# or iODBC
More information about the svn-commits
mailing list