2
AC_INIT([gcr], [3.4.1],
3
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-keyring&component=gcr],
6
dnl ****************************************************************************
7
dnl Library package and libtool versioning
9
dnl Updating the libtool versions, follow these instructions sequentially:
10
dnl 1. If the library source code has changed at all since the last update, then increment revision (āc:r:aā becomes āc:r+1:aā).
11
dnl 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
12
dnl 3. If any interfaces have been added since the last public release, then increment age.
13
dnl 4. If any interfaces have been removed or changed since the last public release, then set age to 0.
15
# GCK package versioning
20
# GCK libtool versioning
25
# GCR package versioning
30
# GCR libtool versioning
35
dnl ****************************************************************************
37
AC_CONFIG_MACRO_DIR([build/m4])
38
AM_INIT_AUTOMAKE([1.11 tar-ustar foreign -Wno-portability])
40
AM_CONFIG_HEADER(config.h)
41
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
42
AM_MAINTAINER_MODE([enable])
44
# -----------------------------------------------------------------------------
57
IT_PROG_INTLTOOL([0.35.0])
58
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
61
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain name])
62
AC_SUBST(GETTEXT_PACKAGE)
65
# -----------------------------------------------------------------------------
68
PKG_CHECK_MODULES(GLIB,
78
GOBJECT_INTROSPECTION_CHECK([1.29])
79
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
80
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
84
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0)
88
# --------------------------------------------------------------------
89
# Checks for functions
92
AC_CHECK_FUNCS(timegm, AC_DEFINE(HAVE_TIMEGM,1,[Have timegm]))
95
# --------------------------------------------------------------------
98
PKG_CHECK_MODULES([P11_KIT], p11-kit-1 >= 0.6)
99
AC_SUBST(P11_KIT_CFLAGS)
100
AC_SUBST(P11_KIT_LIBS)
102
AC_MSG_CHECKING([where to put pkcs11 module configuration])
103
P11_SYSTEM_CONFIG_MODULES=$($PKG_CONFIG p11-kit-1 --variable=p11_system_config_modules)
104
AC_MSG_RESULT($P11_SYSTEM_CONFIG_MODULES)
105
AC_SUBST(P11_SYSTEM_CONFIG_MODULES)
107
if test "$P11_SYSTEM_CONFIG_MODULES" = ""; then
108
AC_MSG_ERROR([Could not find location for pkcs11 module config])
111
AC_MSG_CHECKING([module path to install pkcs11 modules])
112
AC_ARG_WITH(pkcs11-modules, [
113
AC_HELP_STRING([--with-pkcs11-modules=<dir>],
114
[directory to install PKCS#11 modules])
116
if test -z "$with_pkcs11_modules" ; then
117
P11_MODULE_PATH=$($PKG_CONFIG p11-kit-1 --variable=p11_module_path)
119
P11_MODULE_PATH="$with_pkcs11_modules"
121
if test "$P11_MODULE_PATH" = ""; then
122
AC_MSG_ERROR([Could not find directory to install pkcs11 modules])
124
AC_MSG_RESULT($P11_MODULE_PATH)
125
AC_SUBST(P11_MODULE_PATH)
127
pkcs11standalonedir="${libdir}/gnome-keyring/devel"
128
AC_SUBST(pkcs11standalonedir)
130
# --------------------------------------------------------------------
133
AC_PATH_PROGS([GNUPG], [gpg gpg2], ["gpg"])
134
AC_DEFINE_UNQUOTED([GPG_EXECUTABLE], ["$GNUPG"], [Path to gpg executable.])
136
# --------------------------------------------------------------------
143
AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_VERSION,,
146
*** libgcrypt was not found. You may want to get it from
147
*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
151
AC_DEFINE_UNQUOTED(LIBGCRYPT_VERSION, "$GCRYPT_VERSION", [Version of GCRYPT we expect])
153
AC_SUBST([LIBGCRYPT_CFLAGS])
154
AC_SUBST([LIBGCRYPT_LIBS])
156
# -------------------------------------------------------------------
160
AC_PATH_PROG(ASN1PARSER, asn1Parser, no)
161
if test "$ASN1PARSER" = "no" ; then
162
AC_MSG_ERROR([asn1Parser tool is not installed, try libtasn1 or a related package])
165
# ----------------------------------------------------------------------
168
AC_ARG_ENABLE(update-mime,
169
AC_HELP_STRING([--disable-update-mime],
170
[don't run update-mime-database utility (useful for packages) ]))
171
AM_CONDITIONAL(WITH_UPDATE_MIME, test "$enable_update_mime" != "no")
173
AC_ARG_ENABLE(update-icon-cache,
174
AC_HELP_STRING([--disable-update-icon-cache],
175
[don't run gtk-update-icon-cache utility (useful for packages) ]))
176
AM_CONDITIONAL(WITH_UPDATE_ICON_CACHE, test "$enable_update_icon_cache" != "no")
178
# ----------------------------------------------------------------------
181
AC_ARG_WITH(dbus-services,
182
[AC_HELP_STRING([--with-dbus-services=<dir>],
183
[where D-BUS session services directory is])])
184
if ! test -z "$with_dbus_services" ; then
185
DBUS_SERVICES_DIR="$with_dbus_services"
187
DBUS_SERVICES_DIR="$datadir/dbus-1/services"
190
AC_SUBST(DBUS_SERVICES_DIR)
192
# --------------------------------------------------------------------
193
# Compilation and linking options
196
AC_MSG_CHECKING([for debug mode])
198
AC_HELP_STRING([--enable-debug=no/default/yes],
199
[Turn on or off debugging]))
201
if test "$enable_debug" != "no"; then
202
AC_DEFINE_UNQUOTED(WITH_DEBUG, 1, [Print debug output])
203
AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
207
if test "$enable_debug" = "yes"; then
208
debug_status="yes (-g, -O0, debug output, testable)"
209
AC_DEFINE_UNQUOTED(GCR_DISABLE_GRABS, 1, [Disable grabs])
211
elif test "$enable_debug" = "no"; then
212
debug_status="no (no debug output, not testable, G_DISABLE_ASSERT)"
213
AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
215
debug_status="default (-g, debug output, testable)"
218
AC_MSG_RESULT($debug_status)
220
AC_MSG_CHECKING(for more warnings)
221
if test "$GCC" = "yes"; then
225
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
226
-Wnested-externs -Wpointer-arith \
227
-Wcast-align -Wsign-compare \
230
# Disable -Werror for now, because of issues with
231
# strange gtk-doc programs not building cleanly.
234
for option in -Wno-strict-aliasing -Wno-sign-compare; do
235
SAVE_CFLAGS="$CFLAGS"
236
CFLAGS="$CFLAGS $option"
237
AC_MSG_CHECKING([whether gcc understands $option])
238
AC_TRY_COMPILE([], [],
241
if test $has_option = no; then
242
CFLAGS="$SAVE_CFLAGS"
244
AC_MSG_RESULT($has_option)
253
AC_ARG_ENABLE(strict, [
254
AS_HELP_STRING([--enable-strict], [Strict code compilation])
257
AC_MSG_CHECKING([build strict])
259
if test "$enable_strict" = "yes"; then
260
CFLAGS="$CFLAGS -Werror \
261
-DGTK_DISABLE_DEPRECATED \
262
-DGDK_DISABLE_DEPRECATED \
263
-DG_DISABLE_DEPRECATED \
264
-DGDK_PIXBUF_DISABLE_DEPRECATED"
266
INTROSPECTION_FLAGS="--warn-error"
267
AC_DEFINE_UNQUOTED(WITH_STRICT, 1, [More strict checks])
268
strict_status="yes (-Werror, thorough tests, fatals, no deprecations)"
271
INTROSPECTION_FLAGS=""
272
strict_status="no (quick tests, non-fatal warnings)"
275
AC_MSG_RESULT($strict_status)
276
AC_SUBST(INTROSPECTION_FLAGS)
279
AC_MSG_CHECKING([whether to build with gcov testing])
280
AC_ARG_ENABLE([coverage],
281
AS_HELP_STRING([--enable-coverage],
282
[Whether to enable coverage testing ]),
284
[enable_coverage=no])
286
AC_MSG_RESULT([$enable_coverage])
288
if test "$enable_coverage" = "yes"; then
289
if test "$GCC" != "yes"; then
290
AC_MSG_ERROR(Coverage testing requires GCC)
293
AC_PATH_PROG(GCOV, gcov, no)
294
if test "$GCOV" = "no" ; then
295
AC_MSG_ERROR(gcov tool is not available)
298
AC_PATH_PROG(LCOV, lcov, no)
299
if test "$LCOV" = "no" ; then
300
AC_MSG_ERROR(lcov tool is not installed)
303
AC_PATH_PROG(GENHTML, genhtml, no)
304
if test "$GENHTML" = "no" ; then
305
AC_MSG_ERROR(lcov's genhtml tool is not installed)
308
CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
309
LDFLAGS="$LDFLAGS -lgcov"
312
AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_coverage" = "yes"])
317
AC_ARG_ENABLE(valgrind,
318
AC_HELP_STRING([--enable-valgrind],
319
[Run gnome-keyring-daemon using valgrind]))
321
AC_MSG_CHECKING([valgrind])
322
valgrind_status="yes"
324
AM_CONDITIONAL(WITH_VALGRIND, test "$enable_valgrind" = "run")
326
# Run gnome-keyring-daemon under valgrind as default
327
if test "$enable_valgrind" = "run"; then
328
AC_PATH_PROG(VALGRIND, valgrind, no)
329
if test "$VALGRIND" = "no" ; then
330
AC_MSG_ERROR(valgrind tool is not installed)
333
VALGRIND_ARG="--log-file=/tmp/gkr-valgrind.log.%p"
334
VALGRIND_RUN="$VALGRIND $VALGRIND_ARG "
336
AC_DEFINE_UNQUOTED(VALGRIND, "$VALGRIND", [Path to valgrind executable])
337
AC_DEFINE_UNQUOTED(VALGRIND_ARG, "$VALGRIND_ARG", [Valgrind arguments])
339
enable_valgrind="yes"
340
valgrind_status="run"
344
AC_SUBST(VALGRIND_ARG)
345
AC_SUBST(VALGRIND_RUN)
347
# Build valgrind support into code
348
if test "$enable_valgrind" = "yes"; then
349
AC_CHECK_HEADER([valgrind/valgrind.h], have_valgrind=yes, have_valgrind=no)
350
if test "$have_valgrind" = "no"; then
351
AC_MSG_ERROR(The valgrind headers are missing)
353
AC_DEFINE_UNQUOTED(WITH_VALGRIND, 1, [Run under valgrind])
363
# ----------------------------------------------------------------------
365
GCK_LT_RELEASE=$GCK_CURRENT:$GCK_REVISION:$GCK_AGE
366
AC_SUBST(GCK_LT_RELEASE)
370
GCR_LT_RELEASE=$GCR_CURRENT:$GCR_REVISION:$GCR_AGE
371
AC_SUBST(GCR_LT_RELEASE)
379
docs/reference/Makefile
380
docs/reference/gck/Makefile
381
docs/reference/gck/version.xml
382
docs/reference/gcr/Makefile
383
docs/reference/gcr/version.xml
393
gcr/icons/16x16/Makefile
394
gcr/icons/22x22/Makefile
395
gcr/icons/24x24/Makefile
396
gcr/icons/32x32/Makefile
397
gcr/icons/48x48/Makefile
398
gcr/icons/256x256/Makefile
405
# ------------------------------------------------------------------------------
411
echo " Debug Build: $debug_status"
412
echo " Strict Compilation: $strict_status"
413
echo " Introspection: $found_introspection"
414
echo " Valgrind: $valgrind_status"
415
echo " Test Coverage: $enable_coverage"