diff options
author | Max Kellermann <max@duempel.org> | 2011-09-01 19:19:42 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-01 19:19:42 +0200 |
commit | 6a3008d7ff787164124a43911145f7305c66aa7e (patch) | |
tree | 54090ac05037c9ba4c7536747462469744bb2531 /m4/mpd_auto.m4 | |
parent | 140162191388063e41e33b53d4533e07529df870 (diff) | |
parent | 2556449b361c00d9c66cf85beb64d7c6458763ed (diff) | |
download | mpd-6a3008d7ff787164124a43911145f7305c66aa7e.tar.gz mpd-6a3008d7ff787164124a43911145f7305c66aa7e.tar.xz mpd-6a3008d7ff787164124a43911145f7305c66aa7e.zip |
Merge branch 'v0.16.x'
Conflicts:
configure.ac
src/output_control.c
Diffstat (limited to 'm4/mpd_auto.m4')
-rw-r--r-- | m4/mpd_auto.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index 3f233938f..23713d5b7 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -63,3 +63,18 @@ AC_DEFUN([MPD_AUTO_PKG], [ MPD_AUTO_RESULT([$1], [$4], [$5]) ]) + +dnl Check with pkg-config first, fall back to AC_CHECK_LIB. +dnl +dnl Parameters: varname1, varname2, pkgname, libname, symname, libs, cflags, description, errmsg +AC_DEFUN([MPD_AUTO_PKG_LIB], [ + if eval "test x`echo '$'enable_$1` != xno"; then + PKG_CHECK_MODULES([$2], [$3], + [eval "found_$1=yes"], + AC_CHECK_LIB($4, $5, + [eval "found_$1=yes $2_LIBS='$6' $2_CFLAGS='$7'"], + [eval "found_$1=no"])) + fi + + MPD_AUTO_RESULT([$1], [$8], [$9]) +]) |