2012-02-02 13:14:58 +00:00
|
|
|
|
AC_PREREQ(2.63)
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2019-05-31 07:39:02 +00:00
|
|
|
|
m4_define([libsecret_major_version], 0)
|
2020-01-13 12:36:28 +00:00
|
|
|
|
m4_define([libsecret_minor_version], 20)
|
2020-01-27 12:41:01 +00:00
|
|
|
|
m4_define([libsecret_micro_version], 1)
|
2019-05-31 07:39:02 +00:00
|
|
|
|
m4_define([libsecret_version],
|
|
|
|
|
[libsecret_major_version.libsecret_minor_version.libsecret_micro_version])
|
|
|
|
|
AC_INIT([libsecret],[libsecret_version],
|
2018-12-29 05:58:46 +00:00
|
|
|
|
[https://gitlab.gnome.org/GNOME/libsecret/issues/],
|
2012-02-02 13:14:58 +00:00
|
|
|
|
[libsecret])
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2019-05-31 07:39:02 +00:00
|
|
|
|
AC_SUBST(SECRET_MAJOR_VERSION, libsecret_major_version)
|
|
|
|
|
AC_SUBST(SECRET_MINOR_VERSION, libsecret_minor_version)
|
|
|
|
|
AC_SUBST(SECRET_MICRO_VERSION, libsecret_micro_version)
|
|
|
|
|
|
2013-12-11 09:11:01 +00:00
|
|
|
|
dnl ****************************************************************************
|
|
|
|
|
dnl Dependency versions
|
|
|
|
|
|
|
|
|
|
# Required
|
|
|
|
|
|
2019-01-19 10:57:22 +00:00
|
|
|
|
GLIB_REQ=2.44.0
|
|
|
|
|
GLIB_MIN=GLIB_VERSION_2_44
|
|
|
|
|
GLIB_MAX=GLIB_VERSION_2_44
|
2013-12-11 09:11:01 +00:00
|
|
|
|
|
|
|
|
|
# Optional
|
|
|
|
|
|
|
|
|
|
VALA_WANT=0.17.2.12
|
|
|
|
|
|
|
|
|
|
GCRYPT_WANT=1.2.2
|
|
|
|
|
|
|
|
|
|
GTKDOC_WANT=1.9
|
|
|
|
|
|
|
|
|
|
GIR_WANT=1.29
|
|
|
|
|
|
2012-02-02 12:40:47 +00:00
|
|
|
|
dnl ****************************************************************************
|
|
|
|
|
dnl Library package and libtool versioning
|
|
|
|
|
dnl
|
|
|
|
|
dnl Updating the libtool versions, follow these instructions sequentially:
|
|
|
|
|
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’).
|
|
|
|
|
dnl 2. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
|
|
|
|
|
dnl 3. If any interfaces have been added since the last public release, then increment age.
|
|
|
|
|
dnl 4. If any interfaces have been removed or changed since the last public release, then set age to 0.
|
|
|
|
|
|
2012-07-13 10:24:35 +00:00
|
|
|
|
SECRET_MAJOR=1
|
2012-02-02 12:40:47 +00:00
|
|
|
|
SECRET_MINOR=0
|
|
|
|
|
SECRET_MICRO=0
|
|
|
|
|
|
|
|
|
|
SECRET_CURRENT=0
|
|
|
|
|
SECRET_REVISION=0
|
|
|
|
|
SECRET_AGE=0
|
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
# -----------------------------------------------------------------------------
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
AC_CONFIG_MACRO_DIR([build/m4])
|
2018-08-30 05:33:32 +00:00
|
|
|
|
AC_CONFIG_AUX_DIR([build/litter])
|
|
|
|
|
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
2018-03-29 09:28:57 +00:00
|
|
|
|
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wno-portability subdir-objects])
|
2012-02-02 13:14:58 +00:00
|
|
|
|
AM_SANITY_CHECK
|
2013-01-15 17:34:10 +00:00
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2012-07-13 08:32:36 +00:00
|
|
|
|
AC_CONFIG_SRCDIR([libsecret/secret-value.c])
|
2012-02-02 13:14:58 +00:00
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2011-06-12 20:55:02 +00:00
|
|
|
|
AM_MAINTAINER_MODE([enable])
|
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
# Basic tools
|
|
|
|
|
|
|
|
|
|
AC_GNU_SOURCE
|
|
|
|
|
AC_ISC_POSIX
|
2011-06-12 20:55:02 +00:00
|
|
|
|
AC_PROG_CC
|
|
|
|
|
AC_PROG_CPP
|
|
|
|
|
AM_PROG_CC_C_O
|
2012-02-02 13:14:58 +00:00
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
AM_PROG_LIBTOOL
|
2015-04-18 15:08:31 +00:00
|
|
|
|
PKG_PROG_PKG_CONFIG
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2018-06-08 20:50:09 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# i18n
|
|
|
|
|
|
|
|
|
|
AM_GNU_GETTEXT([external])
|
2020-01-13 12:35:45 +00:00
|
|
|
|
# FIXME: Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION
|
2018-06-08 20:50:09 +00:00
|
|
|
|
AM_GNU_GETTEXT_VERSION([0.19.8])
|
2020-01-13 12:35:45 +00:00
|
|
|
|
m4_ifdef([AM_GNU_GETTEXT_REQUIRE_VERSION],[
|
|
|
|
|
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
|
|
|
|
|
])
|
2018-06-08 20:50:09 +00:00
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
GETTEXT_PACKAGE=libsecret
|
2011-06-12 20:55:02 +00:00
|
|
|
|
AC_SUBST([GETTEXT_PACKAGE])
|
|
|
|
|
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
|
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# Checks for functions
|
|
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(mlock)
|
|
|
|
|
|
2011-09-25 08:03:48 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# GLib
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2011-11-05 19:59:00 +00:00
|
|
|
|
PKG_CHECK_MODULES(GLIB,
|
2013-12-11 09:11:01 +00:00
|
|
|
|
glib-2.0 >= $GLIB_REQ
|
|
|
|
|
gio-2.0
|
2011-11-05 19:59:00 +00:00
|
|
|
|
gio-unix-2.0)
|
2013-12-11 11:18:51 +00:00
|
|
|
|
LIBS="$LIBS $GLIB_LIBS"
|
|
|
|
|
CFLAGS="$CFLAGS $GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=$GLIB_MIN -DGLIB_VERSION_MAX_ALLOWED=$GLIB_MAX"
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2013-12-11 09:11:01 +00:00
|
|
|
|
GTK_DOC_CHECK($GTKDOC_WANT)
|
2012-02-02 13:59:59 +00:00
|
|
|
|
|
2013-12-11 09:11:01 +00:00
|
|
|
|
GOBJECT_INTROSPECTION_CHECK($GIR_WANT)
|
2012-01-25 13:26:52 +00:00
|
|
|
|
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
|
|
|
|
|
|
2012-08-08 08:40:30 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# Manual pages
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(manpages,
|
2013-09-04 12:00:29 +00:00
|
|
|
|
AC_HELP_STRING([--disable-manpages], [Build manual pages]))
|
2012-08-08 08:40:30 +00:00
|
|
|
|
if test "$enable_manpages" != "no"; then
|
|
|
|
|
enable_manpages="yes"
|
|
|
|
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
|
|
|
|
if test x$XSLTPROC = x; then
|
|
|
|
|
AC_MSG_ERROR([xsltproc is required to build manual pages])
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
AM_CONDITIONAL(WITH_MANPAGES, test x$enable_manpages = xyes)
|
|
|
|
|
|
2012-06-28 09:48:45 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# Vala
|
|
|
|
|
|
2013-12-11 09:11:01 +00:00
|
|
|
|
VAPIGEN_CHECK($VALA_WANT)
|
2012-06-28 09:48:45 +00:00
|
|
|
|
|
|
|
|
|
if test "$enable_vala" != "no"; then
|
|
|
|
|
AC_PATH_PROG([VALAC], [valac], [])
|
|
|
|
|
fi
|
|
|
|
|
AM_CONDITIONAL(HAVE_VALAC, test "x$VALAC" != "x")
|
|
|
|
|
|
2011-09-25 08:03:48 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# libgcrypt
|
|
|
|
|
|
|
|
|
|
GCRYPT_LIBVER=1
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(gcrypt,
|
|
|
|
|
[AC_HELP_STRING([--disable-gcrypt],
|
|
|
|
|
[without gcrypt and transport encryption])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
if test "$enable_gcrypt" != "no"; then
|
2012-08-08 05:57:09 +00:00
|
|
|
|
|
|
|
|
|
have_gcrypt="no"
|
|
|
|
|
m4_ifdef([AM_PATH_LIBGCRYPT],
|
2013-12-11 09:11:01 +00:00
|
|
|
|
[AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_WANT, have_gcrypt=yes)])
|
2012-08-08 05:57:09 +00:00
|
|
|
|
|
|
|
|
|
if test $have_gcrypt != "yes"; then
|
|
|
|
|
AC_MSG_ERROR([[
|
2011-09-25 08:03:48 +00:00
|
|
|
|
***
|
|
|
|
|
*** libgcrypt was not found. You may want to get it from
|
|
|
|
|
*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
|
|
|
|
|
***
|
2012-08-08 05:57:09 +00:00
|
|
|
|
]])
|
|
|
|
|
fi
|
2011-09-25 08:03:48 +00:00
|
|
|
|
|
|
|
|
|
AC_DEFINE(WITH_GCRYPT, 1, [Build with libgcypt and transport encryption])
|
2013-12-11 09:11:01 +00:00
|
|
|
|
AC_DEFINE_UNQUOTED(LIBGCRYPT_VERSION, "$GCRYPT_WANT",
|
2011-09-25 08:03:48 +00:00
|
|
|
|
[Version of GCRYPT we expect])
|
|
|
|
|
|
|
|
|
|
AC_SUBST([LIBGCRYPT_CFLAGS])
|
|
|
|
|
AC_SUBST([LIBGCRYPT_LIBS])
|
|
|
|
|
|
2013-12-11 09:11:01 +00:00
|
|
|
|
gcrypt_status="yes"
|
2011-09-25 19:13:00 +00:00
|
|
|
|
enable_gcrypt="yes"
|
|
|
|
|
else
|
|
|
|
|
gcrypt_status="no"
|
2011-09-25 08:03:48 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(WITH_GCRYPT, test "$enable_gcrypt" = "yes")
|
|
|
|
|
|
2011-09-25 19:13:00 +00:00
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
# Compilation options
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
2012-02-02 13:14:58 +00:00
|
|
|
|
if test "$GCC" = "yes"; then
|
2011-06-12 20:55:02 +00:00
|
|
|
|
CFLAGS="$CFLAGS \
|
2012-02-02 13:14:58 +00:00
|
|
|
|
-Wall -Wmissing-declarations \
|
2011-06-12 20:55:02 +00:00
|
|
|
|
-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
|
|
|
|
|
-Wdeclaration-after-statement -Wformat=2 -Winit-self \
|
2013-01-22 15:07:45 +00:00
|
|
|
|
-Waggregate-return"
|
2011-06-12 20:55:02 +00:00
|
|
|
|
|
|
|
|
|
for option in -Wmissing-include-dirs -Wundef; do
|
|
|
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
|
|
|
CFLAGS="$CFLAGS $option"
|
|
|
|
|
AC_MSG_CHECKING([whether gcc understands $option])
|
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
|
|
|
|
|
[has_option=yes],
|
|
|
|
|
[has_option=no])
|
|
|
|
|
AC_MSG_RESULT($has_option)
|
|
|
|
|
if test $has_option = no; then
|
|
|
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
|
2011-09-25 08:03:48 +00:00
|
|
|
|
AC_ARG_ENABLE(strict, [
|
|
|
|
|
AS_HELP_STRING([--enable-strict], [Strict code compilation])
|
|
|
|
|
])
|
|
|
|
|
|
2011-09-25 19:13:00 +00:00
|
|
|
|
AC_MSG_CHECKING([build strict])
|
|
|
|
|
|
2011-09-25 08:03:48 +00:00
|
|
|
|
if test "$enable_strict" = "yes"; then
|
2013-12-11 09:11:30 +00:00
|
|
|
|
CFLAGS="$CFLAGS -Werror -DG_DISABLE_DEPRECATED"
|
2012-02-02 12:40:47 +00:00
|
|
|
|
INTROSPECTION_FLAGS="--warn-error"
|
2011-09-25 19:13:00 +00:00
|
|
|
|
TEST_MODE="thorough"
|
2012-02-02 13:14:58 +00:00
|
|
|
|
else
|
|
|
|
|
CFLAGS="$CFLAGS -Wno-error"
|
2011-09-25 19:13:00 +00:00
|
|
|
|
TEST_MODE="quick"
|
2012-02-02 12:40:47 +00:00
|
|
|
|
INTROSPECTION_FLAGS=""
|
2012-03-29 10:52:19 +00:00
|
|
|
|
enable_strict="no"
|
2011-09-25 19:13:00 +00:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_MSG_RESULT($enable_strict)
|
2012-02-02 12:40:47 +00:00
|
|
|
|
AC_SUBST(INTROSPECTION_FLAGS)
|
2011-09-25 19:13:00 +00:00
|
|
|
|
AC_SUBST(TEST_MODE)
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for debug mode])
|
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
|
AC_HELP_STRING([--enable-debug=no/default/yes],
|
|
|
|
|
[Turn on or off debugging])
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if test "$enable_debug" != "no"; then
|
|
|
|
|
AC_DEFINE_UNQUOTED(WITH_DEBUG, 1, [Print debug output])
|
|
|
|
|
AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
|
|
|
|
|
CFLAGS="$CFLAGS -g"
|
2011-09-25 08:03:48 +00:00
|
|
|
|
fi
|
2011-09-25 19:13:00 +00:00
|
|
|
|
if test "$enable_debug" = "yes"; then
|
|
|
|
|
debug_status="yes"
|
|
|
|
|
CFLAGS="$CFLAGS -O0"
|
|
|
|
|
elif test "$enable_debug" = "no"; then
|
|
|
|
|
debug_status="no"
|
2012-02-02 13:14:58 +00:00
|
|
|
|
CFLAGS="$CFLAGS -O2"
|
2011-09-25 19:13:00 +00:00
|
|
|
|
AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
|
|
|
|
|
else
|
|
|
|
|
debug_status="default"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_MSG_RESULT($debug_status)
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build with gcov testing])
|
|
|
|
|
AC_ARG_ENABLE([coverage],
|
|
|
|
|
AS_HELP_STRING([--enable-coverage],
|
|
|
|
|
[Whether to enable coverage testing ]),
|
|
|
|
|
[], [enable_coverage=no])
|
|
|
|
|
AC_MSG_RESULT([$enable_coverage])
|
|
|
|
|
|
|
|
|
|
if test "$enable_coverage" = "yes"; then
|
|
|
|
|
if test "$GCC" != "yes"; then
|
|
|
|
|
AC_MSG_ERROR(Coverage testing requires GCC)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_PATH_PROG(GCOV, gcov, no)
|
|
|
|
|
if test "$GCOV" = "no" ; then
|
|
|
|
|
AC_MSG_ERROR(gcov tool is not available)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_PATH_PROG(LCOV, lcov, no)
|
|
|
|
|
if test "$LCOV" = "no" ; then
|
|
|
|
|
AC_MSG_ERROR(lcov tool is not installed)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AC_PATH_PROG(GENHTML, genhtml, no)
|
|
|
|
|
if test "$GENHTML" = "no" ; then
|
|
|
|
|
AC_MSG_ERROR(lcov's genhtml tool is not installed)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
|
|
|
|
|
LDFLAGS="$LDFLAGS -lgcov"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_coverage" = "yes"])
|
|
|
|
|
AC_SUBST(LCOV)
|
|
|
|
|
AC_SUBST(GCOV)
|
|
|
|
|
AC_SUBST(GENHTML)
|
|
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
# Results
|
|
|
|
|
#
|
2011-09-25 08:03:48 +00:00
|
|
|
|
|
2012-02-02 12:40:47 +00:00
|
|
|
|
SECRET_LT_RELEASE=$SECRET_CURRENT:$SECRET_REVISION:$SECRET_AGE
|
|
|
|
|
AC_SUBST(SECRET_LT_RELEASE)
|
|
|
|
|
AC_SUBST(SECRET_MAJOR)
|
|
|
|
|
AC_SUBST(SECRET_MINOR)
|
|
|
|
|
|
2011-09-25 06:22:36 +00:00
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
|
Makefile
|
2012-02-02 13:59:59 +00:00
|
|
|
|
docs/reference/libsecret/Makefile
|
|
|
|
|
docs/reference/libsecret/version.xml
|
2011-09-25 06:22:36 +00:00
|
|
|
|
po/Makefile.in
|
|
|
|
|
po/Makefile
|
2012-07-13 08:32:36 +00:00
|
|
|
|
libsecret/libsecret.pc
|
2012-07-13 09:11:58 +00:00
|
|
|
|
libsecret/libsecret-unstable.pc
|
2019-05-31 07:39:02 +00:00
|
|
|
|
libsecret/secret-version.h
|
2011-09-25 06:22:36 +00:00
|
|
|
|
])
|
2011-06-12 20:55:02 +00:00
|
|
|
|
AC_OUTPUT
|
2011-09-25 08:03:48 +00:00
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo "CFLAGS: $CFLAGS"
|
|
|
|
|
echo
|
|
|
|
|
echo "OPTIONS:"
|
2012-08-08 08:40:30 +00:00
|
|
|
|
echo " libgcrypt: $gcrypt_status"
|
2012-08-16 09:43:42 +00:00
|
|
|
|
echo " vala: $enable_vala"
|
2012-08-08 08:40:30 +00:00
|
|
|
|
echo " Debug: $debug_status"
|
|
|
|
|
echo " Coverage: $enable_coverage"
|
|
|
|
|
echo " Manual Page: $enable_manpages"
|
2011-09-25 08:03:48 +00:00
|
|
|
|
echo
|