summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan Fitton <alan@eth0.org.uk>2012-08-19 23:49:14 +0100
committerGravatar Alan Fitton <alan@eth0.org.uk>2012-08-19 23:49:14 +0100
commit7737a63b3b03169224def40b1cd63e0462866c97 (patch)
tree55b0fa68ca4b28ab9b3651b9179e27aad491af54
parent9388f74f55721835e9aa88c0a877e805b7b43eb8 (diff)
use gtk3 by default with gtk2 fallback, and add --enable-gtk2 flag. update debian/control file to build with gtk3 libs.
-rw-r--r--configure.ac29
-rw-r--r--debian/control6
2 files changed, 19 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index ec9483e..517d33d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,29 +95,23 @@ fi
AC_ARG_ENABLE(gtk3, [AS_HELP_STRING(--enable-gtk3,
[enable gtk3 support])])
+AC_ARG_ENABLE(gtk2, [AS_HELP_STRING(--enable-gtk2,
+ [enable gtk2 support])])
PKG_CHECK_MODULES([jsonglib], [json-glib-1.0 >= 0.8])
PKG_CHECK_MODULES([gthread], [gthread-2.0])
-if test x$enable_gtk3 = xyes; then
-
+AC_DEFUN([TRG_GTK3_CONFIGURE], [
+AC_MSG_NOTICE([attempting gtk-3.0 build])
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
+], [$1])
])
-else
-
+AC_DEFUN([TRG_GTK2_CONFIGURE], [
+AC_MSG_NOTICE([attempting gtk-2.0 build])
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]))
@@ -125,7 +119,16 @@ 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
+])
+if test x$enable_gtk3 = xyes; then
+ TRG_GTK3_CONFIGURE([])
+else
+ if test x$enable_gtk2 = xyes; then
+ TRG_GTK2_CONFIGURE()
+ else
+ TRG_GTK3_CONFIGURE([TRG_GTK2_CONFIGURE()])
+ fi
fi
PKG_CHECK_MODULES([libcurl], [libcurl])
diff --git a/debian/control b/debian/control
index c7f0c0d..8ad0ea1 100644
--- a/debian/control
+++ b/debian/control
@@ -3,9 +3,9 @@ Section: net
Priority: optional
Maintainer: Alan Fitton <alan@eth0.org.uk>
Build-Depends: debhelper, autotools-dev, libcurl4-openssl-dev,
- libgtk2.0-dev (>= 2.16~), libglib2.0-dev (>= 2.22~), libproxy-dev,
- libnotify-dev, libunique-dev, libjson-glib-dev, libgeoip-dev, intltool,
- dh-autoreconf, libappindicator-dev
+ libgtk3.0-dev, libglib2.0-dev (>= 2.22~), libproxy-dev,
+ libnotify-dev, libjson-glib-dev, libgeoip-dev, intltool,
+ dh-autoreconf, libappindicator3-dev
Standards-Version: 3.9.2
Homepage: http://code.google.com/p/transmission-remote-gtk/
Vcs-Svn: http://transmission-remote-gtk.googlecode.com/svn/trunk/