X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/5fb804f880836324897bc519615625410720d886..cdfd126039d367b116f0e462b3583e30a7db5cd9:/configure.ac diff --git a/configure.ac b/configure.ac index c03b931..f772576 100644 --- a/configure.ac +++ b/configure.ac @@ -17,12 +17,23 @@ AC_PROG_CC_C99 gl_EARLY AC_HEADER_ASSERT - LT_INIT - gl_INIT - -CHECK_LIBPNG([1.2], [have_libpng=yes], [have_libpng=no]) +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]) + +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.