From f2f5678055311c0a86815c1b2bd5d073cf091081 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Mon, 8 Nov 2010 21:53:17 +0200 Subject: [PATCH] * try gtk+3 first, then gtk+2; mug works with both --- Makefile.am | 7 ++++--- configure.ac | 15 ++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6dc7df12..499b99d5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,10 +16,11 @@ include $(top_srcdir)/gtest.mk -if HAVE_GTK -SUBDIRS=man src mug contrib -else SUBDIRS=man src contrib + +# build if there is some gtk available +if HAVE_GTK +SUBDIRS += mug endif diff --git a/configure.ac b/configure.ac index 805f0fe4..30147293 100644 --- a/configure.ac +++ b/configure.ac @@ -108,16 +108,17 @@ AS_IF([test "x$have_gmime" = "xno"],[ ]) ]) -# do we have gtk+ installed? if not, don't build 'mug' -PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk=yes],[have_gtk=no]) +# do we have gtk3+ installed? this is just for testing the new gtk3 +PKG_CHECK_MODULES(GTK,gtk+-3.0,[have_gtk3=yes],[have_gtk3=no]) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -AS_IF([test "x$have_gtk" = "xno"],[ - AC_MSG_WARN([ - *** gtk+-2.0 not found, 'mug' will not be built - ]) +AS_IF([test "x$have_gtk3" = "xno"],[ + PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk2=yes],[have_gtk2=no]) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) ]) -AM_CONDITIONAL(HAVE_GTK,test "x$have_gtk" = "xyes") +AM_CONDITIONAL(HAVE_GTK, [test "x$have_gtk2" = "xyes" -o "x$have_gtk3" = "xyes"]) + # xapian? AC_CHECK_PROG(XAPIAN,xapian-config,xapian-config,no)