From: Vladimir Nadvornik Date: Fri, 10 Aug 2012 20:51:57 +0000 (+0200) Subject: detect both gtk2 and 3 in autoconf X-Git-Tag: v1.2~169 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=55ccc0fa0ae6758a103b02af07140787c813d9b2 detect both gtk2 and 3 in autoconf --- 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],