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.
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 AC_C_FLEXIBLE_ARRAY_MEMBER
26 m4_include([lib/gnulib.mk])
29 [AS_HELP_STRING([--with-libpng],
30 [build support for PNG output using libpng. [default=auto]])],
31 [with_libpng=$withval], [with_libpng=auto])
33 AS_CASE([$with_libpng],
34 [no], [have_libpng=false],
35 [yes], [DX_LIB_LIBPNG([1.5], [have_libpng=true])],
36 [DX_LIB_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
38 AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
39 AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
40 [Define to 1 if libpng support is available])])
42 AC_ARG_ENABLE([lbxgui],
43 [AS_HELP_STRING([--enable-lbxgui],
44 [build the lbxgui tool (requires GTK+) [default=auto]])],
45 [enable_lbxgui=$enableval],
48 AS_CASE([$enable_lbxgui],
49 [no], [have_gtk=false],
50 [yes], [DX_LIB_GTK2([2.16], [have_gtk=true])],
51 [DX_LIB_GTK2([2.16], [have_gtk=true], [have_gtk=false])])
53 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
55 # Check for utilities used by the test suite.
58 AC_CHECK_PROGS([PAMARITH], [pamarith], [false])
59 AC_CHECK_PROGS([PAMCHANNEL], [pamchannel], [false])
60 AC_SUBST([PAMCHANNEL])
63 AC_CONFIG_TESTDIR([.])
65 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
67 AC_CONFIG_FILES([Makefile])