X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/cdfd126039d367b116f0e462b3583e30a7db5cd9..6505983aace2ef6b7cc1433ef6aad4a120f19ca7:/configure.ac diff --git a/configure.ac b/configure.ac index f772576..0403ca1 100644 --- a/configure.ac +++ b/configure.ac @@ -10,10 +10,11 @@ AC_CONFIG_SRCDIR([src/lbx.c]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects]) +AM_SILENT_RULES([yes]) AC_PROG_CC_C99 +AM_PROG_CC_C_O gl_EARLY AC_HEADER_ASSERT @@ -36,10 +37,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 +AC_ARG_ENABLE([lbxgui], + [AS_HELP_STRING([--enable-lbxgui], + [build the lbxgui tool (requires GTK+) [default=auto]])], + [enable_lbxgui=$enableval], + [enable_lbxgui=auto]) -AM_PATH_GTK_2_0([2.16.0], [have_gtk=yes], [have_gtk=no]) +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([