X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/30a5cc51eaad9d592b8016d81c74bbde4ca9022b..cdfd126039d367b116f0e462b3583e30a7db5cd9:/configure.ac diff --git a/configure.ac b/configure.ac index d3d35c5..f772576 100644 --- a/configure.ac +++ b/configure.ac @@ -11,18 +11,40 @@ 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])]) AC_PROG_CC_C99 -AC_HEADER_ASSERT -AC_C_BIGENDIAN +gl_EARLY +AC_HEADER_ASSERT LT_INIT +gl_INIT +PKG_PROG_PKG_CONFIG + +AC_ARG_ENABLE([lbximg], + [AS_HELP_STRING([--enable-lbximg], + [build the lbximg tool (requires libpng) [default=auto]])], + [enable_lbximg=$enableval], + [enable_lbximg=auto]) -CHECK_LIBPNG([1.2], [have_libpng=yes], [have_libpng=no]) +have_libpng=no +if test x"$enable_lbximg" = x"auto"; then +DX_CHECK_LIBPNG([1.2], [have_libpng=yes], [have_libpng=no]) +fi +if test x"$enable_lbximg" = x"yes"; then +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]) +AM_CONDITIONAL([BUILD_LBXGUI], [test x"$have_gtk" = x"yes"]) + AC_CONFIG_FILES([ Makefile + lib/Makefile ]) AC_OUTPUT