CHECK_LIBPNG([1.2], [have_libpng=yes], [have_libpng=no])
AM_CONDITIONAL([BUILD_LBXIMG], [test x"$have_libpng" = x"yes"])
+# A horrible combination of bugs makes this necessary for GTK+ detection.
+unset POSIXLY_CORRECT
+
+AM_PATH_GTK_2_0([2.16.0], [have_gtk=yes], [have_gtk=no])
+AM_CONDITIONAL([BUILD_LBXGUI], [test x"$have_gtk" = x"yes"])
+
AC_CONFIG_FILES([
Makefile
lib/Makefile