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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
AC_INIT([zeitgeist-datahub], [0.8.2])
#AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([.])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11])
dnl -- Intl
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=zeitgeist-datahub
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
AM_GLIB_GNU_GETTEXT
zeitgeist_datahublocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(zeitgeist_datahublocaledir)
dnl -- Populate top_srcdir variable
top_srcdir=$(readlink -f $0 | sed -e s/configure$//)
dnl pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
AC_PROG_INSTALL
AC_PROG_CC
AC_STDC_HEADERS
dnl ==============================================
dnl Check for vala
dnl ==============================================
AM_PROG_VALAC([0.11.2])
AM_SILENT_RULES([yes])
dnl ==============================================
dnl Check settings for optional providers
AC_ARG_ENABLE([downloads-monitor],
AS_HELP_STRING([--disable-downloads-monitor],
[Disables the XDG_DOWNLOAD_DIRECTORY file monitor]
),
[
if test "x$enableval" != "xno"; then
with_downloads_monitor=yes
else
with_downloads_monitor=no
fi
],
[with_downloads_monitor=yes])
AM_CONDITIONAL(DOWNLOADS_MONITOR_ENABLED, test "x$with_downloads_monitor" = "xyes")
if test "x$with_downloads_monitor" = "xyes"; then
AC_DEFINE([DOWNLOADS_MONITOR_ENABLED], [1], [Is the XDG_DOWNLOAD_DIRECTORY file monitor enabled?])
else
AC_DEFINE([DOWNLOADS_MONITOR_ENABLED], [0], [Is the XDG_DOWNLOAD_DIRECTORY file monitor enabled?])
fi
dnl ==============================================
dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
MIN_GLIB_VERSION=2.26.0
MIN_GTK_VERSION=2.16.0
MIN_ZEITGEIST_VERSION=0.3.3
LIBRARY_MODULES="glib-2.0 >= $MIN_GLIB_VERSION gobject-2.0 gio-2.0 gio-unix-2.0 zeitgeist-1.0 >= $MIN_ZEITGEIST_VERSION"
PKG_CHECK_MODULES(DATAHUB_MODULES, [$LIBRARY_MODULES])
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= $MIN_GTK_VERSION])
dnl Expansions
dnl AS_AC_EXPAND([PKGDATADIR], [$datadir/$PACKAGE_NAME])
dnl AS_AC_EXPAND([DATADIR], [$datadir])
dnl AS_AC_EXPAND([LIBDIR], [$libdir])
dnl AS_AC_EXPAND([LIBEXECDIR], [$libexecdir])
AC_DEFINE_UNQUOTED(PKGDATADIR, "$PKGDATADIR", [Package base directory])
AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/Makefile
doc/Makefile
])
AC_OUTPUT
cat <<EOF
${PACKAGE}-${VERSION}
Build Environment
Install Prefix: ${prefix}
Optional Providers
Downloads Directory Monitor: ${with_downloads_monitor}
EOF
|