]> git.draconx.ca Git - liblbx.git/blobdiff - configure.ac
build: Implement a better GTK+ detection macro.
[liblbx.git] / configure.ac
index f772576636ddb174cad8a84cd3087a43a24882a5..d798674e891771fc9be1c4a2f804091e486dac12 100644 (file)
@@ -36,10 +36,19 @@ DX_CHECK_LIBPNG([1.2], [have_libpng=yes])
 fi
 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])
+AC_ARG_ENABLE([lbxgui],
+       [AS_HELP_STRING([--enable-lbxgui],
+               [build the lbxgui tool (requires GTK+) [default=auto]])],
+       [enable_lbxgui=$enableval],
+       [enable_lbxgui=auto])
+
+have_gtk=no
+if test x"$enable_lbxgui" = x"auto"; then
+DX_CHECK_GTK2([2.16], [have_gtk=yes], [have_gtk=no])
+fi
+if test x"$enable_lbxgui" = x"yes"; then
+DX_CHECK_GTK2([2.16], [have_gtk=yes])
+fi
 AM_CONDITIONAL([BUILD_LBXGUI], [test x"$have_gtk" = x"yes"])
 
 AC_CONFIG_FILES([