summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-23 20:42:52 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2012-01-23 20:42:52 +0000
commitdba44731b5864251f9da56b7d0c71f5b729b202a (patch)
tree308b883472e7428b64d26c71237ae48ae8d859c5 /configure.ac
parent4e23a6db9e8cdca8ba6a1c19f944f2b7c8ac9045 (diff)
a configure flag for enabling gtk3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index b3176d0..a0da16d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,19 +87,36 @@ fi
AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,
[enable debugging])])
+
if test x$enable_debug = xyes; then
AC_DEFINE([DEBUG], [], [enable debugging])
fi
+AC_ARG_ENABLE(gtk3, [AS_HELP_STRING(--enable-gtk3,
+ [enable gtk3 support])])
+
PKG_CHECK_MODULES([jsonglib], [json-glib-1.0 >= 0.8])
PKG_CHECK_MODULES([gthread], [gthread-2.0])
-dnl PKG_CHECK_MODULES([gtk], [gtk+-3.0 >= 3.00], [
-dnl if test x$with_libappindicator != xno; then
-dnl PKG_CHECK_MODULES([libappindicator], [appindicator3-0.1], AC_DEFINE(HAVE_LIBAPPINDICATOR, 1, [Define if libappindicator is available]), AC_MSG_WARN([Ubuntu Unity users should consider building with libappindicator]))
-dnl fi
-dnl ], [
-dnl AC_MSG_WARN([gtk+-3.0 not found, trying gtk+-2.0])
+if test x$enable_gtk3 = xyes; then
+
+PKG_CHECK_MODULES([gtk], [gtk+-3.0 >= 3.00], [
+if test x$with_libappindicator != xno; then
+PKG_CHECK_MODULES([libappindicator], [appindicator3-0.1], AC_DEFINE(HAVE_LIBAPPINDICATOR, 1, [Define if libappindicator is available]), AC_MSG_WARN([Ubuntu Unity users should consider building with libappindicator]))
+fi
+], [
+AC_MSG_WARN([gtk+-3.0 not found, trying gtk+-2.0])
+PKG_CHECK_MODULES([gtk], [gtk+-2.0 >= 2.16])
+if test x$with_libappindicator != xno; then
+ PKG_CHECK_MODULES([libappindicator], [appindicator-0.1], AC_DEFINE(HAVE_LIBAPPINDICATOR, 1, [Define if libappindicator is available]), AC_MSG_WARN([Ubuntu Unity users should consider building with libappindicator]))
+fi
+if test x$with_libunique != xno; then
+ PKG_CHECK_MODULES([unique], [unique-1.0], AC_DEFINE(HAVE_LIBUNIQUE, 1, [Define if libunique is available]), AC_MSG_WARN([libunique is required for opening torrents on gtk+-2.0. not needed for gtk+-3.0 or win32. ]))
+fi
+])
+
+else
+
PKG_CHECK_MODULES([gtk], [gtk+-2.0 >= 2.16])
if test x$with_libappindicator != xno; then
PKG_CHECK_MODULES([libappindicator], [appindicator-0.1], AC_DEFINE(HAVE_LIBAPPINDICATOR, 1, [Define if libappindicator is available]), AC_MSG_WARN([Ubuntu Unity users should consider building with libappindicator]))
@@ -107,7 +124,8 @@ fi
if test x$with_libunique != xno; then
PKG_CHECK_MODULES([unique], [unique-1.0], AC_DEFINE(HAVE_LIBUNIQUE, 1, [Define if libunique is available]), AC_MSG_WARN([libunique is required for opening torrents on gtk+-2.0. not needed for gtk+-3.0 or win32. ]))
fi
-dnl ])
+
+fi
PKG_CHECK_MODULES([libcurl], [libcurl])
PKG_CHECK_MODULES([gio], [gio-2.0 >= 2.22])