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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
AC_INIT(unity-lens-files, 7.1, https://launchpad.net/unity-lens-files)
AC_COPYRIGHT([Copyright 2010-2012 Canonical])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
#####################################################
# Silent build rules
#####################################################
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PREREQ(2.59)
AC_CONFIG_HEADERS([config.h])
#####################################################
# Init the other things we depend on
#####################################################
AM_MAINTAINER_MODE
AM_PROG_VALAC([0.16.0])
AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])
AC_PROG_CC
AM_PROG_CC_C_O
AC_HEADER_STDC
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
#############################################
# Gettext
#############################################
GETTEXT_PACKAGE="$PACKAGE"
AC_SUBST(GETTEXT_PACKAGE)
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
AM_GLIB_GNU_GETTEXT
# AM_GNOME_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
localedir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(localedir)
IT_PROG_INTLTOOL([0.40.0])
AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory])
AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory])
AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory])
######################################################
# intltool rule for generating translated .scope file
######################################################
INTLTOOL_SCOPE_RULE='%.scope: %.scope.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST(INTLTOOL_SCOPE_RULE)
#####################################################
# Check for module and library dependancies
#####################################################
GLIB_REQUIRED=2.27
PKG_CHECK_MODULES(SCOPE_DAEMON,
glib-2.0 >= $GLIB_REQUIRED
gobject-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
gio-unix-2.0 >= $GLIB_REQUIRED
gee-1.0
dee-1.0 >= 0.5.16
zeitgeist-2.0 >= 0.9.12
unity >= 7.0.0)
AC_SUBST(SCOPE_DAEMON_CFLAGS)
AC_SUBST(SCOPE_DAEMON_LIBS)
#####################################################
# local install for distcheck and stand-alone running
#####################################################
with_localinstall="no"
AC_ARG_ENABLE(localinstall,
AS_HELP_STRING([--enable-localinstall],
[Install all of the files locally instead of in system directories (for distcheck)]),
with_localinstall=$enableval,
with_localinstall=no)
AM_CONDITIONAL([HAVE_LOCALINSTALL], [test "x$with_localinstall" = "xyes"])
#####################################################
# Expand variables needed for config.vala
#####################################################
AS_AC_EXPAND(PREFIX, $prefix)
AC_SUBST(PREFIX)
AS_AC_EXPAND(DATADIR, $datarootdir)
AC_SUBST(DATADIR)
#####################################################
# Look for dbus service dir
#####################################################
if test "x$with_localinstall" = "xyes"; then
DBUSSERVICEDIR="${datadir}/dbus-1/services/"
else
DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
fi
AC_SUBST(DBUSSERVICEDIR)
#############################################
# GSettings macros
#############################################
GLIB_GSETTINGS
#####################################################
# Look for correct Scopes dir
#####################################################
if test "x$with_localinstall" = "xyes"; then
SCOPESDIR="${datadir}/unity/scopes"
else
SCOPESDIR=`$PKG_CONFIG --variable=scopesdir unity`
fi
AC_SUBST(SCOPESDIR)
#####################################################
# Create the Makefiles
#####################################################
AC_CONFIG_FILES([
Makefile
local.scope.in
data/Makefile
data/com.canonical.Unity.FilesLens.gschema.xml.in
src/Makefile
src/config.vala
po/Makefile.in
tests/Makefile
])
AC_OUTPUT
#####################################################
# Output the results
#####################################################
AC_MSG_NOTICE([
Unity Files Lens Daemon $VERSION
-------------------------------
Prefix : ${prefix}
Local install : ${with_localinstall}
Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS
Extra ValaFlags : ${CPPFLAGS} $MAINTAINER_VALAFLAGS
Scopes Directory: ${SCOPESDIR}
])
|