summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:33 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:33 +0900
commit262a6d564b513034547cfb9840eb6b6e1dc48a13 (patch)
tree27ff2895a1e1ef383cce8c8f368326e3289518a7 /configure.ac
parent26fb537f9cf011eaeaf975adcad5e8e9154d04fd (diff)
downloadgpgme-262a6d564b513034547cfb9840eb6b6e1dc48a13.tar.gz
gpgme-262a6d564b513034547cfb9840eb6b6e1dc48a13.tar.bz2
gpgme-262a6d564b513034547cfb9840eb6b6e1dc48a13.zip
Imported Upstream version 1.4.0upstream/1.4.0
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac161
1 files changed, 101 insertions, 60 deletions
diff --git a/configure.ac b/configure.ac
index bc57bbd..5126797 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# configure.ac for GPGME
# Copyright (C) 2000 Werner Koch (dd9jn)
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-# 2009, 2010, 2011, 2012 g10 Code GmbH
+# 2009, 2010, 2011, 2012, 2013 g10 Code GmbH
#
# This file is part of GPGME.
#
@@ -22,28 +22,32 @@
AC_PREREQ(2.59)
min_automake_version="1.11"
-# Version number: Remember to change it immediately *after* a release.
-# Make sure to run "svn up" and "./autogen.sh --force"
-# before a "make dist". See below for the LT versions.
-# Never do a binary build with the same version number
-# in another year; this would mess up the build number.
-#
-# The GIT version is usually the next intended release version with
-# the string "-gitNNNNNN" appended. The reason for this is that tests
-# for a specific feature can already be done under the assumption that
-# the GIT version is the most recent one in a branch. To disable the
-# GIT version for the real release, set the my_isgit macro to no.
-m4_define(my_version, [1.3.2])
-m4_define(my_isgit, [no])
-
-m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \
- || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
-m4_define([git_revision], m4_esyscmd([git branch -v 2>/dev/null \
- | awk '/^\* / {printf "%s",$3}']))
-m4_define([my_full_version], [my_version[]m4_if(my_isgit,[yes],
- [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])
-
-AC_INIT([gpgme],[my_full_version],[http://bugs.gnupg.org])
+# To build a release you need to create a tag with the version number
+# (git tag -s gpgme-n.m.k) and run "./autogen.sh --force". Please
+# bump the version number immediately after the release and do another
+# commit and push so that the git magic is able to work. See below
+# for the LT versions.
+m4_define(mym4_version_major, [1])
+m4_define(mym4_version_minor, [4])
+m4_define(mym4_version_micro, [0])
+
+# Below is m4 magic to extract and compute the revision number, the
+# decimalized short revision number, a beta version string, and a flag
+# indicating a development version (mym4_isgit). Note that the m4
+# processing is done by autoconf and not during the configure run.
+m4_define(mym4_version,
+ [mym4_version_major.mym4_version_minor.mym4_version_micro])
+m4_define([mym4_revision],
+ m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
+m4_define([mym4_revision_dec],
+ m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+m4_define([mym4_betastring],
+ m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\
+ awk -F- '$3!=0{print"-beta"$3}']))
+m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
+m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
+
+AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org])
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
@@ -51,29 +55,29 @@ AC_INIT([gpgme],[my_full_version],[http://bugs.gnupg.org])
# (Interfaces added: AGE++)
# (Interfaces removed/changed: AGE=0)
#
-LIBGPGME_LT_CURRENT=19
+LIBGPGME_LT_CURRENT=20
# Subtract 2 from this value if you want to make the LFS transition an
# ABI break. [Note to self: Remove this comment with the next regular break.]
-LIBGPGME_LT_AGE=8
-LIBGPGME_LT_REVISION=1
+LIBGPGME_LT_AGE=9
+LIBGPGME_LT_REVISION=0
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
##############################################
+NEED_GPG_ERROR_VERSION=1.8
NEED_LIBASSUAN_API=2
NEED_LIBASSUAN_VERSION=2.0.2
-m4_define([git_brevis],m4_esyscmd(printf "%u" 0x[]m4_substr(git_revision,0,4)))
-BUILD_REVISION=m4_if(git_revision,[],[svn_revision],[git_brevis])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
-AC_CONFIG_SRCDIR(src/gpgme.h.in)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_CONFIG_SRCDIR(src/gpgme.h.in)
+AC_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
@@ -91,8 +95,9 @@ AH_VERBATIM([_REENTRANT],
AC_PROG_CC
AC_PROG_CXX
-AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
- [build-aux/gitlog-to-changelog])
+
+# Note: A suitable gitlog-to-changelog script can be found in GnuPG master.
+AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog])
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
@@ -102,6 +107,9 @@ AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
+VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \
+ mym4_version_minor mym4_version_micro)
+AC_SUBST(VERSION_NUMBER)
# Don't default to build static libs.
LT_PREREQ([2.2.6])
@@ -131,6 +139,7 @@ GPGCONF_DEFAULT=no
G13_DEFAULT=no
component_system=None
have_dosish_system=no
+have_android_system=no
have_w32_system=no
have_w64_system=no
build_w32_glib=no
@@ -142,6 +151,9 @@ case "${host}" in
*-mingw32ce*)
have_w32ce_system=yes
;;
+ *-linux-androideabi)
+ have_android_system=yes
+ ;;
esac
case "${host}" in
*-mingw32ce*|*-mingw32*)
@@ -210,12 +222,38 @@ if test "$have_w32ce_system" = yes; then
fi
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
+if test "$have_android_system" = yes; then
+ AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
+fi
+AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
+
AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes)
AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
+#
+# Provide information about the build.
+#
+BUILD_REVISION="mym4_revision"
+AC_SUBST(BUILD_REVISION)
+AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
+ [GIT commit id revision used to build this package])
+
+changequote(,)dnl
+BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
+changequote([,])dnl
+BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
+AC_SUBST(BUILD_FILEVERSION)
+
+BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
+AC_SUBST(BUILD_TIMESTAMP)
+AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
+ [The time this package was configured for a build])
+
+
+
# Checks for header files.
AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
@@ -249,8 +287,12 @@ typedef long off_t;
typedef __int64 ssize_t;"
else
INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 32 bit W32 API. */
+#ifndef _OFF_T_DEFINED /* Defined by newer mingw32 toolkits. */
typedef long off_t;
-typedef long ssize_t;"
+#endif
+#ifndef _SSIZE_T_DEFINED /* Defined by newer mingw32 toolkits. */
+typedef long ssize_t;
+#endif"
fi
else
INSERT__TYPEDEFS_FOR_GPGME_H="#include <sys/types.h>"
@@ -278,6 +320,8 @@ fi
# Checks for library functions.
+AC_MSG_NOTICE([checking for libraries])
+
AC_FUNC_FSEEKO
AC_REPLACE_FUNCS(vasprintf)
@@ -326,7 +370,9 @@ fi
AC_CHECK_FUNCS(setlocale)
# Checking for libgpg-error.
-AM_PATH_GPG_ERROR(1.8,, AC_MSG_ERROR([libgpg-error was not found]))
+have_gpg_error=no
+AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
+ have_gpg_error=yes, have_gpg_error=no)
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
[The default error source for GPGME.])
@@ -824,9 +870,9 @@ AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
#include <unistd.h>
])
-use_descriptor_passing=no
+use_descriptor_passing=yes
AC_ARG_ENABLE(fd-passing,
- AC_HELP_STRING([--enable-fd-passing], [use FD passing if supported]),
+ AC_HELP_STRING([--disable-fd-passing], [do not use FD passing]),
use_descriptor_passing=$enableval)
if test "$supports_descriptor_passing" != "yes"; then
@@ -852,23 +898,6 @@ fi
AM_CONDITIONAL(HAVE_UISERVER, test "$uiserver" != "no")
-# Generate values for the DLL version info
-
-dnl Windows uses an internal build number. We use the last day of the
-dnl year concatenated with the hour for it. WARNING: You should not
-dnl do a build with the same version number in another year.
-if test "$have_w32_system" = yes; then
- BUILD_TIMESTAMP=`date --iso-8601=minutes`
- BUILD_NUMBER="$(date -u '+%j%H' | sed 's/^0*\(.*\)/\1/')"
- changequote(,)dnl
- BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
- changequote([,])dnl
- BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_NUMBER}"
-fi
-AC_SUBST(BUILD_NUMBER)
-AC_SUBST(BUILD_TIMESTAMP)
-AC_SUBST(BUILD_FILEVERSION)
-
# Add a few constants to help porting to W32
AH_VERBATIM([SEPCONSTANTS],
[
@@ -890,6 +919,9 @@ AH_BOTTOM([
/* Under WindowsCE we need gpg-error's strerror macro. */
#define GPG_ERR_ENABLE_ERRNO_MACROS 1
+
+#define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \
+ "Copyright (C) 2001--2013 g10 Code GmbH\n"
])
@@ -916,13 +948,23 @@ AC_CHECK_TYPES([error_t], [],
# A substitution to set generated files in a Emacs buffer to read-only.
-AC_SUBST(emacs_local_vars_begin, ['Local Variables:'])
+AC_SUBST(emacs_local_vars_begin, [['Local][ ][Variables:']])
AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
AC_SUBST(emacs_local_vars_end, ['End:'])
# Last check.
die=no
+if test "$have_gpg_error" = "no"; then
+ die=yes
+ AC_MSG_NOTICE([[
+***
+*** You need libgpg-error to build this program.
+** This library is for example available at
+*** ftp://ftp.gnupg.org/gcrypt/libgpg-error
+*** (at least version $NEED_GPG_ERROR_VERSION is required.)
+***]])
+fi
if test "$have_libassuan" = "no"; then
die=yes
AC_MSG_NOTICE([[
@@ -961,22 +1003,21 @@ AC_OUTPUT
echo "
GPGME v${VERSION} has been configured as follows:
+ Revision: mym4_revision (mym4_revision_dec)
+ Platform: $host
+
GnuPG path: $GPG
GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION
-
GpgSM path: $GPGSM
GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
-
GpgConf path: $GPGCONF
GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION
-
G13 path: $G13
G13 version: $G13_VERSION, min. $NEED_G13_VERSION
- Assuan version: $libassuan_version, min. $NEED_LIBASSUAN_VERSION
+ Assuan version: $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION
UI Server: $uiserver
FD Passing: $use_descriptor_passing
-
GPGME Pthread: $have_pthread
"