~kees/libunity/remote-search-none

1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
1
# When releasing also remember to update the soname as instructed below
10.10.116 by timo.jyrinki at canonical
Release 6.5.2
2
AC_INIT(libunity, 6.5.2)
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
3
4
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
5
AM_CONFIG_HEADER(config.h)
6
AM_MAINTAINER_MODE
7
8
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10.87.1 by Allan LeSage
Added gcov coverage tooling.
9
AC_CONFIG_MACRO_DIR([m4])
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
10
11
CFLAGS="$CFLAGS"
12
13
# Before making a release, the LIBUNITY_LT_VERSION string should be updated.
14
# The string is of the form C:R:A.
15
# - If interfaces have been changed or added, but binary compatibility has
16
#   been preserved, change to C+1:0:A+1
17
# - If binary compatibility has been broken (eg removed or changed interfaces)
18
#   change to C+1:0:0
19
# - If the interface is the same as the previous version, change to C:R+1:A
10.28.10 by Michal Hruby
Bump the API versions
20
LIBUNITY_LT_CURRENT=9
10.10.75 by Michal Hruby
Release 5.12.0
21
LIBUNITY_LT_REV=2
10.28.10 by Michal Hruby
Bump the API versions
22
LIBUNITY_LT_AGE=0
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
23
LIBUNITY_LT_VERSION="$LIBUNITY_LT_CURRENT:$LIBUNITY_LT_REV:$LIBUNITY_LT_AGE"
24
LIBUNITY_LT_LDFLAGS="-version-info $LIBUNITY_LT_VERSION -export-symbols-regex '^unity_.*'"
25
10.32.1 by Michal Hruby
Add some autoconf magic
26
AC_SUBST(LIBUNITY_LT_CURRENT)
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
27
AC_SUBST(LIBUNITY_LT_VERSION)
28
AC_SUBST(LIBUNITY_LT_LDFLAGS)
29
10.70.13 by Michal Hruby
Use 0 as the so version
30
LIBPROTOCOL_LT_CURRENT=0
10.70.1 by Michal Hruby
Split up libunity-protocol library
31
LIBPROTOCOL_LT_REV=0
32
LIBPROTOCOL_LT_AGE=0
33
LIBPROTOCOL_LT_VERSION="$LIBPROTOCOL_LT_CURRENT:$LIBPROTOCOL_LT_REV:$LIBPROTOCOL_LT_AGE"
10.70.11 by Michal Hruby
Fix a few issues brought up during review
34
LIBPROTOCOL_LT_LDFLAGS="-version-info $LIBPROTOCOL_LT_VERSION -export-symbols-regex '^unity_protocol_.*'"
10.70.1 by Michal Hruby
Split up libunity-protocol library
35
36
AC_SUBST(LIBPROTOCOL_LT_CURRENT)
37
AC_SUBST(LIBPROTOCOL_LT_VERSION)
38
AC_SUBST(LIBPROTOCOL_LT_LDFLAGS)
39
10.92.1 by Michal Hruby
Changes to build system - add doc generation
40
GIR_MAJOR=6
10.32.1 by Michal Hruby
Add some autoconf magic
41
GIR_MINOR=0
42
AC_SUBST([GIR_VERSION],[$GIR_MAJOR.$GIR_MINOR])
43
AC_DEFINE_UNQUOTED(GIR_VERSION, [$GIR_VERSION], [GIR version])
44
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
45
###################################################################
46
# Check essential build programs
47
###################################################################
48
AC_ISC_POSIX
49
AC_PROG_CC
50
AM_PROG_CC_STDC
51
AC_HEADER_STDC
52
AM_PROG_LIBTOOL
10.66.17 by Pawel Stolowski
Compile UI into the binary as gresource. Requires valac-0.16 from now on!
53
AM_PROG_VALAC([0.16.0])
10.80.3 by Michal Hruby
Fail if valac is not found
54
AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["Can't find suitable vala compiler."])])
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
55
10.1.29 by Mikkel Kamstrup Erlandsen
Add Python overrides (empty for now)
56
###################################################################
57
# Check for Python - we need to know where to install overrides
58
###################################################################
59
AM_PATH_PYTHON
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
60
61
####################################################################
62
# Compiler generate debug code
63
####################################################################
64
AC_ARG_ENABLE([debug],
10.25.1 by Mikkel Kamstrup Erlandsen
Disable warnings from the C compiler by default. It is a deafening noise in the build output and chokes the warnings from the Vala compiler. They can be enabled again with --enable-c-warnings=yes
65
              AC_HELP_STRING([--enable-debug=@<:@no/yes@:>@], [build with debug symbols @<:@default=no@:>@]),,
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
66
              [enable_debug=no])
67
68
if test "x$enable_debug" = "xyes"; then
10.70.4 by Michal Hruby
Make it all work
69
	CFLAGS="-ggdb $CFLAGS"
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
70
	AC_DEFINE(ENABLE_DEBUG, 1, [build with extra debug information])
71
fi
72
73
AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" = "yes")
74
10.25.1 by Mikkel Kamstrup Erlandsen
Disable warnings from the C compiler by default. It is a deafening noise in the build output and chokes the warnings from the Vala compiler. They can be enabled again with --enable-c-warnings=yes
75
####################################################################
10.25.11 by Mikkel Kamstrup Erlandsen
Add configure switch --enable-integration-tests that defaults to "no". This disables to MPRIS tests by default - I can not get them to run for the life of me!
76
# Integration tests
77
####################################################################
78
AC_ARG_ENABLE([integration-tests],
79
              AC_HELP_STRING([--enable-integration-tests=@<:@no/yes@:>@], [run the integration test suite @<:@default=no@:>@]),,
80
              [enable_integration_tests=no])
81
82
if test "x$enable_integration_tests" = "xyes"; then
83
	AC_DEFINE(ENABLE_INTEGRATION_TESTS, 1, [enable integration tests])
84
fi
85
86
AM_CONDITIONAL(ENABLE_INTEGRATION_TESTS, test "$enable_integration_tests" = "yes")
87
10.30.5 by Mikkel Kamstrup Erlandsen
Add configure switch --enable-trace-log
88
####################################################################
89
# Trace logging
90
####################################################################
91
AC_ARG_ENABLE([trace-log],
92
              AC_HELP_STRING([--enable-trace-log=@<:@no/yes@:>@], [compile with trace logging statements @<:@default=no@:>@]),,
93
              [enable_trace_log=no])
94
95
if test "x$enable_trace_log" = "xyes"; then
96
	AC_DEFINE(ENABLE_TRACE_LOG, 1, [enable trace logging])
97
fi
98
99
AM_CONDITIONAL(ENABLE_TRACE_LOG, test "$enable_trace_log" = "yes")
10.25.11 by Mikkel Kamstrup Erlandsen
Add configure switch --enable-integration-tests that defaults to "no". This disables to MPRIS tests by default - I can not get them to run for the life of me!
100
101
####################################################################
10.25.1 by Mikkel Kamstrup Erlandsen
Disable warnings from the C compiler by default. It is a deafening noise in the build output and chokes the warnings from the Vala compiler. They can be enabled again with --enable-c-warnings=yes
102
# C compiler warnings
103
####################################################################
104
AC_ARG_ENABLE([c-warnings],
105
              AC_HELP_STRING([--enable-c-warnings=@<:@no/yes@:>@], [show warnings from the C compiler @<:@default=no@:>@]),,
106
              [enable_c_warnings=no])
107
108
if test "x$enable_c_warnings" = "xyes"; then
109
	AC_DEFINE(ENABLE_C_WARNINGS, 1, [show warnings from the C compiler])
110
fi
111
112
AM_CONDITIONAL(ENABLE_C_WARNINGS, test "$enable_c_warnings" = "yes")
113
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
114
####################################################################
10.1.8 by Mikkel Kamstrup Erlandsen
Compile and install a GI typelib if introspection is enabled
115
# GObject Introspection
10.1.9 by Mikkel Kamstrup Erlandsen
Twiddling the comments in configure.ac
116
# (we get .gir for free with Vala, but needed for the .typelib)
10.1.8 by Mikkel Kamstrup Erlandsen
Compile and install a GI typelib if introspection is enabled
117
####################################################################
10.1.11 by Mikkel Kamstrup Erlandsen
Make the check for the gobject-introspection m4 macros a little cleaner
118
AC_MSG_CHECKING([for gobject-introspection m4 macros])
119
m4_ifdef([GOBJECT_INTROSPECTION_CHECK], , AC_MSG_FAILURE([failed. Please install the package 'gobject-introspection' in order to compile libunity]))
120
AC_MSG_RESULT([yes])
121
10.1.8 by Mikkel Kamstrup Erlandsen
Compile and install a GI typelib if introspection is enabled
122
GOBJECT_INTROSPECTION_CHECK([0.10.0])
123
10.92.1 by Michal Hruby
Changes to build system - add doc generation
124
#################################################
125
# Docs
126
#################################################
127
128
AC_ARG_ENABLE([docs],
129
    AS_HELP_STRING([--enable-docs], [Enable documentation generation]),
130
    [enable_docs=$enableval], [enable_docs="no"])
131
132
found_valadoc=no
133
AS_IF([test "x$enable_docs" != "xno"], [
134
    AC_PATH_PROG(VALADOC, valadoc, :)
135
    AS_IF([test -x "$VALADOC"], [
136
        found_valadoc=yes
137
        AC_SUBST(VALADOC)
10.92.7 by Michal Hruby
Workaround a bug in valadoc
138
        # FIXME: remove once we have valadoc >=0.3.3
139
        AS_IF([$VALAC --version | grep -q 0.16],
140
              VALADOC_DRIVER=0.16.x,
10.92.8 by Michal Hruby
Valac 0.17 needs 0.18 driver as well
141
              [$VALAC --version | grep -q '0.17\|0.18'],
10.92.7 by Michal Hruby
Workaround a bug in valadoc
142
              VALADOC_DRIVER=0.18.x,
143
              VALADOC_DRIVER="`$VALAC --version`")
144
        AC_SUBST(VALADOC_DRIVER)
10.92.1 by Michal Hruby
Changes to build system - add doc generation
145
    ], [
146
        AS_IF([test "x$enable_docs" == "xyes"], AC_MSG_ERROR([Unable to find valadoc]))
147
    ])
148
])
149
150
AM_CONDITIONAL(ENABLE_DOCS, test "x$found_valadoc" = "xyes")
151
10.25.23 by Mikkel Kamstrup Erlandsen
Add headless testing mode with a new configure switch --enable-headless-tests which is off by default. This will require Xvfb and dbus-launch installed on the build machine.
152
####################################################################
153
# Headless tests
154
####################################################################
155
AC_ARG_ENABLE([headless-tests],
156
              AS_HELP_STRING([--enable-headless-tests=@<:@no/yes@:>@],[enable headless test suite (requires Xvfb) @<:@default=no@:>@]),,
157
              [enable_headless_tests=no])
158
159
AM_CONDITIONAL([ENABLE_HEADLESS_TESTS],[test "x$enable_headless_tests" != "xno"])
160
161
if test "x$enable_headless_tests" = "xyes"; then
162
  AC_PATH_PROG([XVFB],[Xvfb])
163
  AC_PATH_PROG([DBUS_LAUNCH],[dbus-launch])
164
fi
165
10.87.1 by Allan LeSage
Added gcov coverage tooling.
166
###########################
167
# gcov coverage reporting
168
###########################
169
m4_include([m4/gcov.m4])
170
AC_TDD_GCOV
171
AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
172
AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
173
AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
174
AC_SUBST(COVERAGE_CFLAGS)
175
AC_SUBST(COVERAGE_LDFLAGS)
10.1.11 by Mikkel Kamstrup Erlandsen
Make the check for the gobject-introspection m4 macros a little cleaner
176
10.1.8 by Mikkel Kamstrup Erlandsen
Compile and install a GI typelib if introspection is enabled
177
####################################################################
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
178
# Check library deps
179
####################################################################
180
GLIB_REQUIRED=2.26
181
PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED ])
182
PKG_CHECK_MODULES(GOBJECT2, [gobject-2.0 >= $GLIB_REQUIRED ])
183
PKG_CHECK_MODULES(GIO2, [gio-2.0 >= $GLIB_REQUIRED ])
184
PKG_CHECK_MODULES(GIO_UNIX2, [gio-unix-2.0])
185
PKG_CHECK_MODULES(GEE, [gee-1.0 >= 0.6.0])
10.57.1 by Michal Hruby
Use the new props introduced in latest Dee
186
PKG_CHECK_MODULES(DEE, [dee-1.0 >= 1.0.4])
9.1.1 by Mikkel Kamstrup Erlandsen
Initial cut at com.canonical.Unity.LauncherEntry DBus API. This adds a dep on dbusmenu-glib-0.4.
187
PKG_CHECK_MODULES(DBUSMENU, [dbusmenu-glib-0.4 >= 0.3.93])
10.66.3 by Pawel Stolowski
Added new unity-tool gtk dependencies to autoconf files.
188
PKG_CHECK_MODULES(GTK3, [gtk+-3.0 >= 3.4.1])
189
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.32.1])
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
190
9.1.1 by Mikkel Kamstrup Erlandsen
Initial cut at com.canonical.Unity.LauncherEntry DBus API. This adds a dep on dbusmenu-glib-0.4.
191
LIBUNITY_CFLAGS="$GLIB2_CFLAGS $GOBJECT2_CFLAGS $GIO2_CFLAGS $GIO_UNIX2_CFLAGS $GEE_CFLAGS $DEE_CFLAGS $DBUSMENU_CFLAGS"
192
LIBUNITY_LIBS="$GLIB2_LIBS $GOBJECT2_LIBS $GIO2_LIBS $GIO_UNIX2_LIBS $GEE_LIBS $DEE_LIBS $DBUSMENU_LIBS"
10.8.3 by Conor Curran
fixed the build issues
193
LIBUNITY_PACKAGES="--pkg glib-2.0 --pkg gobject-2.0 --pkg gio-2.0 --pkg gio-unix-2.0 --pkg gee-1.0 --pkg dee-1.0 --pkg Dbusmenu-0.4"
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
194
AC_SUBST(LIBUNITY_CFLAGS)
195
AC_SUBST(LIBUNITY_LIBS)
196
AC_SUBST(LIBUNITY_PACKAGES)
197
10.66.3 by Pawel Stolowski
Added new unity-tool gtk dependencies to autoconf files.
198
UNITYTOOL_CFLAGS="$GTK3_CFLAGS $GMODULE_CFLAGS"
199
UNITYTOOL_LIBS="$GTK3_LIBS $GMODULE_LIBS"
200
AC_SUBST(UNITYTOOL_CFLAGS)
201
AC_SUBST(UNITYTOOL_LIBS)
202
10.66.18 by Pawel Stolowski
Use AC_PATH_PROG to find glib-compile-resources.
203
AC_PATH_PROG(GLIB_RESCOMPILE, glib-compile-resources)
204
AC_SUBST(GLIB_MKENUMS)
205
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
206
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
207
AC_SUBST(GLIB_MKENUMS)
208
209
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
210
AC_SUBST(GLIB_GENMARSHAL)
211
10.1.63 by Neil Jagdish Patel
Starting to add support for loading scopes
212
######################################################################
213
# Send directory information
214
######################################################################
215
AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share",[Data directory])
216
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
217
AC_OUTPUT([
218
unity.pc
10.70.12 by Michal Hruby
Rename the so to libunity-protocol-private, change install locations
219
unity-protocol-private.pc
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
220
Makefile
10.1.29 by Mikkel Kamstrup Erlandsen
Add Python overrides (empty for now)
221
bindings/Makefile
222
bindings/python/Makefile
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
223
data/Makefile
224
doc/Makefile
225
doc/reference/Makefile
226
examples/Makefile
10.70.1 by Michal Hruby
Split up libunity-protocol library
227
protocol/Makefile
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
228
src/Makefile
10.51.1 by Michal Hruby
Added unity-lens-test-tool
229
tools/Makefile
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
230
test/Makefile
3 by Mikkel Kamstrup Erlandsen
Import a bunch of the testing stuff from lp:unity
231
test/C/Makefile
232
test/vala/Makefile
10.1.88 by Neil Jagdish Patel
Fix missing dist
233
vapi/Makefile
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
234
])
235
236
AC_MSG_NOTICE([
237
238
  libunity v$VERSION (soname $LIBUNITY_LT_VERSION)
10.92.1 by Michal Hruby
Changes to build system - add doc generation
239
         (protocol soname $LIBPROTOCOL_LT_VERSION)
240
  ------------------------------
241
242
  Build environment
243
    Prefix             : ${prefix}
244
    Build GI typelib   : ${enable_introspection}
245
    Documentation      : ${enable_docs}
246
    C warnings         : ${enable_c_warnings}
247
    Trace logging      : ${enable_trace_log}
248
249
  Testing
250
    Integration tests  : ${enable_integration_tests}
251
    Headless tests     : ${enable_headless_tests}
252
    Coverage reporting : ${use_gcov}
1 by Mikkel Kamstrup Erlandsen
Initial project setup now we just need to import the libunity .vala files from lp:unity
253
])
254