--- configure.ac	2009-07-18 10:02:36 +0000
+++ configure.ac	2013-09-08 14:33:17 +0000
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(gtkglarea, 2.0.1)
+AC_INIT(gtkglarea, 2.0.2)
 AC_CONFIG_AUX_DIR(.auto)
 AC_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE([no-define])
@@ -56,8 +56,18 @@
 dnl
 dnl  Check for GTK libraries
 dnl
-GTK_REQUIRED_VERSION=2.0.0
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION)
+AC_ARG_WITH(gtk,  [  --with-gtk=2/3             Use GTK+2 or GTK+3])
+GMODULE_REQUIRED_VERSION=2.0.0
+
+if test "x$with_gtk" = "x3" ; then
+ GTK_REQUIRED_VERSION=3.0.0
+ PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GMODULE_REQUIRED_VERSION)
+ CFLAGS="$CFLAGS -D__GTK3__"
+else
+ GTK_REQUIRED_VERSION=2.0.0
+ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GMODULE_REQUIRED_VERSION)
+ CFLAGS="$CFLAGS -D__GTK2__"
+fi
 
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
