diff --git a/.gitignore b/.gitignore
index a3d4eeb..a6b9b5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,47 +1,48 @@
*.lo
*.o
.deps/
.libs/
/aclocal.m4
/autom4te.cache
/config.h.in
/config.h
/config.log
/config.status
/configure
/Makefile.in
+/VERSION
autom4te.cache/
assuan/Makefile.in
assuan/Makefile
curses/Makefile.in
curses/Makefile
doc/Makefile.in
doc/Makefile
doc/pinentry.info
doc/stamp-vti
doc/version.texi
efl/Makefile.in
efl/Makefile
fltk/Makefile.in
fltk/Makefile
gtk+-2/Makefile.in
gtk+-2/Makefile
gnome3/Makefile.in
gnome3/Makefile
pinentry/Makefile.in
pinentry/Makefile
qt/Makefile.in
qt/Makefile
tqt/Makefile.in
tqt/Makefile
secmem/Makefile.in
secmem/Makefile
w32/Makefile.in
w32/Makefile
tty/Makefile.in
tty/Makefile
/qt/pinentryconfirm.moc
/qt/pinentrydialog.moc
/qt/qsecurelineedit.moc
/m4/Makefile.in
/emacs/Makefile.in
diff --git a/Makefile.am b/Makefile.am
index 5d3e3d5..f55dbaf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,142 +1,141 @@
# Makefile.am
# Copyright (C) 2002, 2012, 2015 g10 Code GmbH
#
# This file is part of PINENTRY.
#
# PINENTRY is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PINENTRY is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
# SPDX-License-Identifier: GPL-2.0+
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
DISTCHECK_CONFIGURE_FLAGS = --disable-pinentry-qt --enable-pinentry-emacs
GITLOG_TO_CHANGELOG=gitlog-to-changelog
-EXTRA_DIST = autogen.sh autogen.rc README.GIT ChangeLog-old \
+EXTRA_DIST = autogen.sh autogen.rc README.GIT ChangeLog-old VERSION \
build-aux/gitlog-to-changelog \
build-aux/git-log-fix build-aux/git-log-footer
if BUILD_PINENTRY_CURSES
pinentry_curses = curses
else
pinentry_curses =
endif
if BUILD_PINENTRY_TTY
pinentry_tty = tty
else
pinentry_tty =
endif
if BUILD_PINENTRY_EMACS
pinentry_emacs = emacs
else
pinentry_emacs =
endif
if BUILD_PINENTRY_GTK_2
pinentry_gtk_2 = gtk+-2
else
pinentry_gtk_2 =
endif
if BUILD_PINENTRY_GNOME_3
pinentry_gnome_3 = gnome3
else
pinentry_gnome_3 =
endif
if BUILD_PINENTRY_QT
pinentry_qt = qt
else
pinentry_qt =
endif
if BUILD_PINENTRY_TQT
pinentry_tqt = tqt
else
pinentry_tqt =
endif
if BUILD_PINENTRY_W32
pinentry_w32 = w32
else
pinentry_w32 =
endif
if BUILD_PINENTRY_FLTK
pinentry_fltk = fltk
else
pinentry_fltk =
endif
if BUILD_PINENTRY_EFL
pinentry_efl = efl
else
pinentry_efl =
endif
if BUILD_DOC
doc = doc
else
doc =
endif
SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \
${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \
${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \
${pinentry_fltk} ${pinentry_efl} ${doc}
install-exec-local:
@list='$(bin_PROGRAMS)'; for p in $$list; do \
echo " $(SETCAP) cap_ipc_lock+p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(SETCAP) cap_ipc_lock+p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'` || true; \
done
(cd $(DESTDIR)$(bindir); \
rm -f pinentry; \
$(LN_S) $(PINENTRY_DEFAULT)$(EXEEXT) pinentry)
dist-hook: gen-ChangeLog
- echo "$(VERSION)" > $(distdir)/VERSION
distcheck-hook:
set -e; ( \
pref="#+macro: pinentry_" ;\
reldate="$$(date -u +%Y-%m-%d)" ;\
echo "$${pref}ver $(PACKAGE_VERSION)" ;\
echo "$${pref}date $${reldate}" ;\
list='$(DIST_ARCHIVES)'; for i in $$list; do \
case "$$i" in *.tar.bz2) \
echo "$${pref}size $$(wc -c <$$i|awk '{print int($$1/1024)}')k" ;\
echo "$${pref}sha1 $$(sha1sum <$$i|cut -d' ' -f1)" ;\
echo "$${pref}sha2 $$(sha256sum <$$i|cut -d' ' -f1)" ;;\
esac;\
done ) | tee $(distdir).swdb
gen_start_date = 2012-08-08T00:00:00
.PHONY: gen-ChangeLog
gen-ChangeLog:
if test -d $(top_srcdir)/.git; then \
(cd $(top_srcdir) && \
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
--amend=build-aux/git-log-fix \
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
rm -f $(distdir)/ChangeLog; \
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
diff --git a/autogen.rc b/autogen.rc
index 9be5e62..46a5f44 100644
--- a/autogen.rc
+++ b/autogen.rc
@@ -1,27 +1,25 @@
# autogen.sh configuration for Pinentry -*- sh -*-
#version_parts=3
case "$myhost:$myhostsub" in
w32:ce)
extraoptions="--disable-pinentry-gtk2 --disable-pinentry-qt"
;;
w32:)
extraoptions=""
;;
esac
case "$myhost" in
w32)
configure_opts="
- --with-gpg-error-prefix=@SYSROOT@
- --with-libassuan-prefix=@SYSROOT@
--with-libiconv-prefix=@SYSROOT@
PKG_CONFIG_LIBDIR=@SYSROOT@/lib/pkgconfig
"
;;
esac
extra_aclocal_flags=
final_info="./configure --enable-maintainer-mode && make"
diff --git a/autogen.sh b/autogen.sh
index 37edfc6..9b36158 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,468 +1,513 @@
#! /bin/sh
# autogen.sh
-# Copyright (C) 2003, 2014 g10 Code GmbH
+# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# This is a generic script to create the configure script and handle cross
# build environments. It requires the presence of a autogen.rc file to
# configure it for the respective package. It is maintained as part of
# GnuPG and source copied by other packages.
#
-# Version: 2014-06-06
+# Version: 2018-07-10
configure_ac="configure.ac"
cvtver () {
awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}'
}
check_version () {
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) = 1 ]; then
return 0
fi
echo "**Error**: "\`$1\'" not installed or too old." >&2
echo ' Version '$3' or newer is required.' >&2
[ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2
DIE="yes"
return 1
}
fatal () {
echo "autogen.sh:" "$*" >&2
DIE=yes
}
info () {
if [ -z "${SILENT}" ]; then
echo "autogen.sh:" "$*" >&2
fi
}
die_p () {
if [ "$DIE" = "yes" ]; then
echo "autogen.sh: Stop." >&2
exit 1
fi
}
replace_sysroot () {
configure_opts=$(echo $configure_opts | sed "s#@SYSROOT@#${w32root}#g")
extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
}
# Allow to override the default tool names
AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
DIE=no
FORCE=
SILENT=
PRINT_HOST=no
PRINT_BUILD=no
tmp=$(dirname "$0")
tsdir=$(cd "${tmp}"; pwd)
-version_parts=3
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
SILENT=" --silent"
fi
if test x"$1" = x"--help"; then
- echo "usage: ./autogen.sh [--silent] [--force] [--build-TYPE] [ARGS]"
+ echo "usage: ./autogen.sh [OPTIONS] [ARGS]"
+ echo " Options:"
+ echo " --silent Silent operation"
+ echo " --force Pass --force to autoconf"
+ echo " --find-version Helper for configure.ac"
+ echo " --git-build Run all commands to build from a Git"
+ echo " --print-host Print only the host triplet"
+ echo " --print-build Print only the build platform triplet"
+ echo " --build-TYPE Configure to cross build for TYPE"
+ echo ""
+ echo " ARGS are passed to configure in --build-TYPE mode."
+ echo " Configuration for this script is expected in autogen.rc"
exit 0
fi
if test x"$1" = x"--silent"; then
SILENT=" --silent"
shift
fi
if test x"$1" = x"--force"; then
FORCE=" --force"
shift
fi
if test x"$1" = x"--print-host"; then
PRINT_HOST=yes
shift
fi
if test x"$1" = x"--print-build"; then
PRINT_BUILD=yes
shift
fi
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
# as unsafe because it is too easy to get scripts wrong in this regard.
am_lf='
'
case `pwd` in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe working directory name" ;;
esac
case $tsdir in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe source directory: \`$tsdir'" ;;
esac
case $HOME in
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
fatal "unsafe home directory: \`$HOME'" ;;
esac
die_p
# List of variables sourced from autogen.rc. The strings '@SYSROOT@' in
# these variables are replaced by the actual system root.
configure_opts=
extraoptions=
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
w32_toolprefixes=
w32_extraoptions=
w32ce_toolprefixes=
w32ce_extraoptions=
w64_toolprefixes=
w64_extraoptions=
amd64_toolprefixes=
# End list of optional variables sourced from ~/.gnupg-autogen.rc
# What follows are variables which are sourced but default to
# environment variables or lacking them hardcoded values.
#w32root=
#w32ce_root=
#w64root=
#amd64root=
# Convenience option to use certain configure options for some hosts.
myhost=""
myhostsub=""
case "$1" in
--find-version)
myhost="find-version"
SILENT=" --silent"
shift
;;
+ --git-build)
+ myhost="git-build"
+ shift
+ ;;
--build-w32)
myhost="w32"
shift
;;
--build-w32ce)
myhost="w32"
myhostsub="ce"
shift
;;
--build-w64)
myhost="w32"
myhostsub="64"
shift
;;
--build-amd64)
myhost="amd64"
shift
;;
--build*)
fatal "**Error**: invalid build option $1"
shift
;;
*)
;;
esac
die_p
+# **** GIT BUILD ****
+# This is a helper to build from git.
+if [ "$myhost" = "git-build" ]; then
+ tmp="$(pwd)"
+ cd "$tsdir" || fatal "error cd-ing to $tsdir"
+ ./autogen.sh || fatal "error running ./autogen.sh"
+ cd "$tmp" || fatal "error cd-ing back to $tmp"
+ die_p
+ "$tsdir"/configure || fatal "error running $tsdir/configure"
+ die_p
+ make || fatal "error running make"
+ die_p
+ make check || fatal "error running male check"
+ die_p
+ exit 0
+fi
+# **** end GIT BUILD ****
+
+
# Source our configuration
if [ -f "${tsdir}/autogen.rc" ]; then
. "${tsdir}/autogen.rc"
fi
# Source optional site specific configuration
if [ -f "$HOME/.gnupg-autogen.rc" ]; then
info "sourcing extra definitions from $HOME/.gnupg-autogen.rc"
. "$HOME/.gnupg-autogen.rc"
fi
# **** FIND VERSION ****
# This is a helper for the configure.ac M4 magic
# Called
# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]
# returns a complete version string with automatic beta numbering.
if [ "$myhost" = "find-version" ]; then
package="$1"
major="$2"
minor="$3"
micro="$4"
- case "$version_parts" in
- 2)
- matchstr1="$package-$major.[0-9]*"
- matchstr2="$package-$major-base"
- vers="$major.$minor"
- ;;
- *)
- matchstr1="$package-$major.$minor.[0-9]*"
- matchstr2="$package-$major.$minor-base"
- vers="$major.$minor.$micro"
- ;;
- esac
+ if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then
+ echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2
+ exit 1
+ fi
+
+ if [ -z "$micro" ]; then
+ matchstr1="$package-$major.[0-9]*"
+ matchstr2="$package-$major-base"
+ vers="$major.$minor"
+ else
+ matchstr1="$package-$major.$minor.[0-9]*"
+ matchstr2="$package-$major.$minor-base"
+ vers="$major.$minor.$micro"
+ fi
beta=no
- if [ -d .git ]; then
+ if [ -e .git ]; then
ingit=yes
tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null)
+ tmp=$(echo "$tmp" | sed s/^"$package"//)
if [ -n "$tmp" ]; then
- tmp=$(echo "$tmp"|awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
+ tmp=$(echo "$tmp" | sed s/^"$package"// \
+ | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}')
else
tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \
| awk -F- '$4!=0{print"-beta"$4}')
fi
[ -n "$tmp" ] && beta=yes
rev=$(git rev-parse --short HEAD | tr -d '\n\r')
- rvd=$((0x$(echo ${rev} | head -c 4)))
+ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
else
ingit=no
beta=yes
tmp="-unknown"
rev="0000000"
rvd="0"
fi
echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:"
exit 0
fi
# **** end FIND VERSION ****
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
fatal "$tsdir/build-aux/config.guess not found"
exit 1
fi
build=`$tsdir/build-aux/config.guess`
if [ $PRINT_BUILD = yes ]; then
echo "$build"
exit 0
fi
# ******************
# W32 build script
# ******************
if [ "$myhost" = "w32" ]; then
case $myhostsub in
ce)
w32root="$w32ce_root"
[ -z "$w32root" ] && w32root="$HOME/w32ce_root"
toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
extraoptions="$extraoptions $w32ce_extraoptions"
;;
64)
w32root="$w64root"
[ -z "$w32root" ] && w32root="$HOME/w64root"
toolprefixes="$w64_toolprefixes x86_64-w64-mingw32"
extraoptions="$extraoptions $w64_extraoptions"
;;
*)
[ -z "$w32root" ] && w32root="$HOME/w32root"
toolprefixes="$w32_toolprefixes i686-w64-mingw32 i586-mingw32msvc"
toolprefixes="$toolprefixes i386-mingw32msvc mingw32"
extraoptions="$extraoptions $w32_extraoptions"
;;
esac
info "Using $w32root as standard install directory"
replace_sysroot
# Locate the cross compiler
crossbindir=
for host in $toolprefixes; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
break;
fi
done
if [ -z "$crossbindir" ]; then
fatal "cross compiler kit not installed"
if [ -z "$myhostsub" ]; then
info "Under Debian GNU/Linux, you may install it using"
info " apt-get install mingw32 mingw32-runtime mingw32-binutils"
fi
die_p
fi
if [ $PRINT_HOST = yes ]; then
echo "$host"
exit 0
fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
fatal "Please run a 'make distclean' first"
die_p
fi
fi
$tsdir/configure --enable-maintainer-mode ${SILENT} \
--prefix=${w32root} \
--host=${host} --build=${build} SYSROOT=${w32root} \
+ PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \
${configure_opts} ${extraoptions} "$@"
rc=$?
exit $rc
fi
# ***** end W32 build script *******
# ***** AMD64 cross build script *******
# Used to cross-compile for AMD64 (for testing)
if [ "$myhost" = "amd64" ]; then
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
info "Using $amd64root as standard install directory"
replace_sysroot
toolprefixes="$amd64_toolprefixes x86_64-linux-gnu amd64-linux-gnu"
# Locate the cross compiler
crossbindir=
for host in $toolprefixes ; do
if ${host}-gcc --version >/dev/null 2>&1 ; then
crossbindir=/usr/${host}/bin
conf_CC="CC=${host}-gcc"
break;
fi
done
if [ -z "$crossbindir" ]; then
echo "Cross compiler kit not installed" >&2
echo "Stop." >&2
exit 1
fi
if [ $PRINT_HOST = yes ]; then
echo "$host"
exit 0
fi
if [ -f "$tsdir/config.log" ]; then
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
echo "Please run a 'make distclean' first" >&2
exit 1
fi
fi
$tsdir/configure --enable-maintainer-mode ${SILENT} \
--prefix=${amd64root} \
--host=${host} --build=${build} \
${configure_opts} ${extraoptions} "$@"
rc=$?
exit $rc
fi
# ***** end AMD64 cross build script *******
# Grep the required versions from configure.ac
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
s/^.*(\(.*\))/\1/p
q
}' ${configure_ac}`
autoconf_vers_num=`echo "$autoconf_vers" | cvtver`
automake_vers=`sed -n '/^min_automake_version=/ {
s/^.*="\(.*\)"/\1/p
q
}' ${configure_ac}`
automake_vers_num=`echo "$automake_vers" | cvtver`
if [ -d "${tsdir}/po" ]; then
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
s/^.*\[\(.*\)])/\1/p
q
}' ${configure_ac}`
gettext_vers_num=`echo "$gettext_vers" | cvtver`
else
gettext_vers="n/a"
fi
if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ]
then
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
exit 1
fi
if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf
fi
if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
fi
if [ "$gettext_vers" != "n/a" ]; then
if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
fi
fi
if [ "$DIE" = "yes" ]; then
cat </dev/null 2>/dev/null; then
+ [ -z "${SILENT}" ] && CP="$CP -v"
+ fi
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
[ -z "${SILENT}" ] && cat <
# Copyright (C) 2001, 2002, 2003, 2004, 2007, 2015, 2016 g10 Code GmbH
#
# This file is part of PINENTRY.
#
# PINENTRY is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PINENTRY is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
# SPDX-License-Identifier: GPL-2.0+
# (Process this file with autoconf to produce a configure script.)
AC_PREREQ([2.69])
min_automake_version="1.14"
# To build a release you need to create a tag with the version number
# (git tag -s pinentry-n.m.k) and run "./autogen.sh --force". Please
-# bump the version number immediately after the release, do another
-# commit, and a push so that the git magic is able to work.
-m4_define(mym4_version, [1.2.0])
+# bump the version number immediately after the release and do another
+# commit and push so that the git magic is able to work.
+m4_define([mym4_package],[pinentry])
+m4_define([mym4_major], [1])
+m4_define([mym4_minor], [2])
+m4_define([mym4_micro], [0])
# Below is m4 magic to extract and compute the git revision number,
# the decimalized short revision number, a beta version string and a
-# flag indicating a development version (mym4_isgit). Note that the
+# flag indicating a development version (mym4_isbeta). Note that the
# m4 processing is done by autoconf and not during the configure run.
-m4_define([mym4_revision], m4_esyscmd([git branch -v 2>/dev/null \
- | awk '/^\* / {printf "%s",$3}']))
-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 'pinentry-[0-9].[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([pinentry],[mym4_full_version],[https://bugs.gnupg.org])
+m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
+ mym4_package mym4_major mym4_minor mym4_micro),[:]))
+m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
+m4_define([mym4_version], m4_argn(4, mym4_verslist))
+m4_define([mym4_revision], m4_argn(7, mym4_verslist))
+m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist))
+m4_esyscmd([echo ]mym4_version[>VERSION])
+
+AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
AC_CONFIG_AUX_DIR([build-aux])
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(pinentry/pinentry.h)
AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
AC_USE_SYSTEM_EXTENSIONS
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AH_TOP([
#ifndef PINENTRY_CONFIG_H_INCLUDED
#define PINENTRY_CONFIG_H_INCLUDED
/* Enable gpg-error's strerror macro under W32CE. */
#define GPG_ERR_ENABLE_ERRNO_MACROS 1
])
AH_BOTTOM([
#endif /*PINENTRY_CONFIG_H_INCLUDED*/
])
dnl Checks for programs.
AC_PROG_MAKE_SET
AM_SANITY_CHECK
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_RANLIB
# We need to check for cplusplus here because we may not do the test
# for Qt and autoconf does does not allow that.
AC_PROG_CXX
AC_PROG_LN_S
PKG_PROG_PKG_CONFIG
AC_CHECK_TOOL(WINDRES, windres, :)
AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog,
[build-aux/gitlog-to-changelog])
have_dosish_system=no
have_w32_system=no
have_w32ce_system=no
case "${host}" in
*-mingw32*)
AC_DEFINE(USE_ONLY_8DOT3,1,
[Set this to limit filenames to the 8.3 format])
have_dosish_system=yes
have_w32_system=yes
case "${host}" in
*-mingw32ce*)
have_w32ce_system=yes
;;
*)
AC_DEFINE(HAVE_DRIVE_LETTERS,1,
[Defined if the OS supports drive letters.])
;;
esac
;;
i?86-emx-os2 | i?86-*-os2*emx )
# OS/2 with the EMX environment
AC_DEFINE(HAVE_DRIVE_LETTERS)
have_dosish_system=yes
;;
i?86-*-msdosdjgpp*)
# DOS with the DJGPP environment
AC_DEFINE(HAVE_DRIVE_LETTERS)
have_dosish_system=yes
;;
esac
if test "$have_dosish_system" = yes; then
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
[Defined if we run on some of the PCDOS like systems
(DOS, Windoze. OS/2) with special properties like
no file modes])
fi
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
if test "$have_w32_system" = yes; then
AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
if test "$have_w32ce_system" = yes; then
AC_DEFINE(HAVE_W32CE_SYSTEM,1,[Defined if we run on WindowsCE])
fi
fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
dnl Checks for compiler features.
if test "$GCC" = yes; then
# Check whether gcc does not emit a diagnositc for unknown -Wno-*
# options. This is the case for gcc >= 4.6
AC_MSG_CHECKING([if gcc ignores unknown -Wno-* options])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6 )
#kickerror
#endif]],[])],[_gcc_silent_wno=yes],[_gcc_silent_wno=no])
AC_MSG_RESULT($_gcc_silent_wno)
if test "$USE_MAINTAINER_MODE" = "yes"; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
if test x"$_gcc_silent_wno" = xyes ; then
_gcc_warn=yes
else
AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers])
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wno-missing-field-initializers"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
[_gcc_warn=yes],[_gcc_warn=no])
AC_MSG_RESULT($_gcc_warn)
CFLAGS=$_gcc_cflags_save;
fi
if test x"$_gcc_warn" = xyes ; then
CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
fi
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wdeclaration-after-statement"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_warn=yes,_gcc_warn=no)
AC_MSG_RESULT($_gcc_warn)
CFLAGS=$_gcc_cflags_save;
if test x"$_gcc_warn" = xyes ; then
CFLAGS="$CFLAGS -Wdeclaration-after-statement"
fi
else
# Not in maintainer mode: Use standard warnings.
CFLAGS="$CFLAGS -Wall"
fi
CPPFLAGS="$CPPFLAGS -Wall"
if test x"$_gcc_silent_wno" = xyes ; then
_gcc_warn=yes
else
AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wno-pointer-sign"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[_gcc_warn=yes],[_gcc_warn=no])
AC_MSG_RESULT($_gcc_warn)
CFLAGS=$_gcc_cflags_save;
fi
if test x"$_gcc_warn" = xyes ; then
CFLAGS="$CFLAGS -Wno-pointer-sign"
fi
AC_MSG_CHECKING([if gcc supports -Wpointer-arith])
_gcc_cflags_save=$CFLAGS
CFLAGS="-Wpointer-arith"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_warn=yes,_gcc_warn=no)
AC_MSG_RESULT($_gcc_warn)
CFLAGS=$_gcc_cflags_save;
if test x"$_gcc_warn" = xyes ; then
CFLAGS="$CFLAGS -Wpointer-arith"
fi
fi
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h utime.h wchar.h)
dnl Checks for library functions.
AC_CHECK_FUNCS(seteuid stpcpy mmap stat)
GNUPG_CHECK_MLOCK
dnl Checks for standard types.
AC_TYPE_UINT32_T
# Common libraries and cflags.
COMMON_CFLAGS=
COMMON_LIBS=
AC_SUBST(COMMON_CFLAGS)
AC_SUBST(COMMON_LIBS)
dnl Checks for libgpg-error
#
# libgpg-error is a library with error codes shared between GnuPG
# related projects.
#
NEED_GPG_ERROR_VERSION=1.16
have_gpg_error=no
AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
have_gpg_error=yes,have_gpg_error=no)
COMMON_CFLAGS="$GPG_ERROR_CFLAGS $COMMON_CFLAGS"
COMMON_LIBS="$GPG_ERROR_LIBS $COMMON_LIBS"
AC_DEFINE_UNQUOTED(GPG_ERR_ENABLE_GETTEXT_MACROS, 1,
[Under Windows we use the gettext code from libgpg-error])
AC_DEFINE_UNQUOTED(GPG_ERR_ENABLE_ERRNO_MACROS, 1,
[Under WindowsCE we use the strerror replacement from libgpg-error.])
dnl Checks for libassuan.
#
# libassuan is used for IPC
#
NEED_LIBASSUAN_API=2
NEED_LIBASSUAN_VERSION=2.1.0
have_libassuan=no
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
have_libassuan=yes,have_libassuan=no)
if test "$have_libassuan" = "yes"; then
AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
[version of the libassuan library])
fi
COMMON_CFLAGS="$LIBASSUAN_CFLAGS $COMMON_CFLAGS"
COMMON_LIBS="$LIBASSUAN_LIBS $COMMON_LIBS"
dnl Checks for libsecmem.
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
dnl Check for libcap
AC_ARG_WITH([libcap], AS_HELP_STRING([--without-libcap],
[Disable support for capabilities library]))
if test "x$with_libcap" != "xno"; then
AC_PATH_PROG(SETCAP, setcap, :, "$PATH:/sbin:/usr/sbin")
AC_CHECK_LIB(cap, cap_set_proc, [
AC_DEFINE(USE_CAPABILITIES,1,[The capabilities support library is installed])
LIBCAP=-lcap
])
fi
AC_SUBST(LIBCAP)
dnl
dnl Check for curses pinentry program.
dnl
AC_ARG_ENABLE(pinentry-curses,
AS_HELP_STRING([--enable-pinentry-curses],[build curses pinentry]),
pinentry_curses=$enableval, pinentry_curses=maybe)
AC_ARG_ENABLE(fallback-curses,
AS_HELP_STRING([--enable-fallback-curses],[include curses fallback]),
fallback_curses=$enableval, fallback_curses=maybe)
dnl
dnl Checks for curses libraries. Deal correctly with $pinentry_curses = maybe
dnl and $fallback_curses = maybe.
dnl
if test "$pinentry_curses" != "no" -o "$fallback_curses" != "no"; then
IU_LIB_CURSES
fi
if test "$LIBCURSES"; then
if test "$pinentry_curses" != "no"; then
pinentry_curses=yes
fi
if test "$fallback_curses" != "no"; then
fallback_curses=yes
AC_DEFINE(FALLBACK_CURSES, 1,
[The GUI pinentries should fall back to curses if X is not available.])
fi
else
if test "$pinentry_curses" = "yes" -o "$fallback_curses" = "yes"; then
AC_MSG_ERROR([[
***
*** The curses library is required. The latest version of
*** ncurses is always available from ftp://ftp.gnu.org/gnu/ncurses/.
***]])
fi
pinentry_curses=no
fallback_curses=no
fi
AM_CONDITIONAL(BUILD_LIBPINENTRY_CURSES,
test "$pinentry_curses" = "yes" -o "$fallback_curses" = "yes")
AM_CONDITIONAL(BUILD_PINENTRY_CURSES, test "$pinentry_curses" = "yes")
AM_CONDITIONAL(FALLBACK_CURSES, test "$fallback_curses" = "yes")
if test "$pinentry_curses" = "yes"; then
AC_DEFINE(PINENTRY_CURSES, 1,
[The Curses version of Pinentry is to be build])
fi
dnl
dnl Check for tty pinentry program.
dnl
AC_ARG_ENABLE(pinentry-tty,
AS_HELP_STRING([--enable-pinentry-tty],[build tty pinentry]),
pinentry_tty=$enableval, pinentry_tty=maybe)
AM_CONDITIONAL(BUILD_PINENTRY_TTY, test "$pinentry_tty" = "yes")
if test "$pinentry_tty" = "yes"; then
AC_DEFINE(PINENTRY_TTY, 1,
[The TTY version of Pinentry is to be build])
fi
dnl
dnl Additional checks pinentry Curses.
dnl
if test "$pinentry_curses" = "yes" \
-o "$fallback_curses" = "yes" ; then
AM_ICONV
if test "$am_cv_func_iconv" != "yes"; then
AC_MSG_ERROR([[
***
*** The iconv function is required. You can specify its location
*** using the --with-libiconv-prefix=PREFIX option to configure.
***]])
fi
fi
dnl
dnl Check for emacs pinentry program.
dnl
AC_ARG_ENABLE(pinentry-emacs,
AS_HELP_STRING([--enable-pinentry-emacs],[build emacs pinentry]),
pinentry_emacs=$enableval, pinentry_emacs=no)
AC_ARG_ENABLE(inside-emacs,
AS_HELP_STRING([--enable-inside-emacs],[include emacs hack]),
inside_emacs=$enableval, inside_emacs=maybe)
if test "$pinentry_emacs" != "no" -o "$inside_emacs" != "no"; then
AC_MSG_CHECKING([if Unix domain socket is supported])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include
#include
]], [[int s = socket (AF_UNIX, SOCK_STREAM, 0);]])],[_unixsock_works=yes],[_unixsock_works=no])
AC_MSG_RESULT($_unixsock_works)
if test "$_unixsock_works" = "yes"; then
if test "$pinentry_emacs" != "no"; then
pinentry_emacs=yes
fi
if test "$inside_emacs" != "no"; then
inside_emacs=yes
AC_DEFINE(INSIDE_EMACS, 1,
[The GUI pinentries should respect INSIDE_EMACS envvar.])
fi
else
if test "$pinentry_emacs" = "yes" -o "$inside_emacs" = "yes"; then
AC_MSG_ERROR([[
***
*** Support for Unix domain sockets is required.
***]])
fi
pinentry_emacs=no
inside_emacs=no
fi
fi
AM_CONDITIONAL(BUILD_LIBPINENTRY_EMACS,
test "$pinentry_emacs" = "yes" -o "$inside_emacs" = "yes")
AM_CONDITIONAL(BUILD_PINENTRY_EMACS, test "$pinentry_emacs" = "yes")
AM_CONDITIONAL(INSIDE_EMACS, test "$inside_emacs" = "yes")
if test "$pinentry_emacs" = "yes"; then
AC_DEFINE(PINENTRY_EMACS, 1,
[The Emacs version of Pinentry is to be build])
fi
dnl
dnl Check for EFL pinentry programs.
dnl
AC_ARG_ENABLE(pinentry-efl,
AS_HELP_STRING([--enable-pinentry-efl],[build EFL pinentry]),
pinentry_efl=$enableval, pinentry_efl=maybe)
if test "$pinentry_efl" != "no"; then
PKG_CHECK_MODULES(
EFL,
[elementary >= 1.18,ecore-x],
[
pinentry_efl=yes
],
[
if test "$pinentry_efl" = "yes"; then
AC_MSG_ERROR([[
***
*** efl (elementary >= 1.18, ecore-x) is required for pinentry-efl.
***]])
else
AC_MSG_WARN([pkg-config could not find the modules elementary or ecore-x])
fi
pinentry_efl=no
]
)
fi
AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes")
dnl
dnl Check for GTK+-2 / GNOME3 pinentry programs.
dnl
AC_ARG_ENABLE(pinentry-gtk2,
AS_HELP_STRING([--enable-pinentry-gtk2],[build GTK+-2 pinentry]),
pinentry_gtk_2=$enableval, pinentry_gtk_2=maybe)
AC_ARG_ENABLE(pinentry-gnome3,
AS_HELP_STRING([--enable-pinentry-gnome3],[build GNOME 3 pinentry]),
pinentry_gnome_3=$enableval, pinentry_gnome_3=maybe)
dnl check if the module gtk+-2.0 exists
if test "$pinentry_gtk_2" != "no"; then
PKG_CHECK_MODULES(
GTK2,
[gtk+-2.0 >= 2.12.0],
[
test "$pinentry_gtk_2" != "no" && pinentry_gtk_2=yes
test "$pinentry_gnome_3" != "no" && pinentry_gnome_3=yes
],
[
AC_MSG_WARN([pkg-config could not find the module gtk+-2.0])
pinentry_gtk_2=no
]
)
fi
AM_CONDITIONAL(BUILD_PINENTRY_GTK_2, test "$pinentry_gtk_2" = "yes")
if test "$pinentry_gnome_3" != "no"; then
PKG_CHECK_MODULES(
GNOME3,
[gcr-3,gcr-base-3],
[
pinentry_gnome_3=yes
AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
],
[
AC_MSG_WARN([pkg-config could not find the module gcr-3,gcr-base-3])
pinentry_gnome_3=no
]
)
fi
AM_CONDITIONAL(BUILD_PINENTRY_GNOME_3, test "$pinentry_gnome_3" = "yes")
dnl
dnl Check for libsecret.
dnl
AC_ARG_ENABLE(libsecret,
AS_HELP_STRING([--enable-libsecret],
[optionally cache passphrases using libsecret]),
libsecret=$enableval, libsecret=maybe)
dnl check if the module libsecret exists
if test "$libsecret" != "no"; then
PKG_CHECK_MODULES(
LIBSECRET,
[libsecret-1],
[libsecret=yes],
[
AC_MSG_WARN([pkg-config could not find the module libsecret-1])
libsecret=no
]
)
fi
AM_CONDITIONAL(BUILD_WITH_LIBSECRET, test "$libsecret" = "yes")
if test "$libsecret" = "yes"; then
AC_DEFINE(HAVE_LIBSECRET, 1,
[The pinentries should optionally cache the passphrase using libsecret.])
COMMON_CFLAGS="$LIBSECRET_CFLAGS $COMMON_CFLAGS"
COMMON_LIBS="$LIBSECRET_LIBS $COMMON_LIBS"
fi
dnl
dnl Check for Qt pinentry program.
dnl
AC_ARG_ENABLE(pinentry-qt,
AS_HELP_STRING([--enable-pinentry-qt],[build qt pinentry]),
pinentry_qt=$enableval, pinentry_qt=maybe)
dnl
dnl Checks for qt libraries. Deal correctly with $pinentry_qt = maybe.
dnl Tries to find Qt5, falls back on Qt4
dnl
if test "$pinentry_qt" != "no"; then
FIND_QT
if test "$have_qt4_libs" != "yes" -a "$have_qt5_libs" != "yes"; then
if test "$pinentry_qt" = "yes"; then
AC_MSG_ERROR([[
***
*** Qt4 (QtCore, QtGui) or Qt5 (Qt5Core, Qt5Gui, Qt5Widgets) is required.
***]])
else
pinentry_qt=no
fi
fi
fi
AC_SUBST(PINENTRY_QT_CFLAGS)
AC_SUBST(PINENTRY_QT_LIBS)
AC_SUBST(PINENTRY_QT_LDFLAGS)
AC_SUBST(MOC)
dnl If we have come so far, qt pinentry can be build.
if test "$pinentry_qt" != "no"; then
pinentry_qt=yes
fi
AM_CONDITIONAL(BUILD_PINENTRY_QT, test "$pinentry_qt" = "yes")
if test "$pinentry_qt" = "yes"; then
AC_DEFINE(PINENTRY_QT, 1, [The qt version of Pinentry is to be build])
if test "$have_qt4_libs" = "yes"; then
pinentry_qt_lib_version="(Qt4)"
else
pinentry_qt_lib_version="(Qt5)"
fi
fi
dnl
dnl Check for TQt pinentry program.
dnl
AC_ARG_ENABLE(pinentry-tqt,
AS_HELP_STRING([--enable-pinentry-tqt],[build tqt pinentry]),
pinentry_tqt=$enableval, pinentry_tqt=no)
if test "$pinentry_tqt" != "no"; then
if test "$pinentry_qt" = "yes"; then
AC_MSG_ERROR([[
***
*** Building both Qt and TQt pinentries is not supported.
*** Use --disable-pinentry-qt if you want the TQt pinentry.
***]])
fi
PKG_CHECK_MODULES(PINENTRY_TQT, tqt,
have_tqt_libs=yes,
[PKG_CHECK_MODULES(PINENTRY_TQT, tqt-mt,
have_tqt_libs=yes, have_tqt_libs=no)])
if test "$have_tqt_libs" = "yes"; then
AC_CHECK_TOOL([TQT_MOC], tqmoc, "no")
fi
if test "$have_tqt_libs" = "yes" -a "$TQT_MOC" != "no"; then
pinentry_tqt=yes
else
AC_MSG_WARN([TQt is not found])
pinentry_tqt=no
fi
fi
AM_CONDITIONAL(BUILD_PINENTRY_TQT, test "$pinentry_tqt" = "yes")
#
# Check whether we should build the W32 pinentry. This is actually
# the simplest check as we do this only for that platform.
#
pinentry_w32=no
test $have_w32_system = yes && pinentry_w32=yes
AM_CONDITIONAL(BUILD_PINENTRY_W32, test "$pinentry_w32" = "yes")
dnl
dnl Check for FLTK pinentry program.
dnl
AC_ARG_ENABLE(pinentry-fltk,
AS_HELP_STRING([--enable-pinentry-fltk],[build FLTK 1.3 pinentry]),
pinentry_fltk=$enableval, pinentry_fltk=maybe)
dnl check for fltk-config
if test "$pinentry_fltk" != "no"; then
AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
if test x"${FLTK_CONFIG}" = xno ; then
AC_MSG_WARN([fltk-config is not found])
pinentry_fltk=no
fi
fi
dnl check for FLTK libraries and set flags
if test "$pinentry_fltk" != "no"; then
AC_MSG_CHECKING([for FLTK 1.3])
FLTK_VERSION=`${FLTK_CONFIG} --api-version`
if test ${FLTK_VERSION} != "1.3" ; then
AC_MSG_RESULT([no])
AC_MSG_WARN([FLTK 1.3 not found (available $FLTK_VERSION)])
pinentry_fltk=no
else
AC_MSG_RESULT([yes])
FLTKCFLAGS=`${FLTK_CONFIG} --cflags`
FLTKCXXFLAGS=`${FLTK_CONFIG} --cxxflags`
FLTKLIBS=`${FLTK_CONFIG} --ldflags`
AC_SUBST(FLTKCFLAGS)
AC_SUBST(FLTKCXXFLAGS)
AC_SUBST(FLTKLIBS)
pinentry_fltk=yes
fi
fi
AM_CONDITIONAL(BUILD_PINENTRY_FLTK, test "$pinentry_fltk" = "yes")
# Figure out the default pinentry. We are very conservative here.
# Please change the order only after verifying that the preferred
# pinentry really is better (more feature-complete and more secure).
if test "$pinentry_gtk_2" = "yes"; then
PINENTRY_DEFAULT=pinentry-gtk-2
else
if test "$pinentry_qt" = "yes"; then
PINENTRY_DEFAULT=pinentry-qt
else
if test "$pinentry_gnome_3" = "yes"; then
PINENTRY_DEFAULT=pinentry-gnome3
else
if test "$pinentry_curses" = "yes"; then
PINENTRY_DEFAULT=pinentry-curses
else
if test "$pinentry_tty" = "yes"; then
PINENTRY_DEFAULT=pinentry-tty
else
if test "$pinentry_w32" = "yes"; then
PINENTRY_DEFAULT=pinentry-w32
else
if test "$pinentry_fltk" = "yes"; then
PINENTRY_DEFAULT=pinentry-fltk
else
if test "$pinentry_tqt" = "yes"; then
PINENTRY_DEFAULT=pinentry-tqt
else
if test "$pinentry_efl" = "yes"; then
PINENTRY_DEFAULT=pinentry-efl
else
AC_MSG_ERROR([[No pinentry enabled.]])
fi
fi
fi
fi
fi
fi
fi
fi
fi
AC_SUBST(PINENTRY_DEFAULT)
#
# Print errors here so that they are visible all
# together and the user can acquire them all together.
#
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([[
***
*** You need libassuan to build this program.
*** This library is for example available at
*** ftp://ftp.gnupg.org/gcrypt/libassuan/
*** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
***]])
fi
if test "$die" = "yes"; then
AC_MSG_ERROR([[
***
*** Required libraries not found. Please consult the above messages
*** and install them before running configure again.
***]])
fi
#
# To avoid double inclusion of config.h which might happen at some
# places, we add the usual double inclusion protection at the top of
# config.h.
#
AH_TOP([
#ifndef GNUPG_CONFIG_H_INCLUDED
#define GNUPG_CONFIG_H_INCLUDED
])
#
# Stuff which goes at the bottom of config.h.
#
AH_BOTTOM([
#ifdef GPG_ERR_SOURCE_DEFAULT
# error GPG_ERR_SOURCE_DEFAULT already defined
#endif
#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_PINENTRY
#endif /*GNUPG_CONFIG_H_INCLUDED*/
])
build_doc=yes
AC_ARG_ENABLE([doc], AS_HELP_STRING([--disable-doc],
[do not build the documentation]),
build_doc=$enableval, build_doc=yes)
AM_CONDITIONAL([BUILD_DOC], [test "x$build_doc" != xno])
AC_CONFIG_FILES([
m4/Makefile
secmem/Makefile
pinentry/Makefile
curses/Makefile
tty/Makefile
efl/Makefile
emacs/Makefile
gtk+-2/Makefile
gnome3/Makefile
qt/Makefile
tqt/Makefile
w32/Makefile
fltk/Makefile
doc/Makefile
Makefile
])
AC_OUTPUT
AC_MSG_NOTICE([
Pinentry v${VERSION} has been configured as follows:
Revision: mym4_revision (mym4_revision_dec)
Platform: $host
Curses Pinentry ..: $pinentry_curses
TTY Pinentry .....: $pinentry_tty
Emacs Pinentry ...: $pinentry_emacs
EFL Pinentry .....: $pinentry_efl
GTK+-2 Pinentry ..: $pinentry_gtk_2
GNOME 3 Pinentry .: $pinentry_gnome_3
Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version
TQt Pinentry .....: $pinentry_tqt
W32 Pinentry .....: $pinentry_w32
FLTK Pinentry ....: $pinentry_fltk
Fallback to Curses: $fallback_curses
Emacs integration : $inside_emacs
libsecret ........: $libsecret
Default Pinentry .: $PINENTRY_DEFAULT
])