summaryrefslogtreecommitdiff
path: root/m4/mpd_auto.m4
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-12-26 13:23:07 +0100
committerMax Kellermann <max@musicpd.org>2016-12-26 13:35:19 +0100
commitd30a590d9e4f2915b881a7a31e0d55e773501f11 (patch)
treedb9923cf969284f116ca7b7a21dcde2661357d9f /m4/mpd_auto.m4
parentf95e404be1e41baf92fb602cf34dd7de22097b44 (diff)
configure.ac: use MPD_AUTO for libsndio and Haiku
Diffstat (limited to 'm4/mpd_auto.m4')
-rw-r--r--m4/mpd_auto.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4
index 56957c854..ed64064d1 100644
--- a/m4/mpd_auto.m4
+++ b/m4/mpd_auto.m4
@@ -89,6 +89,19 @@ AC_DEFUN([MPD_AUTO_LIB], [
[$5])])
])
+dnl Wrapper for AC_CHECK_HEADER.
+dnl
+dnl Parameters: varname1, varname2, header, libs, cflags, description, errmsg
+AC_DEFUN([MPD_AUTO_HEADER], [
+ AC_SUBST([$2_LIBS], [])
+ AC_SUBST([$2_CFLAGS], [])
+
+ MPD_AUTO([$1], [$6], [$7],
+ [AC_CHECK_HEADER([$3],
+ [found_$1=yes $2_LIBS='$4' $2_CFLAGS='$5'],
+ [found_$1=no])])
+])
+
dnl Convert the given string into a string for the "default value" in
dnl the help text. If the string is a literal, then it is returned
dnl as-is; if it contains a variable reference, just "auto" is
@@ -153,6 +166,16 @@ AC_DEFUN([MPD_ENABLE_AUTO_LIB], [
])
])
+dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_HEADER
+dnl
+dnl Parameters: varname1, varname2, header, libs, cflags, description, errmsg, default, pre
+AC_DEFUN([MPD_ENABLE_AUTO_HEADER], [
+ MPD_ARG_ENABLE([$1], [$2], [$6], [$8], [
+ $9
+ MPD_AUTO_HEADER($1, $2, $3, $4, $5, $6, $7)
+ ])
+])
+
dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS
dnl
dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg