summaryrefslogtreecommitdiff
path: root/autoconf/ast_pkgconfig.m4
diff options
context:
space:
mode:
Diffstat (limited to 'autoconf/ast_pkgconfig.m4')
-rw-r--r--autoconf/ast_pkgconfig.m417
1 files changed, 17 insertions, 0 deletions
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
+])
+