X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/b42e3c4eadf05be2506e1a1f8deb2cf24064c18b..2f0e47fcf78aeae3bcd0e8126f2f33b98bd285e8:/configure.ac diff --git a/configure.ac b/configure.ac index b3bd60c..5d30173 100644 --- a/configure.ac +++ b/configure.ac @@ -1,18 +1,59 @@ -AC_PREREQ(2.60) +dnl Copyright © 2009, 2013 Nick Bowler +dnl +dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. +dnl This is free software: you are free to do what the fuck you want to. +dnl There is NO WARRANTY, to the extent permitted by law. + +AC_PREREQ([2.68]) AC_INIT([liblbx], [0.1], [toom-devel@lists.sourceforge.net]) AC_CONFIG_SRCDIR([src/lbx.c]) AC_CONFIG_HEADER([config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +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 +LT_INIT +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])]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_ARG_ENABLE([lbxgui], + [AS_HELP_STRING([--enable-lbxgui], + [build the lbxgui tool (requires GTK+) [default=auto]])], + [enable_lbxgui=$enableval], + [enable_lbxgui=auto]) -AC_PROG_CC -AC_C_BIGENDIAN +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])]) -AC_PROG_LIBTOOL +AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk]) AC_CONFIG_FILES([ + tests/util/test-defs.sh Makefile - src/Makefile ]) AC_OUTPUT