From 00ab3aa22139066ead2bb998dbdaffeab41f22e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Wed, 4 Jan 2012 18:33:30 +0100 Subject: [PATCH] configure.ac: the chat screen needs libmpdclient >= 2.5 --- configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) -- 2.30.2