]> git.draconx.ca Git - liblbx.git/blob - configure.ac
Use shared code from dxcommon.
[liblbx.git] / configure.ac
1 dnl Copyright © 2009, 2013-2014, 2021 Nick Bowler
2 dnl
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.
6
7 AC_PREREQ([2.68])
8 AC_INIT([liblbx], [0.1], [toom-devel@lists.sourceforge.net])
9 AC_CONFIG_SRCDIR([src/lbx.c])
10 AC_CONFIG_HEADER([config.h])
11
12 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
13 AM_SILENT_RULES([yes])
14 DX_AUTOMAKE_COMPAT
15
16 AC_PROG_CC_C99
17 AM_PROG_CC_C_O
18 gl_EARLY
19
20 AC_HEADER_ASSERT
21 LT_INIT
22 gl_INIT
23
24 m4_include([lib/gnulib.mk])
25
26 AC_ARG_WITH([libpng],
27   [AS_HELP_STRING([--with-libpng],
28     [build support for PNG output using libpng. [default=auto]])],
29   [with_libpng=$withval], [with_libpng=auto])
30
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])])
35
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])])
39
40 AC_ARG_ENABLE([lbxgui],
41   [AS_HELP_STRING([--enable-lbxgui],
42     [build the lbxgui tool (requires GTK+) [default=auto]])],
43   [enable_lbxgui=$enableval],
44   [enable_lbxgui=auto])
45
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])])
50
51 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
52
53 # Check for utilities used by the test suite.
54 DX_PROG_MD5SUM
55 AS_IF([test x"$dx_cv_md5sum_works" = x"yes"],
56   [HAVE_MD5SUM=true], [HAVE_MD5SUM=false])
57 AC_SUBST([HAVE_MD5SUM])
58
59 AC_CHECK_PROGS([PAMARITH], [pamarith], [false])
60 AC_CHECK_PROGS([PAMCHANNEL], [pamchannel], [false])
61 AC_SUBST([PAMCHANNEL])
62 AC_SUBST([PAMARITH])
63
64 AC_CONFIG_FILES([tests/util/test-defs.sh Makefile])
65 AC_OUTPUT