Blame configure.ac

Packit Service 672cf4
# configure.ac for GPGME
Packit Service 672cf4
# Copyright (C) 2000 Werner Koch (dd9jn)
Packit Service 6c01f9
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
Packit Service 6c01f9
#               2009, 2010, 2011, 2012, 2013, 2014, 2015  g10 Code GmbH
Packit Service 672cf4
#
Packit Service 672cf4
# This file is part of GPGME.
Packit Service 672cf4
#
Packit Service 672cf4
# GPGME is free software; you can redistribute it and/or modify it
Packit Service 672cf4
# under the terms of the GNU Lesser General Public License as
Packit Service 672cf4
# published by the Free Software Foundation; either version 2.1 of the
Packit Service 672cf4
# License, or (at your option) any later version.
Packit Service 672cf4
#
Packit Service 672cf4
# GPGME is distributed in the hope that it will be useful, but WITHOUT
Packit Service 672cf4
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit Service 672cf4
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
Packit Service 672cf4
# Public License for more details.
Packit Service 672cf4
#
Packit Service 6c01f9
# You should have received a copy of the GNU General Public License
Packit Service 6c01f9
# along with this program; if not, see <https://www.gnu.org/licenses/>.
Packit Service 672cf4
Packit Service 672cf4
# (Process this file with autoconf to produce a configure script.)
Packit Service 672cf4
AC_PREREQ(2.59)
Packit Service 672cf4
min_automake_version="1.14"
Packit Service 672cf4
Packit Service 672cf4
# To build a release you need to create a tag with the version number
Packit Service 672cf4
# (git tag -s gpgme-n.m.k) and run "./autogen.sh --force".  Please
Packit Service 672cf4
# bump the version number immediately after the release and do another
Packit Service 672cf4
# commit and push so that the git magic is able to work.  See below
Packit Service 672cf4
# for the LT versions.
Packit Service 6c01f9
m4_define(mym4_version_major, [1])
Packit Service 6c01f9
m4_define(mym4_version_minor, [10])
Packit Service 6c01f9
m4_define(mym4_version_micro, [0])
Packit Service 6c01f9
Packit Service 6c01f9
# Below is m4 magic to extract and compute the revision number, the
Packit Service 6c01f9
# decimalized short revision number, a beta version string, and a flag
Packit Service 6c01f9
# indicating a development version (mym4_isgit). Note that the m4
Packit Service 6c01f9
# processing is done by autoconf and not during the configure run.
Packit Service 6c01f9
m4_define(mym4_version,
Packit Service 6c01f9
          [mym4_version_major.mym4_version_minor.mym4_version_micro])
Packit Service 6c01f9
m4_define([mym4_revision],
Packit Service 6c01f9
          m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
Packit Service 6c01f9
m4_define([mym4_revision_dec],
Packit Service 6c01f9
          m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
Packit Service 6c01f9
m4_define([mym4_betastring],
Packit Service 6c01f9
          m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\
Packit Service 6c01f9
                        awk -F- '$3!=0{print"-beta"$3}']))
Packit Service 6c01f9
m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
Packit Service 6c01f9
m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
Packit Service 6c01f9
Packit Service 6c01f9
AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org])
Packit Service 672cf4
Packit Service 672cf4
# LT Version numbers, remember to change them just *before* a release.
Packit Service 672cf4
#   (Code changed:			REVISION++)
Packit Service 672cf4
#   (Interfaces added/removed/changed:	CURRENT++, REVISION=0)
Packit Service 672cf4
#   (Interfaces added:			AGE++)
Packit Service 6c01f9
#   (Interfaces removed/changed:	AGE=0)
Packit Service 672cf4
#
Packit Service 6c01f9
LIBGPGME_LT_CURRENT=30
Packit Service 6c01f9
LIBGPGME_LT_AGE=19
Packit Service 6c01f9
LIBGPGME_LT_REVISION=0
Packit Service 672cf4
Packit Service 672cf4
# If there is an ABI break in gpgmepp or qgpgme also bump the
Packit Service 672cf4
# version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in
Packit Service 672cf4
Packit Service 6c01f9
LIBGPGMEPP_LT_CURRENT=11
Packit Service 6c01f9
LIBGPGMEPP_LT_AGE=5
Packit Service 672cf4
LIBGPGMEPP_LT_REVISION=0
Packit Service 672cf4
Packit Service 672cf4
LIBQGPGME_LT_CURRENT=10
Packit Service 672cf4
LIBQGPGME_LT_AGE=3
Packit Service 6c01f9
LIBQGPGME_LT_REVISION=0
Packit Service 672cf4
Packit Service 672cf4
# If the API is changed in an incompatible way: increment the next counter.
Packit Service 672cf4
GPGME_CONFIG_API_VERSION=1
Packit Service 672cf4
##############################################
Packit Service 672cf4
Packit Service 672cf4
NEED_GPG_ERROR_VERSION=1.24
Packit Service 672cf4
NEED_LIBASSUAN_API=2
Packit Service 672cf4
NEED_LIBASSUAN_VERSION=2.4.2
Packit Service 672cf4
Packit Service 672cf4
Packit Service 6c01f9
PACKAGE=$PACKAGE_NAME
Packit Service 6c01f9
VERSION=$PACKAGE_VERSION
Packit Service 6c01f9
Packit Service 6c01f9
VERSION_MAJOR=mym4_version_major
Packit Service 6c01f9
VERSION_MINOR=mym4_version_minor
Packit Service 6c01f9
VERSION_MICRO=mym4_version_micro
Packit Service 672cf4
Packit Service 672cf4
AC_CONFIG_AUX_DIR([build-aux])
Packit Service 672cf4
AC_CONFIG_MACRO_DIR([m4])
Packit Service 672cf4
AC_CONFIG_SRCDIR(src/gpgme.h.in)
Packit Service 6c01f9
AC_CONFIG_HEADER(config.h)
Packit Service 672cf4
AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
Packit Service 672cf4
AM_MAINTAINER_MODE
Packit Service 672cf4
AC_CANONICAL_HOST
Packit Service 672cf4
AM_SILENT_RULES
Packit Service 672cf4
AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
Packit Service 672cf4
Packit Service 672cf4
# Enable GNU extensions on systems that have them.
Packit Service 672cf4
AC_GNU_SOURCE
Packit Service 672cf4
Packit Service 672cf4
AH_VERBATIM([_REENTRANT],
Packit Service 672cf4
[/* To allow the use of GPGME in multithreaded programs we have to use
Packit Service 672cf4
  special features from the library.
Packit Service 672cf4
  IMPORTANT: gpgme is not yet fully reentrant and you should use it
Packit Service 672cf4
  only from one thread.  */
Packit Service 672cf4
#ifndef _REENTRANT
Packit Service 672cf4
# define _REENTRANT 1
Packit Service 672cf4
#endif])
Packit Service 672cf4
Packit Service 672cf4
AC_PROG_CC
Packit Service 672cf4
AC_PROG_CPP
Packit Service 672cf4
AC_PROG_CXX
Packit Service 672cf4
Packit Service 672cf4
# Note: A suitable gitlog-to-changelog script can be found in GnuPG master.
Packit Service 672cf4
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog])
Packit Service 672cf4
Packit Service 6c01f9
AC_SUBST(LIBGPGME_LT_CURRENT)
Packit Service 6c01f9
AC_SUBST(LIBGPGME_LT_AGE)
Packit Service 6c01f9
AC_SUBST(LIBGPGME_LT_REVISION)
Packit Service 6c01f9
AC_SUBST(LIBGPGMEPP_LT_CURRENT)
Packit Service 6c01f9
AC_SUBST(LIBGPGMEPP_LT_AGE)
Packit Service 6c01f9
AC_SUBST(LIBGPGMEPP_LT_REVISION)
Packit Service 6c01f9
AC_SUBST(LIBQGPGME_LT_CURRENT)
Packit Service 6c01f9
AC_SUBST(LIBQGPGME_LT_AGE)
Packit Service 6c01f9
AC_SUBST(LIBQGPGME_LT_REVISION)
Packit Service 6c01f9
Packit Service 6c01f9
AC_SUBST(PACKAGE)
Packit Service 6c01f9
AC_SUBST(VERSION)
Packit Service 672cf4
AC_SUBST(VERSION_MAJOR)
Packit Service 672cf4
AC_SUBST(VERSION_MINOR)
Packit Service 672cf4
AC_SUBST(VERSION_MICRO)
Packit Service 6c01f9
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
Packit Service 6c01f9
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
Packit Service 6c01f9
VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \
Packit Service 6c01f9
                          mym4_version_minor mym4_version_micro)
Packit Service 672cf4
AC_SUBST(VERSION_NUMBER)
Packit Service 672cf4
Packit Service 672cf4
# We need to compile and run a program on the build machine.  A
Packit Service 672cf4
# comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in
Packit Service 672cf4
# the AC archive is broken for autoconf 2.57.  Given that there is no
Packit Service 672cf4
# newer version of that macro, we assume that it is also broken for
Packit Service 672cf4
# autoconf 2.61 and thus we use a simple but usually sufficient
Packit Service 672cf4
# approach.
Packit Service 672cf4
AC_MSG_CHECKING(for cc for build)
Packit Service 672cf4
if test "$cross_compiling" = "yes"; then
Packit Service 672cf4
  CC_FOR_BUILD="${CC_FOR_BUILD-cc}"
Packit Service 672cf4
else
Packit Service 672cf4
  CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
Packit Service 672cf4
fi
Packit Service 672cf4
AC_MSG_RESULT($CC_FOR_BUILD)
Packit Service 672cf4
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Don't default to build static libs.
Packit Service 672cf4
LT_PREREQ([2.2.6])
Packit Service 672cf4
LT_INIT([win32-dll disable-static])
Packit Service 672cf4
LT_LANG([Windows Resource])
Packit Service 672cf4
Packit Service 672cf4
# For now we hardcode the use of version scripts.  It would be better
Packit Service 672cf4
# to write a test for this or even implement this within libtool.
Packit Service 672cf4
have_ld_version_script=no
Packit Service 672cf4
case "${host}" in
Packit Service 672cf4
    *-*-linux*)
Packit Service 672cf4
	have_ld_version_script=yes
Packit Service 672cf4
        ;;
Packit Service 672cf4
    *-*-gnu*)
Packit Service 672cf4
	have_ld_version_script=yes
Packit Service 672cf4
        ;;
Packit Service 672cf4
    *-apple-darwin*)
Packit Service 672cf4
        AC_DEFINE(_DARWIN_C_SOURCE, 900000L,
Packit Service 672cf4
                  Expose all libc features (__DARWIN_C_FULL).)
Packit Service 672cf4
        AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
Packit Service 672cf4
        ;;
Packit Service 672cf4
esac
Packit Service 672cf4
Packit Service 672cf4
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
Packit Service 672cf4
Packit Service 672cf4
GPG_DEFAULT=no
Packit Service 672cf4
GPGSM_DEFAULT=no
Packit Service 672cf4
GPGCONF_DEFAULT=no
Packit Service 672cf4
G13_DEFAULT=no
Packit Service 672cf4
component_system=None
Packit Service 672cf4
have_dosish_system=no
Packit Service 672cf4
have_android_system=no
Packit Service 672cf4
have_w32_system=no
Packit Service 672cf4
have_w64_system=no
Packit Service 672cf4
have_macos_system=no
Packit Service 672cf4
build_w32_glib=no
Packit Service 672cf4
build_w32_qt=no
Packit Service 6c01f9
available_languages="cl cpp python python2 python3 qt"
Packit Service 672cf4
default_languages="cl cpp python qt"
Packit Service 672cf4
case "${host}" in
Packit Service 672cf4
    x86_64-*mingw32*)
Packit Service 672cf4
        have_w64_system=yes
Packit Service 672cf4
        ;;
Packit Service 6c01f9
    *-mingw32ce*)
Packit Service 6c01f9
        have_w32ce_system=yes
Packit Service 6c01f9
	;;
Packit Service 672cf4
    *-linux-androideabi)
Packit Service 672cf4
        have_android_system=yes
Packit Service 672cf4
        ;;
Packit Service 672cf4
    *-apple-darwin*)
Packit Service 672cf4
        have_macos_system=yes
Packit Service 672cf4
        ;;
Packit Service 672cf4
esac
Packit Service 672cf4
case "${host}" in
Packit Service 6c01f9
    *-mingw32ce*|*-mingw32*)
Packit Service 672cf4
	have_dosish_system=yes
Packit Service 672cf4
        have_w32_system=yes
Packit Service 672cf4
        GPG_DEFAULT='c:\\gnupg\\gpg.exe'
Packit Service 672cf4
	GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
Packit Service 672cf4
        GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe'
Packit Service 672cf4
        G13_DEFAULT='c:\\gnupg\\g13.exe'
Packit Service 672cf4
        #component_system='COM+'
Packit Service 672cf4
Packit Service 672cf4
	AM_PATH_GLIB_2_0
Packit Service 672cf4
	AC_ARG_ENABLE(w32-glib,
Packit Service 672cf4
	    AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]),
Packit Service 672cf4
	    		   build_w32_glib=$enableval)
Packit Service 672cf4
       ;;
Packit Service 672cf4
    *)
Packit Service 672cf4
Packit Service 672cf4
	# XXX: Probably use exec-prefix here?
Packit Service 672cf4
#	GPG_DEFAULT='/usr/bin/gpg'
Packit Service 672cf4
#	GPGSM_DEFAULT='/usr/bin/gpgsm'
Packit Service 672cf4
#	GPGCONF_DEFAULT='/usr/bin/gpgconf'
Packit Service 672cf4
#	G13_DEFAULT='/usr/bin/g13'
Packit Service 672cf4
	;;
Packit Service 672cf4
esac
Packit Service 672cf4
Packit Service 672cf4
if test "$have_dosish_system" = yes; then
Packit Service 672cf4
   AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
Packit Service 672cf4
             [Defined if we run on some of the PCDOS like systems
Packit Service 672cf4
              (DOS, Windoze. OS/2) with special properties like
Packit Service 672cf4
              no file modes])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
Packit Service 672cf4
Packit Service 672cf4
if test "$have_w32_system" = yes; then
Packit Service 672cf4
   AC_DEFINE(HAVE_W32_SYSTEM,1,
Packit Service 672cf4
             [Defined if we run on any kind of W32 API based system])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
Packit Service 672cf4
Packit Service 672cf4
if test "$have_w64_system" = yes; then
Packit Service 672cf4
   AC_DEFINE(HAVE_W64_SYSTEM,1,
Packit Service 672cf4
             [Defined if we run on a 64 bit W32 API based system])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
Packit Service 672cf4
Packit Service 6c01f9
if test "$have_w32ce_system" = yes; then
Packit Service 6c01f9
   AC_DEFINE(HAVE_W32CE_SYSTEM,1,
Packit Service 6c01f9
             [Defined if we run on a W32 CE API based system])
Packit Service 6c01f9
fi
Packit Service 6c01f9
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
Packit Service 6c01f9
Packit Service 672cf4
if test "$have_android_system" = yes; then
Packit Service 672cf4
   AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
Packit Service 672cf4
Packit Service 672cf4
if test "$have_macos_system" = yes; then
Packit Service 672cf4
   AC_DEFINE(HAVE_MACOS_SYSTEM,1,
Packit Service 672cf4
             [Defined if we build for an MacOS system])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_MACOS_SYSTEM, test "$have_macos_system" = yes)
Packit Service 672cf4
Packit Service 672cf4
AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes)
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
AC_ARG_ENABLE([fixed-path],
Packit Service 672cf4
              AC_HELP_STRING([--enable-fixed-path=PATH],
Packit Service 672cf4
                             [locate binaries only via this PATH]),
Packit Service 672cf4
              [fixed_search_path="$enableval"],
Packit Service 672cf4
              [fixed_search_path=""])
Packit Service 672cf4
if test x$fixed_search_path != x ; then
Packit Service 672cf4
  AC_DEFINE_UNQUOTED(FIXED_SEARCH_PATH, "$fixed_search_path",
Packit Service 672cf4
                    [Locate binaries only via this PATH])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Note: You need to declare all possible languages also in
Packit Service 672cf4
#       lang/Makefile.am's DIST_SUBDIRS.
Packit Service 672cf4
AC_ARG_ENABLE([languages],
Packit Service 672cf4
              AC_HELP_STRING([--enable-languages=languages],
Packit Service 672cf4
                             [enable only specific language bindings]),
Packit Service 672cf4
                             [enabled_languages=`echo $enableval | \
Packit Service 672cf4
                             tr ',:' '  ' | tr '[A-Z]' '[a-z]' | \
Packit Service 672cf4
                             sed 's/c++/cpp/'`],
Packit Service 672cf4
                             [enabled_languages="maybe"])
Packit Service 672cf4
if test "x$enabled_languages" = "x" \
Packit Service 672cf4
   -o "$enabled_languages" = "no"; then
Packit Service 672cf4
   enabled_languages=
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
# If languages are explicitly set missing requirements
Packit Service 672cf4
# for the languages are treated as errors otherwise
Packit Service 672cf4
# there will be a warning.
Packit Service 672cf4
explicit_languages=1
Packit Service 672cf4
if test "x$enabled_languages" = "xmaybe"; then
Packit Service 672cf4
    explicit_languages=0
Packit Service 672cf4
    enabled_languages="$default_languages"
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
for language in $enabled_languages; do
Packit Service 672cf4
    LIST_MEMBER($language, $available_languages)
Packit Service 672cf4
    if test "$found" = "0"; then
Packit Service 672cf4
       AC_MSG_ERROR([unsupported language binding specified])
Packit Service 672cf4
    fi
Packit Service 672cf4
done
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Enable C++ 11 if cpp language is requested
Packit Service 672cf4
LIST_MEMBER("cpp", $enabled_languages)
Packit Service 672cf4
if test "$found" = "1"; then
Packit Service 672cf4
    AX_CXX_COMPILE_STDCXX(11, noext, optional)
Packit Service 672cf4
    if test "$HAVE_CXX11" != "1"; then
Packit Service 672cf4
        if test "$explicit_languages" = "1"; then
Packit Service 672cf4
            AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** A compiler with c++11 support is required for the c++ binding.
Packit Service 672cf4
***]])
Packit Service 672cf4
        else
Packit Service 672cf4
            enabled_languages=$(echo $enabled_languages | sed 's/cpp//')
Packit Service 672cf4
            enabled_languages=$(echo $enabled_languages | sed 's/qt//')
Packit Service 672cf4
            AC_MSG_WARN([[
Packit Service 672cf4
***
Packit Service 672cf4
*** No c++11 support detected. C++ and Qt bindings will be disabled.
Packit Service 672cf4
***]])
Packit Service 672cf4
        fi
Packit Service 672cf4
    fi
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
# Check that if qt is enabled cpp also is enabled
Packit Service 672cf4
LIST_MEMBER("qt", $enabled_languages)
Packit Service 672cf4
if test "$found" = "1"; then
Packit Service 672cf4
    # We need to ensure that in the language order qt comes after cpp
Packit Service 672cf4
    # so we remove qt first and explicitly add it as last list member.
Packit Service 672cf4
    enabled_languages=$(echo $enabled_languages | sed 's/qt//')
Packit Service 672cf4
    LIST_MEMBER("cpp", $enabled_languages)
Packit Service 672cf4
    if test "$found" = "0"; then
Packit Service 672cf4
        AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** Qt language binding depends on cpp binding.
Packit Service 672cf4
***]])
Packit Service 672cf4
    fi
Packit Service 672cf4
    FIND_QT
Packit Service 672cf4
    if test "$have_qt5_libs" != "yes"; then
Packit Service 672cf4
        if test "$explicit_languages" = "1"; then
Packit Service 672cf4
        AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** Qt5 (Qt5Core) is required for Qt binding.
Packit Service 672cf4
***]])
Packit Service 672cf4
        else
Packit Service 672cf4
           AC_MSG_WARN([[
Packit Service 672cf4
***
Packit Service 672cf4
*** Qt5 (Qt5Core) not found Qt Binding will be disabled.
Packit Service 672cf4
***]])
Packit Service 672cf4
        fi
Packit Service 672cf4
    else
Packit Service 672cf4
        enabled_languages=`echo $enabled_languages qt`
Packit Service 672cf4
Packit Service 672cf4
        AC_CHECK_PROGS([DOXYGEN], [doxygen])
Packit Service 672cf4
        if test -z "$DOXYGEN";
Packit Service 6c01f9
            # This is not highlighted becase it's not really important.
Packit Service 672cf4
            then AC_MSG_WARN([Doxygen not found - Qt binding doc will not be built.])
Packit Service 672cf4
        fi
Packit Service 672cf4
        AC_CHECK_PROGS([GRAPHVIZ], [dot])
Packit Service 672cf4
        if test -z "$GRAPHVIZ";
Packit Service 672cf4
            then AC_MSG_WARN([Graphviz not found - Qt binding doc will not have diagrams.])
Packit Service 672cf4
        fi
Packit Service 672cf4
    fi
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL([HAVE_DOXYGEN],
Packit Service 672cf4
               [test -n "$DOXYGEN"])
Packit Service 672cf4
if test -n "$GRAPHVIZ"; then
Packit Service 672cf4
    HAVE_DOT="YES"
Packit Service 672cf4
else
Packit Service 672cf4
    HAVE_DOT="NO"
Packit Service 672cf4
fi
Packit Service 672cf4
AC_SUBST(HAVE_DOT)
Packit Service 672cf4
Packit Service 672cf4
# Python bindings.
Packit Service 6c01f9
LIST_MEMBER("python2", $enabled_languages)
Packit Service 6c01f9
found_py2=$found
Packit Service 6c01f9
LIST_MEMBER("python3", $enabled_languages)
Packit Service 6c01f9
found_py3=$found
Packit Service 672cf4
LIST_MEMBER("python", $enabled_languages)
Packit Service 672cf4
found_py=$found
Packit Service 6c01f9
if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
Packit Service 672cf4
    AX_PKG_SWIG
Packit Service 672cf4
    if test -z "$SWIG"; then
Packit Service 672cf4
        if test "$explicit_languages" = "1"; then
Packit Service 672cf4
            AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** You need SWIG to build the Python bindings.
Packit Service 672cf4
***]])
Packit Service 672cf4
        else
Packit Service 672cf4
            enabled_languages=$(echo $enabled_languages | sed 's/python//')
Packit Service 672cf4
        fi
Packit Service 672cf4
    else
Packit Service 6c01f9
        # Reset all the stuff, just to be sure.
Packit Service 672cf4
	PYTHONS=
Packit Service 672cf4
	PYTHON_VERSIONS=
Packit Service 6c01f9
	unset PYTHON
Packit Service 6c01f9
	unset PYTHON_VERSION
Packit Service 6c01f9
	unset PYTHON_CPPFLAGS
Packit Service 6c01f9
	unset PYTHON_LDFLAGS
Packit Service 6c01f9
	unset PYTHON_SITE_PKG
Packit Service 6c01f9
	unset PYTHON_EXTRA_LIBS
Packit Service 6c01f9
	unset PYTHON_EXTRA_LDFLAGS
Packit Service 6c01f9
	unset ac_cv_path_PYTHON
Packit Service 6c01f9
	unset am_cv_pathless_PYTHON
Packit Service 6c01f9
	unset am_cv_python_version
Packit Service 6c01f9
	unset am_cv_python_platform
Packit Service 6c01f9
	unset am_cv_python_pythondir
Packit Service 6c01f9
	unset am_cv_python_pyexecdir
Packit Service 6c01f9
Packit Service 6c01f9
	if test "$found_py" = "1" -o "$found_py2" = "1"; then
Packit Service 6c01f9
	    AM_PATH_PYTHON([2.7], [
Packit Service 6c01f9
		AX_PYTHON_DEVEL
Packit Service 6c01f9
		if test "$PYTHON_VERSION"; then
Packit Service 6c01f9
			PYTHONS="$(echo $PYTHONS $PYTHON)"
Packit Service 6c01f9
			PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
Packit Service 6c01f9
		fi
Packit Service 6c01f9
	    ], :)
Packit Service 6c01f9
	fi
Packit Service 672cf4
Packit Service 672cf4
	if test "$found_py" = "1" -o "$found_py3" = "1"; then
Packit Service 6c01f9
	    # Reset everything, so that we can look for another Python.
Packit Service 6c01f9
	    unset PYTHON
Packit Service 672cf4
	    unset PYTHON_VERSION
Packit Service 672cf4
	    unset PYTHON_CPPFLAGS
Packit Service 672cf4
	    unset PYTHON_LDFLAGS
Packit Service 672cf4
	    unset PYTHON_SITE_PKG
Packit Service 672cf4
	    unset PYTHON_EXTRA_LIBS
Packit Service 672cf4
	    unset PYTHON_EXTRA_LDFLAGS
Packit Service 672cf4
	    unset ac_cv_path_PYTHON
Packit Service 672cf4
	    unset am_cv_pathless_PYTHON
Packit Service 672cf4
	    unset am_cv_python_version
Packit Service 672cf4
	    unset am_cv_python_platform
Packit Service 672cf4
	    unset am_cv_python_pythondir
Packit Service 672cf4
	    unset am_cv_python_pyexecdir
Packit Service 6c01f9
	    AM_PATH_PYTHON([3.4], [
Packit Service 672cf4
		AX_PYTHON_DEVEL
Packit Service 672cf4
		if test "$PYTHON_VERSION"; then
Packit Service 672cf4
			PYTHONS="$(echo $PYTHONS $PYTHON)"
Packit Service 672cf4
			PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
Packit Service 672cf4
		fi
Packit Service 6c01f9
	    ], :)
Packit Service 672cf4
	fi
Packit Service 672cf4
Packit Service 672cf4
	# Recover some values lost in the second attempt to find Python.
Packit Service 672cf4
	PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)"
Packit Service 672cf4
	PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)"
Packit Service 672cf4
Packit Service 672cf4
	# Remove duplicates.
Packit Service 672cf4
	PYTHONS="$(echo $PYTHONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
Packit Service 672cf4
	PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
Packit Service 672cf4
Packit Service 672cf4
	if test "$PYTHON_VERSIONS"; then
Packit Service 672cf4
	   enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python ($PYTHON_VERSIONS)/")
Packit Service 672cf4
	   enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python/")
Packit Service 672cf4
	else
Packit Service 672cf4
            if test "$explicit_languages" = "1"; then
Packit Service 672cf4
                AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** Please install the python development packages.
Packit Service 672cf4
***]])
Packit Service 672cf4
	    else
Packit Service 672cf4
                enabled_languages=$(echo $enabled_languages | sed 's/python//')
Packit Service 672cf4
            fi
Packit Service 672cf4
	fi
Packit Service 672cf4
Packit Service 672cf4
	AC_SUBST(PYTHONS, $PYTHONS)
Packit Service 672cf4
    fi
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
AC_SUBST(ENABLED_LANGUAGES, $enabled_languages)
Packit Service 672cf4
Packit Service 672cf4
#
Packit Service 672cf4
# Provide information about the build.
Packit Service 672cf4
#
Packit Service 672cf4
BUILD_REVISION="mym4_revision"
Packit Service 672cf4
AC_SUBST(BUILD_REVISION)
Packit Service 672cf4
AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
Packit Service 672cf4
                   [GIT commit id revision used to build this package])
Packit Service 672cf4
Packit Service 672cf4
changequote(,)dnl
Packit Service 6c01f9
BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
Packit Service 672cf4
changequote([,])dnl
Packit Service 6c01f9
BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
Packit Service 672cf4
AC_SUBST(BUILD_FILEVERSION)
Packit Service 672cf4
Packit Service 672cf4
AC_ARG_ENABLE([build-timestamp],
Packit Service 672cf4
  AC_HELP_STRING([--enable-build-timestamp],
Packit Service 672cf4
                 [set an explicit build timestamp for reproducibility.
Packit Service 672cf4
                  (default is the current time in ISO-8601 format)]),
Packit Service 672cf4
     [if test "$enableval" = "yes"; then
Packit Service 672cf4
        BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
Packit Service 672cf4
      else
Packit Service 672cf4
        BUILD_TIMESTAMP="$enableval"
Packit Service 672cf4
      fi],
Packit Service 672cf4
     [BUILD_TIMESTAMP="<none>"])
Packit Service 672cf4
AC_SUBST(BUILD_TIMESTAMP)
Packit Service 672cf4
AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
Packit Service 672cf4
                   [The time this package was configured for a build])
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
#
Packit Service 672cf4
# Options to disable some regression tests
Packit Service 672cf4
#
Packit Service 672cf4
run_gpgconf_test="yes"
Packit Service 672cf4
AC_ARG_ENABLE(gpgconf-test,
Packit Service 672cf4
  AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF regression test]),
Packit Service 672cf4
         run_gpgconf_test=$enableval)
Packit Service 672cf4
AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
Packit Service 672cf4
Packit Service 672cf4
run_gpg_test="yes"
Packit Service 672cf4
AC_ARG_ENABLE(gpg-test,
Packit Service 672cf4
  AC_HELP_STRING([--disable-gpg-test], [disable GPG regression test]),
Packit Service 672cf4
         run_gpg_test=$enableval)
Packit Service 672cf4
AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
Packit Service 672cf4
Packit Service 672cf4
run_gpgsm_test="yes"
Packit Service 672cf4
AC_ARG_ENABLE(gpgsm-test,
Packit Service 672cf4
  AC_HELP_STRING([--disable-gpgsm-test], [disable GPGSM regression test]),
Packit Service 672cf4
         run_gpgsm_test=$enableval)
Packit Service 672cf4
AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
Packit Service 672cf4
Packit Service 672cf4
run_g13_test="yes"
Packit Service 672cf4
AC_ARG_ENABLE(g13-test,
Packit Service 672cf4
  AC_HELP_STRING([--disable-g13-test], [disable G13 regression test]),
Packit Service 672cf4
         run_g13_test=$enableval)
Packit Service 672cf4
AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Checks for header files.
Packit Service 6c01f9
AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
Packit Service 672cf4
                       unistd.h sys/time.h sys/types.h sys/stat.h])
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Type checks.
Packit Service 672cf4
AC_C_INLINE
Packit Service 672cf4
AC_CHECK_SIZEOF(unsigned int)
Packit Service 672cf4
AC_SYS_LARGEFILE
Packit Service 672cf4
AC_TYPE_OFF_T
Packit Service 672cf4
AC_TYPE_UINTPTR_T
Packit Service 672cf4
Packit Service 672cf4
# A simple compile time check in gpgme.h for GNU/Linux systems that
Packit Service 672cf4
# prevents a file offset bits mismatch between gpgme and the application.
Packit Service 672cf4
NEED__FILE_OFFSET_BITS=0
Packit Service 672cf4
if test "$have_w32_system" != yes; then
Packit Service 672cf4
  case "$ac_cv_sys_file_offset_bits" in
Packit Service 672cf4
    "" | no | unknown) ;;
Packit Service 672cf4
    *)
Packit Service 672cf4
    NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
Packit Service 672cf4
    ;;
Packit Service 672cf4
  esac
Packit Service 672cf4
fi
Packit Service 672cf4
AC_SUBST(NEED__FILE_OFFSET_BITS)
Packit Service 672cf4
Packit Service 672cf4
# Figure out platform dependent typedefs for gpgme.h
Packit Service 672cf4
if test "$have_w32_system" = yes; then
Packit Service 672cf4
    INSERT__TYPEDEFS_FOR_GPGME_H="
Packit Service 672cf4
#ifdef _WIN64
Packit Service 672cf4
# include <stdint.h>
Packit Service 672cf4
  typedef int64_t gpgme_off_t;
Packit Service 672cf4
  typedef int64_t gpgme_ssize_t;
Packit Service 672cf4
#else /* _WIN32 */
Packit Service 672cf4
  typedef long gpgme_off_t;
Packit Service 672cf4
  typedef long gpgme_ssize_t;
Packit Service 672cf4
#endif /* _WIN32 */"
Packit Service 672cf4
    API__OFF_T="gpgme_off_t"
Packit Service 672cf4
    API__SSIZE_T="gpgme_ssize_t"
Packit Service 672cf4
else
Packit Service 672cf4
    INSERT__TYPEDEFS_FOR_GPGME_H="
Packit Service 672cf4
#include <sys/types.h>
Packit Service 672cf4
typedef off_t   gpgme_off_t;
Packit Service 672cf4
typedef ssize_t gpgme_ssize_t;"
Packit Service 672cf4
    API__OFF_T="off_t"
Packit Service 672cf4
    API__SSIZE_T="ssize_t"
Packit Service 672cf4
fi
Packit Service 672cf4
AC_SUBST(INSERT__TYPEDEFS_FOR_GPGME_H)
Packit Service 672cf4
AM_SUBST_NOTMAKE(INSERT__TYPEDEFS_FOR_GPGME_H)
Packit Service 672cf4
AC_SUBST(API__OFF_T)
Packit Service 672cf4
AM_SUBST_NOTMAKE(API__OFF_T)
Packit Service 672cf4
AC_SUBST(API__SSIZE_T)
Packit Service 672cf4
AM_SUBST_NOTMAKE(API__SSIZE_T)
Packit Service 672cf4
Packit Service 672cf4
# Checks for compiler features.
Packit Service 672cf4
if test "$GCC" = yes; then
Packit Service 672cf4
    CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
Packit Service 672cf4
    if test "$USE_MAINTAINER_MODE" = "yes"; then
Packit Service 6c01f9
        CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
Packit Service 6c01f9
Packit Service 6c01f9
        # If -Wno-missing-field-initializers is supported we can enable a
Packit Service 6c01f9
        # a bunch of really useful warnings.
Packit Service 6c01f9
        AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
Packit Service 6c01f9
        _gcc_cflags_save=$CFLAGS
Packit Service 6c01f9
        CFLAGS="-Wno-missing-field-initializers"
Packit Service 6c01f9
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
Packit Service 6c01f9
        AC_MSG_RESULT($_gcc_wopt)
Packit Service 6c01f9
        CFLAGS=$_gcc_cflags_save;
Packit Service 672cf4
        if test x"$_gcc_wopt" = xyes ; then
Packit Service 672cf4
          CFLAGS="$CFLAGS -W -Wextra -Wbad-function-cast"
Packit Service 672cf4
          CFLAGS="$CFLAGS -Wwrite-strings"
Packit Service 672cf4
          CFLAGS="$CFLAGS -Wdeclaration-after-statement"
Packit Service 6c01f9
          CFLAGS="$CFLAGS -Wno-missing-field-initializers"
Packit Service 6c01f9
          CFLAGS="$CFLAGS -Wno-sign-compare"
Packit Service 672cf4
        fi
Packit Service 672cf4
        CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-shadow"
Packit Service 672cf4
Packit Service 672cf4
        AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
Packit Service 672cf4
        _gcc_cflags_save=$CFLAGS
Packit Service 672cf4
        CFLAGS="-Wpointer-arith"
Packit Service 672cf4
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no)
Packit Service 672cf4
        AC_MSG_RESULT($_gcc_wopt)
Packit Service 672cf4
        CFLAGS=$_gcc_cflags_save;
Packit Service 672cf4
        if test x"$_gcc_wopt" = xyes ; then
Packit Service 672cf4
          CFLAGS="$CFLAGS -Wpointer-arith"
Packit Service 672cf4
        fi
Packit Service 672cf4
    fi
Packit Service 672cf4
    if test "$have_w32_system" = yes; then
Packit Service 672cf4
       CFLAGS="$CFLAGS -mms-bitfields"
Packit Service 672cf4
    fi
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
# Only used for debugging, so no serious test needed (for actual
Packit Service 672cf4
# functionality you have to test libc as well, this only tests the
Packit Service 672cf4
# compiler).
Packit Service 672cf4
AC_CACHE_CHECK([for __thread],[gpgme_cv_tls_works],
Packit Service 672cf4
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([__thread int foo;])],
Packit Service 672cf4
                     gpgme_cv_tls_works=yes,gpgme_cv_tls_works=no))
Packit Service 672cf4
if test "$gpgme_cv_tls_works" = yes; then
Packit Service 672cf4
  AC_DEFINE(HAVE_TLS, [1], [Define if __thread is supported])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Checks for library functions.
Packit Service 672cf4
AC_MSG_NOTICE([checking for libraries])
Packit Service 672cf4
Packit Service 672cf4
AC_FUNC_FSEEKO
Packit Service 672cf4
Packit Service 672cf4
# Try to find a thread-safe version of ttyname().
Packit Service 672cf4
gnupg_REPLACE_TTYNAME_R
Packit Service 672cf4
if test "$ac_cv_func_ttyname_r" != yes; then
Packit Service 672cf4
  AC_MSG_WARN([
Packit Service 672cf4
***
Packit Service 672cf4
*** ttyname() is not thread-safe and ttyname_r() does not exist
Packit Service 672cf4
***])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
# Try to find a thread-safe version of getenv().
Packit Service 672cf4
have_thread_safe_getenv=no
Packit Service 672cf4
jm_GLIBC21
Packit Service 6c01f9
if test $GLIBC21 = yes; then
Packit Service 672cf4
  have_thread_safe_getenv=yes
Packit Service 672cf4
fi
Packit Service 672cf4
if test $have_thread_safe_getenv = yes; then
Packit Service 672cf4
  AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
Packit Service 672cf4
fi
Packit Service 672cf4
have_getenv_r=no
Packit Service 672cf4
AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
Packit Service 672cf4
if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
Packit Service 672cf4
  AC_MSG_WARN([
Packit Service 672cf4
***
Packit Service 672cf4
*** getenv() is not thread-safe and getenv_r() does not exist
Packit Service 672cf4
***])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
# For converting time strings to seconds since Epoch, we need the timegm
Packit Service 672cf4
# function.
Packit Service 672cf4
AC_CHECK_FUNCS(timegm)
Packit Service 672cf4
if test "$ac_cv_func_timegm" != yes; then
Packit Service 672cf4
  AC_MSG_WARN([
Packit Service 672cf4
***
Packit Service 672cf4
*** timegm() not available - a non-thread-safe kludge will be used
Packit Service 672cf4
*** and the TZ variable might be changed at runtime.
Packit Service 672cf4
***])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
AC_CHECK_FUNCS(setlocale)
Packit Service 672cf4
Packit Service 672cf4
# Checking for libgpg-error.
Packit Service 672cf4
have_gpg_error=no
Packit Service 672cf4
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
Packit Service 672cf4
                  have_gpg_error=yes, have_gpg_error=no)
Packit Service 672cf4
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
Packit Service 672cf4
          [The default error source for GPGME.])
Packit Service 672cf4
Packit Service 672cf4
# And for libassuan.
Packit Service 672cf4
have_libassuan=no
Packit Service 672cf4
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
Packit Service 672cf4
                  have_libassuan=yes, have_libassuan=no)
Packit Service 672cf4
if test "$have_libassuan" = "yes"; then
Packit Service 672cf4
  AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version",
Packit Service 672cf4
                     [version of the libassuan library])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
#
Packit Service 672cf4
# Other checks
Packit Service 672cf4
#
Packit Service 672cf4
Packit Service 672cf4
# Check for getgid etc
Packit Service 672cf4
AC_CHECK_FUNCS(getgid getegid closefrom)
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Replacement functions.
Packit Service 672cf4
AC_REPLACE_FUNCS(stpcpy)
Packit Service 672cf4
AC_REPLACE_FUNCS(setenv)
Packit Service 672cf4
Packit Service 672cf4
# Assuan check for descriptor passing.
Packit Service 672cf4
AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
Packit Service 672cf4
                [supports_descriptor_passing=yes],
Packit Service 672cf4
                [supports_descriptor_passing=no
Packit Service 672cf4
                 AC_MSG_WARN([
Packit Service 672cf4
***
Packit Service 672cf4
*** Data structure for sending ancillary data missing.
Packit Service 672cf4
*** Descriptor passing won't work.
Packit Service 672cf4
***])],[
Packit Service 672cf4
#include <stdlib.h>
Packit Service 672cf4
#include <stddef.h>
Packit Service 672cf4
#include <stdio.h>
Packit Service 672cf4
#include <sys/types.h>
Packit Service 672cf4
#include <sys/socket.h>
Packit Service 672cf4
#include <sys/un.h>
Packit Service 672cf4
#if HAVE_SYS_UIO_H
Packit Service 672cf4
#include <sys/uio.h>
Packit Service 672cf4
#endif
Packit Service 672cf4
#include <unistd.h>
Packit Service 672cf4
       ])
Packit Service 672cf4
Packit Service 672cf4
use_descriptor_passing=yes
Packit Service 672cf4
AC_ARG_ENABLE(fd-passing,
Packit Service 672cf4
  AC_HELP_STRING([--disable-fd-passing], [do not use FD passing]),
Packit Service 672cf4
  use_descriptor_passing=$enableval)
Packit Service 672cf4
Packit Service 672cf4
if test "$supports_descriptor_passing" != "yes"; then
Packit Service 672cf4
  use_descriptor_passing=no
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
if test "$use_descriptor_passing" = "yes"; then
Packit Service 672cf4
AC_DEFINE(USE_DESCRIPTOR_PASSING,1,
Packit Service 672cf4
          [Defined if descriptor passing is enabled and supported])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
uiserver=no
Packit Service 672cf4
if test "$use_descriptor_passing" = "yes" && test "$have_libassuan" = "yes"; then
Packit Service 672cf4
  uiserver=yes
Packit Service 672cf4
fi
Packit Service 672cf4
if test "$uiserver" != "no"; then
Packit Service 672cf4
  AC_DEFINE(ENABLE_UISERVER, 1,
Packit Service 672cf4
            [Defined if we are building with uiserver support.])
Packit Service 672cf4
fi
Packit Service 672cf4
AM_CONDITIONAL(HAVE_UISERVER, test "$uiserver" != "no")
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Option --disable-linux-getdents
Packit Service 672cf4
#
Packit Service 672cf4
# By default we use SYS_getdents on Linux to optimize fd closing
Packit Service 672cf4
# before an exec.  This option allows to switch this optimization off.
Packit Service 672cf4
use_linux_getdents=yes
Packit Service 672cf4
AC_ARG_ENABLE(linux-getdents,
Packit Service 672cf4
              AC_HELP_STRING([--disable-linux-getdents],
Packit Service 672cf4
                             [do not use SYS_getdents on Linux]),
Packit Service 672cf4
              use_linux_getdents=$enableval)
Packit Service 672cf4
if test "$use_linux_getdents" = "yes"; then
Packit Service 672cf4
    case "${host}" in
Packit Service 672cf4
        *-*-linux*)
Packit Service 672cf4
           AC_DEFINE(USE_LINUX_GETDENTS,1,
Packit Service 672cf4
                     [Defined if SYS_getdents can be used on Linux])
Packit Service 672cf4
           ;;
Packit Service 672cf4
    esac
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
#
Packit Service 672cf4
# Add a few constants to help porting to W32
Packit Service 672cf4
#
Packit Service 672cf4
AH_VERBATIM([SEPCONSTANTS],
Packit Service 672cf4
[
Packit Service 672cf4
/* Separators as used in $PATH and file name.  */
Packit Service 672cf4
#ifdef HAVE_DOSISH_SYSTEM
Packit Service 672cf4
#define PATHSEP_C ';'
Packit Service 672cf4
#define DIRSEP_C '\\'
Packit Service 672cf4
#define DIRSEP_S "\\"
Packit Service 672cf4
#else
Packit Service 672cf4
#define PATHSEP_C ':'
Packit Service 672cf4
#define DIRSEP_C '/'
Packit Service 672cf4
#define DIRSEP_S "/"
Packit Service 672cf4
#endif
Packit Service 672cf4
])
Packit Service 672cf4
Packit Service 672cf4
AH_BOTTOM([
Packit Service 672cf4
/* Definition of GCC specific attributes.  */
Packit Service 672cf4
#if __GNUC__ > 2
Packit Service 672cf4
# define GPGME_GCC_A_PURE  __attribute__ ((__pure__))
Packit Service 672cf4
#else
Packit Service 672cf4
# define GPGME_GCC_A_PURE
Packit Service 672cf4
#endif
Packit Service 672cf4
Packit Service 672cf4
/* Under WindowsCE we need gpg-error's strerror macro.  */
Packit Service 672cf4
#define GPG_ERR_ENABLE_ERRNO_MACROS 1
Packit Service 672cf4
Packit Service 672cf4
#define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \
Packit Service 6c01f9
                    "Copyright (C) 2001--2017 g10 Code GmbH\n"
Packit Service 672cf4
])
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# Substitution used for gpgme-config
Packit Service 672cf4
GPGME_CONFIG_LIBS="-lgpgme"
Packit Service 672cf4
GPGME_CONFIG_CFLAGS=""
Packit Service 672cf4
GPGME_CONFIG_HOST="$host"
Packit Service 672cf4
GPGME_CONFIG_AVAIL_LANG="$enabled_languages"
Packit Service 672cf4
AC_SUBST(GPGME_CONFIG_API_VERSION)
Packit Service 672cf4
AC_SUBST(GPGME_CONFIG_LIBS)
Packit Service 672cf4
AC_SUBST(GPGME_CONFIG_CFLAGS)
Packit Service 672cf4
AC_SUBST(GPGME_CONFIG_HOST)
Packit Service 672cf4
AC_SUBST(GPGME_CONFIG_AVAIL_LANG)
Packit Service 672cf4
Packit Service 672cf4
# Frob'da Variables
Packit Service 672cf4
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
Packit Service 672cf4
           sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
Packit Service 672cf4
AC_SUBST(LTLIBOBJS)
Packit Service 672cf4
Packit Service 672cf4
# Some checks for gpgme-tool
Packit Service 672cf4
# Done at top: AC_CHECK_HEADER([argp.h])
Packit Service 672cf4
AC_CHECK_TYPES([error_t], [],
Packit Service 672cf4
   [AC_DEFINE([error_t], [int],
Packit Service 672cf4
   [Define to a type to use for `error_t' if it is not otherwise available.])],
Packit Service 672cf4
   [#include <errno.h>])
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
# A substitution to set generated files in a Emacs buffer to read-only.
Packit Service 672cf4
AC_SUBST(emacs_local_vars_begin, [['Local][ ][Variables:']])
Packit Service 672cf4
AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
Packit Service 672cf4
AC_SUBST(emacs_local_vars_end, ['End:'])
Packit Service 672cf4
Packit Service 672cf4
# Last check.
Packit Service 672cf4
die=no
Packit Service 672cf4
if test "$have_gpg_error" = "no"; then
Packit Service 672cf4
   die=yes
Packit Service 672cf4
   AC_MSG_NOTICE([[
Packit Service 672cf4
***
Packit Service 672cf4
*** You need libgpg-error to build this program.
Packit Service 672cf4
**  This library is for example available at
Packit Service 6c01f9
***   ftp://ftp.gnupg.org/gcrypt/libgpg-error
Packit Service 672cf4
*** (at least version $NEED_GPG_ERROR_VERSION is required.)
Packit Service 672cf4
***]])
Packit Service 672cf4
fi
Packit Service 672cf4
if test "$have_libassuan" = "no"; then
Packit Service 672cf4
   die=yes
Packit Service 672cf4
   AC_MSG_NOTICE([[
Packit Service 672cf4
***
Packit Service 672cf4
*** You need libassuan to build this program.
Packit Service 672cf4
*** This library is for example available at
Packit Service 6c01f9
***   ftp://ftp.gnupg.org/gcrypt/libassuan/
Packit Service 672cf4
*** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
Packit Service 672cf4
***]])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
if test "$die" = "yes"; then
Packit Service 672cf4
    AC_MSG_ERROR([[
Packit Service 672cf4
***
Packit Service 672cf4
*** Required libraries not found. Please consult the above messages
Packit Service 672cf4
*** and install them before running configure again.
Packit Service 672cf4
***]])
Packit Service 672cf4
fi
Packit Service 672cf4
Packit Service 672cf4
Packit Service 672cf4
#
Packit Service 672cf4
# Create config files
Packit Service 672cf4
Packit Service 672cf4
AC_CONFIG_FILES(Makefile src/Makefile
Packit Service 672cf4
		tests/Makefile
Packit Service 672cf4
                tests/gpg/Makefile
Packit Service 672cf4
                tests/gpgsm/Makefile
Packit Service 672cf4
                tests/opassuan/Makefile
Packit Service 672cf4
		doc/Makefile
Packit Service 672cf4
                src/versioninfo.rc
Packit Service 672cf4
                src/gpgme.h)
Packit Service 672cf4
AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
Packit Service 672cf4
AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
Packit Service 672cf4
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in)
Packit Service 672cf4
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in)
Packit Service 672cf4
AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake)
Packit Service 672cf4
AC_CONFIG_FILES(lang/cpp/src/gpgmepp_version.h)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/Makefile lang/qt/src/Makefile)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig-w32.cmake.in)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfig.cmake.in)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/src/QGpgmeConfigVersion.cmake)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/tests/Makefile)
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/src/qgpgme_version.h)
Packit Service 672cf4
AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
Packit Service 672cf4
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([lang/qt/doc/Doxyfile])])
Packit Service 672cf4
AC_CONFIG_FILES(lang/qt/doc/Makefile)
Packit Service 672cf4
AC_CONFIG_FILES([lang/python/Makefile
Packit Service 672cf4
		 lang/python/version.py
Packit Service 6c01f9
		 lang/python/tests/Makefile])
Packit Service 672cf4
AC_CONFIG_FILES([lang/python/setup.py], [chmod a+x lang/python/setup.py])
Packit Service 672cf4
AC_OUTPUT
Packit Service 672cf4
Packit Service 672cf4
echo "
Packit Service 672cf4
        GPGME v${VERSION} has been configured as follows:
Packit Service 672cf4
Packit Service 672cf4
        Revision:          mym4_revision  (mym4_revision_dec)
Packit Service 672cf4
        Platform:          $host
Packit Service 672cf4
Packit Service 672cf4
        UI Server:         $uiserver
Packit Service 672cf4
        FD Passing:        $use_descriptor_passing
Packit Service 672cf4
Packit Service 672cf4
        Language bindings: ${enabled_languages_v:-$enabled_languages}
Packit Service 672cf4
"
Packit Service 672cf4
if test "x${gpg_config_script_warn}" != x; then
Packit Service 672cf4
cat <
Packit Service 672cf4
        Mismatches between the target platform and the to
Packit Service 672cf4
        be used libraries have been been detected for:
Packit Service 672cf4
         ${gpg_config_script_warn}
Packit Service 672cf4
        Please check above for warning messages.
Packit Service 672cf4
Packit Service 672cf4
G10EOF
Packit Service 672cf4
fi