]> git.draconx.ca Git - liblbx.git/blob - configure.ac
tests: Migrate the mainmenu.lbx tests to the TAP system.
[liblbx.git] / configure.ac
1 dnl Copyright © 2009, 2013 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 AC_CONFIG_MACRO_DIR([m4])
12
13 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
14 AM_SILENT_RULES([yes])
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],
30         [with_libpng=auto])
31
32 AS_CASE([$with_libpng],
33         [no], [have_libpng=false],
34         [yes], [DX_CHECK_LIBPNG([1.5], [have_libpng=true])],
35         [DX_CHECK_LIBPNG([1.5], [have_libpng=true], [have_libpng=false])])
36
37 AM_CONDITIONAL([HAVE_LIBPNG], [$have_libpng])
38 AS_IF([$have_libpng], [AC_DEFINE([HAVE_LIBPNG], [1],
39         [Define to 1 if libpng support is available])])
40
41 AC_ARG_ENABLE([lbxgui],
42         [AS_HELP_STRING([--enable-lbxgui],
43                 [build the lbxgui tool (requires GTK+) [default=auto]])],
44         [enable_lbxgui=$enableval],
45         [enable_lbxgui=auto])
46
47 AS_CASE([$enable_lbxgui],
48         [no], [have_gtk=false],
49         [yes], [DX_CHECK_GTK2([2.16], [have_gtk=true])],
50         [DX_CHECK_GTK2([2.16], [have_gtk=true], [have_gtk=false])])
51
52 AM_CONDITIONAL([BUILD_LBXGUI], [$have_gtk])
53
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_CONFIG_FILES([
61         tests/util/test-defs.sh
62         Makefile
63 ])
64
65 AC_OUTPUT