]> git.draconx.ca Git - liblbx.git/blob - configure.ac
lbximg: Add a new PNG writing routine.
[liblbx.git] / configure.ac
1 dnl Copyright (C) 2009 Nick Bowler
2 dnl Copying and distribution of this file, with or without modification,
3 dnl are permitted in any medium without royalty provided the copyright
4 dnl notice and this notice are preserved.  This file is offered as-is,
5 dnl without any warranty.
6
7 AC_PREREQ([2.62])
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 PKG_PROG_PKG_CONFIG
27
28 AC_ARG_ENABLE([lbximg],
29         [AS_HELP_STRING([--enable-lbximg],
30                 [build the lbximg tool (requires libpng) [default=auto]])],
31         [enable_lbximg=$enableval],
32         [enable_lbximg=auto])
33
34 have_libpng=no
35 if test x"$enable_lbximg" = x"auto"; then
36 DX_CHECK_LIBPNG([1.5], [have_libpng=yes], [have_libpng=no])
37 fi
38 if test x"$enable_lbximg" = x"yes"; then
39 DX_CHECK_LIBPNG([1.5], [have_libpng=yes])
40 fi
41 AM_CONDITIONAL([BUILD_LBXIMG], [test x"$have_libpng" = x"yes"])
42
43 AC_ARG_ENABLE([lbxgui],
44         [AS_HELP_STRING([--enable-lbxgui],
45                 [build the lbxgui tool (requires GTK+) [default=auto]])],
46         [enable_lbxgui=$enableval],
47         [enable_lbxgui=auto])
48
49 have_gtk=no
50 if test x"$enable_lbxgui" = x"auto"; then
51 DX_CHECK_GTK2([2.16], [have_gtk=yes], [have_gtk=no])
52 fi
53 if test x"$enable_lbxgui" = x"yes"; then
54 DX_CHECK_GTK2([2.16], [have_gtk=yes])
55 fi
56 AM_CONDITIONAL([BUILD_LBXGUI], [test x"$have_gtk" = x"yes"])
57
58 AC_CONFIG_FILES([
59         Makefile
60 ])
61
62 AC_OUTPUT