+gl_INIT
+
+m4_include([lib/gnulib.mk])
+
+AC_ARG_WITH([libpng],
+ [AS_HELP_STRING([--with-libpng],
+ [build support for PNG output using libpng. [default=auto]])],
+ [with_libpng=$withval],
+ [with_libpng=auto])
+
+AS_CASE([$with_libpng],
+ [no], [have_libpng=false],
+ [yes], [DX_CHECK_LIBPNG([1.5], [have_libpng=true])],
+ [DX_CHECK_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
+
+AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
+AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
+ [Define to 1 if libpng support is available])])
+
+AC_ARG_ENABLE([lbxgui],
+ [AS_HELP_STRING([--enable-lbxgui],
+ [build the lbxgui tool (requires GTK+) [default=auto]])],
+ [enable_lbxgui=$enableval],
+ [enable_lbxgui=auto])
+
+AS_CASE([$enable_lbxgui],
+ [no], [have_gtk=false],
+ [yes], [DX_CHECK_GTK2([2.16], [have_gtk=true])],
+ [DX_CHECK_GTK2([2.16], [have_gtk=true], [have_gtk=false])])