From 41236307683f2bbf367e7b1d4c0d8a84b9f1323e Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 22 Jul 2012 16:55:50 +0000 Subject: [PATCH] (trunk) #4977 "Rev 13388: gtk required" -- fix r13388 regression in configure.ac that required GTK+ even if only building transmission-daemon. --- configure.ac | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 904174e86..c686f1e31 100644 --- a/configure.ac +++ b/configure.ac @@ -352,10 +352,16 @@ dnl detection for the GTK+ client AC_ARG_ENABLE([nls], [AS_HELP_STRING([--enable-nls],[enable native language support])],, [enable_nls=yes]) -AC_ARG_WITH([gtk], - AC_HELP_STRING([--with-gtk],[with Gtk]), +PKG_CHECK_EXISTS([gtk+-3.0 >= $GTK_MINIMUM + glib-2.0 >= $GLIB_MINIMUM + gio-2.0 >= $GIO_MINIMUM, + gmodule-2.0 >= $GLIB_MINIMUM + gthread-2.0 >= $GLIB_MINIMUM], + [have_gtk=yes], + [have_gtk=no]) +AC_ARG_WITH([gtk], AC_HELP_STRING([--with-gtk],[with Gtk]), [with_gtk=$withval], - [with_gtk=yes]) + [with_gtk=$have_gtk]) AM_CONDITIONAL([BUILD_GTK],[test "x$with_gtk" = "xyes"]) use_libappindicator=no if test "x$with_gtk" = "xyes" ; then @@ -373,8 +379,6 @@ if test "x$with_gtk" = "xyes" ; then [appindicator3-0.1 >= $LIBAPPINDICATOR_MINIMUM], [have_libappindicator=yes], [have_libappindicator=no]) - AC_MSG_NOTICE([using GTK+ 3]) - if test "x$have_libappindicator" = "xyes"; then use_libappindicator=yes AC_DEFINE([HAVE_LIBAPPINDICATOR], 1)