aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 5199a079663e2c3e7944015ace428a41d0cc575a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
dnl Process this file with autoconf to produce a configure script.

AC_INIT(colloquium, 0.0.1, taw@bitwiz.org.uk)
AC_CONFIG_AUX_DIR([build-aux])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_MACRO_DIR(m4)

AC_PROG_CC
gl_EARLY
AM_PROG_CC_C_O
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AM_SILENT_RULES([yes])

AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h unistd.h])
AC_C_CONST
AC_FUNC_MALLOC
AC_TYPE_SIGNAL

gl_INIT


AM_PATH_GTK_2_0(2.0.0,
[ ],
[
   AC_MSG_ERROR([GTK is required.])
])


PKG_CHECK_MODULES([libPNG], [libpng >= 1.2.0],
[  ],
[
   AC_MSG_ERROR([LibPNG is required.])
])


PKG_CHECK_MODULES([Cairo], [cairo >= 1.2.0],
[  ],
[
   AC_MSG_ERROR([Cairo is required.])
])


PKG_CHECK_MODULES([GDK_pixbuf], [gdk-pixbuf], [],
[
   PKG_CHECK_MODULES([GDK_pixbuf_2], [gdk-pixbuf-2.0],
   [   ],
   [
      AC_MSG_ERROR([GDK-pixbuf is required.])
   ])
])


PKG_CHECK_MODULES([LIBCONFIG], [libconfig >= 1.4], [],
[
   AC_MSG_ERROR([libconfig is required.])
])


gl_IGNORE_UNUSED_LIBRARIES


CFLAGS="$CFLAGS $GTK_CFLAGS -D_GNU_SOURCE $libPNG_CFLAGS $Cairo_CFLAGS"
CFLAGS="$CFLAGS $GDK_pixbuf_CFLAGS $GDK_pixbuf_2_CFLAGS $LIBCONFIG_CFLAGS"

LIBS="$LIBS -lm -lz $GTK_LIBS $libPNG_LIBS $Cairo_LIBS $GDK_pixbuf_LIBS"
LIBS="$LIBS $GDK_pixbuf_2_LIBS $LIBCONFIG_LIBS $LDFLAGS"


AC_CONFIG_FILES(Makefile lib/Makefile)
AC_OUTPUT