* try gtk+3 first, then gtk+2; mug works with both

This commit is contained in:
Dirk-Jan C. Binnema 2010-11-08 21:53:17 +02:00
parent 386e9e001a
commit f2f5678055
2 changed files with 12 additions and 10 deletions

View File

@ -16,10 +16,11 @@
include $(top_srcdir)/gtest.mk include $(top_srcdir)/gtest.mk
if HAVE_GTK
SUBDIRS=man src mug contrib
else
SUBDIRS=man src contrib SUBDIRS=man src contrib
# build if there is some gtk available
if HAVE_GTK
SUBDIRS += mug
endif endif

View File

@ -108,16 +108,17 @@ AS_IF([test "x$have_gmime" = "xno"],[
]) ])
]) ])
# do we have gtk+ installed? if not, don't build 'mug' # do we have gtk3+ installed? this is just for testing the new gtk3
PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk=yes],[have_gtk=no]) PKG_CHECK_MODULES(GTK,gtk+-3.0,[have_gtk3=yes],[have_gtk3=no])
AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS) AC_SUBST(GTK_LIBS)
AS_IF([test "x$have_gtk" = "xno"],[ AS_IF([test "x$have_gtk3" = "xno"],[
AC_MSG_WARN([ PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk2=yes],[have_gtk2=no])
*** gtk+-2.0 not found, 'mug' will not be built 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? # xapian?
AC_CHECK_PROG(XAPIAN,xapian-config,xapian-config,no) AC_CHECK_PROG(XAPIAN,xapian-config,xapian-config,no)