1 dnl Copyright © 2009, 2013-2014, 2021 Nick Bowler
3 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 dnl This is free software: you are free to do what the fuck you want to.
5 dnl There is NO WARRANTY, to the extent permitted by law.
8 AC_INIT([liblbx], [0.1], [nbowler@draconx.ca])
9 AC_CONFIG_SRCDIR([src/lbx.c])
10 AC_CONFIG_HEADERS([config.h])
12 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
13 AM_SILENT_RULES([yes])
24 m4_include([lib/gnulib.mk])
27 [AS_HELP_STRING([--with-libpng],
28 [build support for PNG output using libpng. [default=auto]])],
29 [with_libpng=$withval], [with_libpng=auto])
31 AS_CASE([$with_libpng],
32 [no], [have_libpng=false],
33 [yes], [DX_LIB_LIBPNG([1.5], [have_libpng=true])],
34 [DX_LIB_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
36 AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
37 AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
38 [Define to 1 if libpng support is available])])
40 AC_ARG_ENABLE([lbxgui],
41 [AS_HELP_STRING([--enable-lbxgui],
42 [build the lbxgui tool (requires GTK+) [default=auto]])],
43 [enable_lbxgui=$enableval],
46 AS_CASE([$enable_lbxgui],
47 [no], [have_gtk=false],
48 [yes], [DX_LIB_GTK2([2.16], [have_gtk=true])],
49 [DX_LIB_GTK2([2.16], [have_gtk=true], [have_gtk=false])])
51 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
53 # Check for utilities used by the test suite.
56 AC_CHECK_PROGS([PAMARITH], [pamarith], [false])
57 AC_CHECK_PROGS([PAMCHANNEL], [pamchannel], [false])
58 AC_SUBST([PAMCHANNEL])
61 AC_CONFIG_TESTDIR([.])
63 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
65 AC_CONFIG_FILES([Makefile])