From c79bafa9e0922f8b56f2d3626a3b5e27b8781b33 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 14 May 2012 13:42:49 +0000 Subject: 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/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366351 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- autoconf/ast_pkgconfig.m4 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 autoconf/ast_pkgconfig.m4 (limited to 'autoconf') diff --git a/autoconf/ast_pkgconfig.m4 b/autoconf/ast_pkgconfig.m4 new file mode 100644 index 000000000..8641f94a9 --- /dev/null +++ b/autoconf/ast_pkgconfig.m4 @@ -0,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 +]) + -- cgit v1.2.3