--- configure.in.orig	2011-12-06 19:43:49.934493120 +0100
+++ configure.in	2011-12-06 19:43:57.365437555 +0100
@@ -192,16 +192,28 @@
 AC_ARG_WITH(libnotify, [  --without-libnotify	  Compile without libnotify message support])
 if test "x$with_libnotify" != "xno"; then
 
-	AC_ARG_WITH(gtk, [  --with-gtk		  Compile with additional GTK support])
-	if test "x$with_gtk" == "xyes"; then
-		PKG_CHECK_MODULES(GTK, [gtk+-3.0], found_gtk="yes", found_gtk="no")
-		if test "x$found_gtk" = "xno"; then
-			PKG_CHECK_MODULES(GTK, [gtk+-2.0])
-		fi 
+	AC_ARG_WITH(gtk, [  --with-gtk[[=ARG]]	  Compile with additional GTK support ARG=[[yes|no|gtk2|gtk3]] [[default=no]]])
+	if test "x$with_gtk" != "xno"; then
+		if test "x$with_gtk" = "x"; then
+			with_gtk="gtk3"
+		fi
+	
+		case $with_gtk in
+			gtk2)
+				PKG_CHECK_MODULES(GTK, [gtk+-2.0], found_gtk="yes", found_gtk="no")
+				;;
+			gtk3|yes)
+				PKG_CHECK_MODULES(GTK, [gtk+-3.0], found_gtk="yes", found_gtk="no")
+				;;
+			*)
+				AC_MSG_ERROR([Unsupported Gtk+ selected, --with-gtk=[[yes|no|gtk2|gtk3]]])
+				;;
+		esac
+	
+		PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.4.0])
+		AC_DEFINE(WITH_LIBNOTIFY, 1, [Define if you want libnotify message support])
 	fi
 
-	PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.4.0])
-	AC_DEFINE(WITH_LIBNOTIFY, 1, [Define if you want libnotify message support])
 fi
 
 AC_ARG_WITH(plugins, [  --without-plugins	  Compile without plugins support])
@@ -331,7 +343,7 @@
 fi
 
 if test "x$with_popup" != "xno"; then
-	if test "x$with_gtk" == "xyes"; then
+	if test "x$found_gtk" == "xyes"; then
 cat <<EOF
 	GTK compiler flags:		$GTK_CFLAGS
 	GTK linker flags:		$GTK_LIBS