summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 5a205be96fea108c80fff02bfb4ba4971911b0d4 (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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT(libtopmenu-gtk, 1.0, javier@javispedro.com)
AC_CONFIG_SRCDIR([libmdock/mdock-widget.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall -Wno-extra-portability foreign])

AC_CONFIG_MACRO_DIR([m4])

AC_ARG_ENABLE([mate-applet],
              [AS_HELP_STRING([--enable-mate-applet], [build the Mate panel applet @<:@default=check@:>@])],
			  [],
			  [enable_mate_applet=check])

AC_ARG_WITH([zeitgeist],
            [AS_HELP_STRING([--with-zeitgeist], [use libzeitgeist to populate recent items menu @<:@default=check@:>@])],
			[],
			[with_zeitgeist=check])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CC_STDC
AC_PROG_LIBTOOL

GLIB_GSETTINGS

# Checks for libraries.
PKG_CHECK_MODULES([GTK], [gtk+-x11-2.0])
PKG_CHECK_MODULES([GIO], [gio-unix-2.0])
PKG_CHECK_MODULES([WNCK], [libwnck-1.0])
PKG_CHECK_MODULES([GTOP], [libgtop-2.0])

AS_IF([test "x$enable_mate_applet" != xno],
	[PKG_CHECK_MODULES([MATEPANELAPPLET], [libmatepanelapplet-4.0],
		[
			AC_DEFINE([HAVE_MATEPANELAPPLET], [1], [Define to 1 if you have libmatepanelapplet])
			enable_mate_applet=yes
		],
		[if test "x$enable_mate_applet" = xyes; then
			AC_MSG_FAILURE([--enable-mate-applet was given, but test for libmatepanelapplet failed])
		fi]
	)]
)

AS_IF([test "x$with_zeitgeist" != xno],
	[PKG_CHECK_MODULES([ZEITGEIST], [zeitgeist-2.0],
		[
			AC_DEFINE([HAVE_ZEITGEIST], [1], [Define to 1 if you have libzeitgeist])
			with_zeitgeist=yes
		],
		[if test "x$with_zeitgeist" = xyes; then
			AC_MSG_FAILURE([--with-zeitgeist was given, but test for zeitgeist-2.0 failed])
		fi]
	)]
)


AM_CONDITIONAL([WANT_MATE_APPLET], [test x$enable_mate_applet = xyes])

# Output files
AC_CONFIG_FILES([
	Makefile
	libmdock/Makefile
	mate-applet/Makefile
	test/Makefile
])

AC_OUTPUT