-AS_IF([test "x$enable_gtk3" = xyes],
[gtk_package=gtk+-3.0
gtk_min_version=3.0],
[gtk_package=gtk+-2.0
gtk_min_version=2.24])
-AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "xgtk+-3.0"])
[enable_gtk3=auto])
+gtk2_package=gtk+-2.0 +gtk2_min_version=2.24 +gtk3_package=gtk+-3.0 +gtk3_min_version=3.0
+PKG_CHECK_EXISTS([$gtk2_package >= $gtk2_min_version], [have_gtk2=yes], [have_gtk2=no]) +PKG_CHECK_EXISTS([$gtk3_package >= $gtk3_min_version], [have_gtk3=yes], [have_gtk3=no]) +AS_IF([test "x$enable_gtk3" = xyes || (! test "x$enable_gtk3" = xno &&
Shouldn't it be an error if `--disable-gtk3` was passed and only GTK+ 3 is available? Also, how is `--enable-gtk3=auto` (the default) handled?