diff options
author | Max Kellermann <max@duempel.org> | 2009-04-15 22:23:46 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-04-15 22:23:46 +0200 |
commit | d23a23db10f3b22dbd44c897f349cd2f556173de (patch) | |
tree | b04b7a70077a361468f3bb281ce767cdcfebf054 /m4/mpd_auto.m4 | |
parent | a6ed888f9fbe67f83c198d608e45869ff70e6571 (diff) | |
download | mpd-d23a23db10f3b22dbd44c897f349cd2f556173de.tar.gz mpd-d23a23db10f3b22dbd44c897f349cd2f556173de.tar.xz mpd-d23a23db10f3b22dbd44c897f349cd2f556173de.zip |
configure.ac: added function MPD_AUTO_PRE
This function checks whether a prerequisite for a feature was found.
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 a35c9cf1b..3f233938f 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -21,6 +21,21 @@ AC_DEFUN([MPD_AUTO_DISABLED], [ fi ]) +dnl Check whether a prerequisite for a feature was found. This is +dnl very similar to MPD_AUTO_RESULT, but does not finalize the +dnl detection; it assumes that more checks will follow. +AC_DEFUN([MPD_AUTO_PRE], [ + name="$1" + var="enable_$1" + found="found_$name" + feature="$2" + msg="$3" + + if eval "test x`echo '$'$var` != xno" && eval "test x`echo '$'$found` = xno"; then + MPD_AUTO_DISABLED([$name], [$feature], [$msg]) + fi +]) + AC_DEFUN([MPD_AUTO_RESULT], [ name="$1" var="enable_$1" |