1 dnl Copyright © 2009, 2013-2014, 2021, 2023 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.
10 AC_INIT([liblbx], [0.1], [nbowler@draconx.ca])
11 AC_CONFIG_SRCDIR([src/lbx.c])
12 AC_CONFIG_HEADERS([config.h])
14 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
15 AM_SILENT_RULES([yes])
26 AC_C_FLEXIBLE_ARRAY_MEMBER
28 m4_include([lib/gnulib.mk])
31 [AS_HELP_STRING([--with-libpng],
32 [build support for PNG output using libpng. [default=auto]])],
33 [with_libpng=$withval], [with_libpng=auto])
35 AS_CASE([$with_libpng],
36 [no], [have_libpng=false],
37 [yes], [DX_LIB_LIBPNG([1.5], [have_libpng=true])],
38 [DX_LIB_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
40 AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
41 AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
42 [Define to 1 if libpng support is available])])
44 AC_ARG_ENABLE([lbxgui],
45 [AS_HELP_STRING([--enable-lbxgui],
46 [build the lbxgui tool (requires GTK+) [default=auto]])],
47 [enable_lbxgui=$enableval],
50 AS_CASE([$enable_lbxgui],
51 [no], [have_gtk=false],
52 [yes], [DX_LIB_GTK2([2.16], [have_gtk=true])],
53 [DX_LIB_GTK2([2.16], [have_gtk=true], [have_gtk=false])])
55 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
57 # Check for utilities used by the test suite.
60 AC_CHECK_PROGS([PAMARITH], [pamarith], [false])
61 AC_CHECK_PROGS([PAMCHANNEL], [pamchannel], [false])
62 AC_SUBST([PAMCHANNEL])
65 AC_CONFIG_TESTDIR([.])
67 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
69 AC_CONFIG_FILES([Makefile])