From: Jonathan Neuschäfer Date: Wed, 4 Jan 2012 17:33:30 +0000 (+0100) Subject: configure.ac: the chat screen needs libmpdclient >= 2.5 X-Git-Tag: release-0.21~25^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=00ab3aa22139066ead2bb998dbdaffeab41f22e8;p=ncmpc.git configure.ac: the chat screen needs libmpdclient >= 2.5 --- diff --git a/configure.ac b/configure.ac index 4e29197..fff8b51 100644 --- a/configure.ac +++ b/configure.ac @@ -102,6 +102,9 @@ dnl Check for libmpdclient 2.2 PKG_CHECK_MODULES([LIBMPDCLIENT], [libmpdclient >= 2.2],, [AC_MSG_ERROR([libmpdclient2 is required])]) +dnl Check for libmpdclient 2.5 (the chat screen requires this version) +PKG_CHECK_EXISTS([libmpdclient >= 2.5], + [have_libmpdclient_2_5=yes], [have_libmpdclient_2_5=no]) dnl i18n @@ -345,11 +348,16 @@ AC_ARG_ENABLE([chat-screen], AC_HELP_STRING([--enable-chat-screen], [Enable chat screen @<:@default=no@:>@]),, [enable_chat_screen=no]) +if test "x$enable_chat_screen" = "xauto"; then + enable_chat_screen=$have_libmpdclient_2_5 +fi AC_MSG_RESULT([$enable_chat_screen]) if test "x$enable_chat_screen" = "xyes" ; then - AC_DEFINE(ENABLE_CHAT_SCREEN, 1, [Enable chat screen]) + if test "x$have_libmpdclient_2_5" = "xno"; then + AC_MSG_ERROR(The chat screen requires at least libmpclient 2.5) + fi + AC_DEFINE(ENABLE_CHAT_SCREEN, 1, [Enable chat screen]) fi - AM_CONDITIONAL(ENABLE_CHAT_SCREEN, test x$enable_chat_screen = xyes)