Commit aab71318 authored by Pablo Castellano's avatar Pablo Castellano Committed by Tristan Van Berkom
Browse files

Add --with-gtk=2.0|3.0 configure flag

parent 1a94f123
......@@ -121,9 +121,39 @@ GTK_DOC_CHECK(1.9)
dnl ================================================================
dnl Check for gtk+
dnl ================================================================
PKG_CHECK_MODULES(GTK, [gtk+-3.0 libxml-2.0 >= 2.4.0])
# Which gtk+ API version to compile against
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
esac],
[with_gtk=2.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
GTK_REQUIRED=2.14.0
;;
3.0) GTK_API_VERSION=3.0
GTK_REQUIRED=2.90.0
;;
esac
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST([GTK_API_VERSION])
AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
PKG_CHECK_MODULES([GTK],[
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
libxml-2.0 >= 2.4.0
])
dnl ================================================================
dnl Check for the unix print widgets in gtk+
......@@ -282,6 +312,7 @@ Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
GTK+ version: $with_gtk
GTK+ UNIX Print Widgets: ${have_unix_print}
PYTHON Widgets support: ${have_python}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment