2 # Copyright (C) 2009, 2013-2024, 2021, 2023-2024 Nick Bowler
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
21 AC_INIT([liblbx], [0.1], [nbowler@draconx.ca])
22 AC_CONFIG_SRCDIR([src/lbx.c])
23 AC_CONFIG_HEADERS([config.h])
25 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
33 AC_C_FLEXIBLE_ARRAY_MEMBER
40 [AS_HELP_STRING([--with-libpng],
41 [build support for PNG output using libpng. [default=auto]])],
42 [with_libpng=$withval], [with_libpng=auto])
44 AS_CASE([$with_libpng],
45 [no], [have_libpng=false],
46 [yes], [DX_LIB_LIBPNG([1.5], [have_libpng=true])],
47 [DX_LIB_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
49 AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
50 AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
51 [Define to 1 if libpng support is available])])
53 AC_ARG_ENABLE([lbxgui],
54 [AS_HELP_STRING([--enable-lbxgui],
55 [build the lbxgui tool (requires GTK+) [default=auto]])],
56 [enable_lbxgui=$enableval],
59 AS_CASE([$enable_lbxgui],
60 [no], [have_gtk=false],
61 [yes], [DX_LIB_GTK2([2.16], [have_gtk=true])],
62 [DX_LIB_GTK2([2.16], [have_gtk=true], [have_gtk=false])])
64 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
66 # Check for utilities used by the test suite.
69 AC_CONFIG_TESTDIR([.], [t:.])
71 DX_CHECK_GETOPT_LONG_AM
73 AC_CONFIG_FILES([Makefile])