aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: 83a49d37a3a05356ec1de3f9fda3b49ca722d6cd (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
AC_PREREQ(2.52)
AC_INIT(matchbox-desktop, 2.3)
AC_CONFIG_SRCDIR(libtaku/taku-tile.c)

AM_INIT_AUTOMAKE(subdir-objects)
AM_CONFIG_HEADER(config.h)
AM_SILENT_RULES([yes])

AC_PROG_CPP
AC_PROG_CC
AC_PROG_RANLIB

WARN_CFLAGS="-Wall -Wextra -Wno-unused-parameter"
AC_SUBST(WARN_CFLAGS)

AC_CHECK_HEADERS([sys/inotify.h], inotify_support=yes, inotify_support=no)
AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
if test x$inotify_support = xyes; then
        AC_DEFINE(WITH_INOTIFY, [1], [If inotify is enabled])
fi

PKG_CHECK_MODULES(GTK, [glib-2.0 >= 2.14 gtk+-3.0 x11])

AC_ARG_ENABLE(startup_notification,
        AC_HELP_STRING([--disable-startup-notification], [disable startup notification support]),
        enable_startup_notification=$enableval, enable_startup_notification=yes)

if test x$enable_startup_notification != xno; then
  PKG_CHECK_MODULES(SN, libstartup-notification-1.0, ,
    AC_MSG_ERROR([*** Required Startup Notification library not installed ***]))
  AC_DEFINE(USE_LIBSN, [1], [Has Startup Notification Support])
fi

AC_ARG_WITH(dbus,
        AC_HELP_STRING([--with-dbus], [use DBus to send a 'loaded' signal]),
        with_dbus=$withval, with_dbus=no)
if test x$with_dbus != xno; then
    PKG_CHECK_MODULES(DBUS, dbus-1, ,
      AC_MSG_ERROR([libdbus-1 not installed (disable with --without-dbus)]))
    AC_DEFINE(WITH_DBUS, [1], [Use DBus])
fi   

AC_OUTPUT([
Makefile
libtaku/Makefile
src/Makefile
])