From 55ccc0fa0ae6758a103b02af07140787c813d9b2 Mon Sep 17 00:00:00 2001 From: Vladimir Nadvornik Date: Fri, 10 Aug 2012 22:51:57 +0200 Subject: [PATCH] detect both gtk2 and 3 in autoconf --- configure.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 21553d9b..7d502f6f 100644 --- a/configure.in +++ b/configure.in @@ -190,7 +190,13 @@ else fi AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR(GLIB >= 2.4.0 not installed.)) -AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR(GTK+ >= 2.4.0 not installed.)) +AC_ARG_ENABLE([gtk3], AC_HELP_STRING([--disable-gtk3], [use gtk2 instead of gtk3]),[gtk3="${enableval}"], [gtk3=m4_ifdef([AM_PATH_GTK_3_0], [yes], [no])]) + +if test x$gtk3 == xyes; then + m4_ifdef([AM_PATH_GTK_3_0], [AM_PATH_GTK_3_0(3.0.0,,AC_MSG_ERROR(GTK+ >= 3.0.0 not installed.))]) +else + m4_ifdef([AM_PATH_GTK_2_0], [AM_PATH_GTK_2_0(2.12.0,,AC_MSG_ERROR(GTK+ >= 2.12.0 not installed.))]) +fi threads="auto" AC_ARG_ENABLE([threads], -- 2.20.1