summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsf-exg <sf-exg>2015-06-16 11:56:37 +0000
committersf-exg <sf-exg>2015-06-16 11:56:37 +0000
commita16a906169dc562a9e546fccc53fb1c1e95d2d4c (patch)
treeaf5cfd1a4f0e8fe40f6144c858cb4b9a48ede973
parent80b82c506c747a32d551545abcd5be9dff8a9a03 (diff)
Factor code to find a library with pkg-config into a macro.
-rw-r--r--aclocal.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..5b1f7c7
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,17 @@
+m4_include([libptytty/ptytty.m4])
+
+dnl maybe import pkg.m4 and use PKG_CHECK_MODULES in place of this macro
+AC_DEFUN([RXVT_CHECK_MODULES],
+[
+ AC_MSG_CHECKING(for $2)
+ if test $PKG_CONFIG != no && $PKG_CONFIG --exists $2; then
+ $1[]_CFLAGS="`$PKG_CONFIG --cflags $2`"
+ $1[]_LIBS="`$PKG_CONFIG --libs $2`"
+
+ AC_MSG_RESULT(ok)
+ $3
+ else
+ AC_MSG_RESULT(no)
+ $4
+ fi
+])