configure.ac: Bump version number
[platform/upstream/libsecret.git] / configure.ac
index 138149e..4f8342e 100644 (file)
@@ -1,10 +1,31 @@
 AC_PREREQ(2.63)
 
-AC_INIT([libsecret],[0.9],
+AC_INIT([libsecret],[0.18],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret],
         [libsecret])
 
 dnl ****************************************************************************
+dnl Dependency versions
+
+# Required
+
+GLIB_REQ=2.38.0
+GLIB_MIN=GLIB_VERSION_2_38
+GLIB_MAX=GLIB_VERSION_2_38
+
+INTLTOOL_REQ=0.35.0
+
+# Optional
+
+VALA_WANT=0.17.2.12
+
+GCRYPT_WANT=1.2.2
+
+GTKDOC_WANT=1.9
+
+GIR_WANT=1.29
+
+dnl ****************************************************************************
 dnl Library package and libtool versioning
 dnl
 dnl Updating the libtool versions, follow these instructions sequentially:
@@ -24,9 +45,10 @@ SECRET_AGE=0
 # -----------------------------------------------------------------------------
 
 AC_CONFIG_MACRO_DIR([build/m4])
+AC_CONFIG_AUX_DIR([build])
 AM_INIT_AUTOMAKE([1.11 tar-ustar foreign -Wno-portability])
 AM_SANITY_CHECK
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_SRCDIR([libsecret/secret-value.c])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AM_MAINTAINER_MODE([enable])
@@ -43,7 +65,7 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AM_PROG_LIBTOOL
-IT_PROG_INTLTOOL([0.35.0])
+IT_PROG_INTLTOOL($INTLTOOL_REQ)
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
 GETTEXT_PACKAGE=libsecret
@@ -60,23 +82,35 @@ AC_CHECK_FUNCS(mlock)
 # GLib
 
 PKG_CHECK_MODULES(GLIB,
-       glib-2.0 >= 2.31.0
-       gio-2.0 >= 2.31.0
+       glib-2.0 >= $GLIB_REQ
+       gio-2.0
        gio-unix-2.0)
 LIBS="$LIBS $GLIB_LIBS"
-CFLAGS="$CFLAGS $GLIB_CFLAGS"
+CFLAGS="$CFLAGS $GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=$GLIB_MIN -DGLIB_VERSION_MAX_ALLOWED=$GLIB_MAX"
 
-GTK_DOC_CHECK(1.9)
+GTK_DOC_CHECK($GTKDOC_WANT)
 
-GOBJECT_INTROSPECTION_CHECK([1.29])
+GOBJECT_INTROSPECTION_CHECK($GIR_WANT)
 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 # --------------------------------------------------------------------
-# Vala
+# Manual pages
+
+AC_ARG_ENABLE(manpages,
+              AC_HELP_STRING([--disable-manpages], [Build manual pages]))
+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)
 
-VALA_REQUIRED=0.17.2.12
+# --------------------------------------------------------------------
+# Vala
 
-VAPIGEN_CHECK($VALA_REQUIRED)
+VAPIGEN_CHECK($VALA_WANT)
 
 if test "$enable_vala" != "no"; then
        AC_PATH_PROG([VALAC], [valac], [])
@@ -86,7 +120,6 @@ AM_CONDITIONAL(HAVE_VALAC, test "x$VALAC" != "x")
 # --------------------------------------------------------------------
 # libgcrypt
 
-GCRYPT_VERSION=1.2.2
 GCRYPT_LIBVER=1
 
 AC_ARG_ENABLE(gcrypt,
@@ -98,7 +131,7 @@ if test "$enable_gcrypt" != "no"; then
 
        have_gcrypt="no"
        m4_ifdef([AM_PATH_LIBGCRYPT],
-                [AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_VERSION, have_gcrypt=yes)])
+                [AM_PATH_LIBGCRYPT($GCRYPT_LIBVER:$GCRYPT_WANT, have_gcrypt=yes)])
 
        if test $have_gcrypt != "yes"; then
                AC_MSG_ERROR([[
@@ -110,13 +143,13 @@ if test "$enable_gcrypt" != "no"; then
        fi
 
        AC_DEFINE(WITH_GCRYPT, 1, [Build with libgcypt and transport encryption])
-       AC_DEFINE_UNQUOTED(LIBGCRYPT_VERSION, "$GCRYPT_VERSION",
+       AC_DEFINE_UNQUOTED(LIBGCRYPT_VERSION, "$GCRYPT_WANT",
                           [Version of GCRYPT we expect])
 
        AC_SUBST([LIBGCRYPT_CFLAGS])
        AC_SUBST([LIBGCRYPT_LIBS])
 
-       gcrypt_status=$GCRYPT_VERSION
+       gcrypt_status="yes"
        enable_gcrypt="yes"
 else
        gcrypt_status="no"
@@ -132,7 +165,7 @@ if test "$GCC" = "yes"; then
                -Wall -Wmissing-declarations \
                -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
                -Wdeclaration-after-statement -Wformat=2 -Winit-self \
-               -Waggregate-return -Wmissing-format-attribute"
+               -Waggregate-return"
 
        for option in -Wmissing-include-dirs -Wundef; do
                SAVE_CFLAGS="$CFLAGS"
@@ -155,11 +188,7 @@ AC_ARG_ENABLE(strict, [
 AC_MSG_CHECKING([build strict])
 
 if test "$enable_strict" = "yes"; then
-       CFLAGS="$CFLAGS -Werror \
-               -DGTK_DISABLE_DEPRECATED \
-               -DGDK_DISABLE_DEPRECATED \
-               -DG_DISABLE_DEPRECATED \
-               -DGDK_PIXBUF_DISABLE_DEPRECATED"
+       CFLAGS="$CFLAGS -Werror -DG_DISABLE_DEPRECATED"
        INTROSPECTION_FLAGS="--warn-error"
        TEST_MODE="thorough"
 else
@@ -244,21 +273,13 @@ AC_SUBST(SECRET_MINOR)
 
 AC_CONFIG_FILES([
        Makefile
-       build/Makefile
-       docs/Makefile
-       docs/reference/Makefile
        docs/reference/libsecret/Makefile
        docs/reference/libsecret/version.xml
        docs/reference/libsecret/version-major.xml
-       egg/Makefile
-       egg/tests/Makefile
        po/Makefile.in
        po/Makefile
-       libsecret/Makefile
        libsecret/libsecret.pc
        libsecret/libsecret-unstable.pc
-       libsecret/tests/Makefile
-       tool/Makefile
 ])
 AC_OUTPUT
 
@@ -266,7 +287,9 @@ echo
 echo "CFLAGS: $CFLAGS"
 echo
 echo "OPTIONS:"
-echo "  libgcrypt:            $gcrypt_status"
-echo "  Debug:                $debug_status"
-echo "  Coverage:             $enable_coverage"
+echo "  libgcrypt:     $gcrypt_status"
+echo "  vala:          $enable_vala"
+echo "  Debug:         $debug_status"
+echo "  Coverage:      $enable_coverage"
+echo "  Manual Page:   $enable_manpages"
 echo