]> git.draconx.ca Git - liblbx.git/blob - configure.ac
build: Remove call to AC_CONFIG_MACRO_DIR.
[liblbx.git] / configure.ac
1 dnl Copyright © 2009, 2013-2014 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
15 AC_PROG_CC_C99
16 AM_PROG_CC_C_O
17 gl_EARLY
18
19 AC_HEADER_ASSERT
20 LT_INIT
21 gl_INIT
22
23 m4_include([lib/gnulib.mk])
24
25 AC_ARG_WITH([libpng],
26         [AS_HELP_STRING([--with-libpng],
27                 [build support for PNG output using libpng. [default=auto]])],
28         [with_libpng=$withval],
29         [with_libpng=auto])
30
31 AS_CASE([$with_libpng],
32         [no], [have_libpng=false],
33         [yes], [DX_CHECK_LIBPNG([1.5], [have_libpng=true])],
34         [DX_CHECK_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_CHECK_GTK2([2.16], [have_gtk=true])],
49         [DX_CHECK_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         [AC_SUBST([HAVE_MD5SUM], [true])],
57         [AC_SUBST([HAVE_MD5SUM], [false])])
58 AC_SUBST([MD5SUM])
59
60 AC_CHECK_PROGS([PAMARITH], [pamarith], [false])
61 AC_CHECK_PROGS([PAMCHANNEL], [pamchannel], [false])
62 AC_SUBST([PAMCHANNEL])
63 AC_SUBST([PAMARITH])
64
65 AC_CONFIG_FILES([
66         tests/util/test-defs.sh
67         Makefile
68 ])
69
70 AC_OUTPUT