build: Update to newer autoconf constructs.

* acinclude.m4 (GNUPG_CHECK_ENDIAN): Use AC_COMPILE_IFELSE instead of
AC_TRY_COMPILE.  Use AC_RUN_IFELSE instead of AC_TRY_RUN.
(GNUPG_BUILD_PROGRAM): Use AS_HELP_STRING instead of AC_HELP_STRING.
* configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
Use AS_HELP_STRING instead of AC_HELP_STRING.
(AC_ISC_POSIX): Replace by AC_SEARCH_LIBS.
(AC_TYPE_SIGNAL): Remove.
* m4/isc-posix.m4: Remove.
* m4/codeset.m4: Update from gnulib.
* m4/gettext.m4: Update from gnulib.
* m4/lcmessage.m4: Update from gnulib.
* m4/socklen.m4: Update from gnulib.
* m4/ldap.m4: Use AS_HELP_STRING instead of AC_HELP_STRING.
Use AC_LINK_IFELSE instead of AC_TRY_LINK.
Use AC_RUN_IFELSE instead of AC_TRY_RUN.
* m4/gpg-error.m4: Update from libgpg-error.
* m4/readline.m4: Update from libgpg-error.
* m4/npth.m4: Update from npth.
* m4/libassuan.m4: Update from libassuan.
* m4/libgcrypt.m4: Update from libgcrypt.
* m4/ksba.m4: Update from libksba.
* m4/ntbtls.m4: Update from ntbtls.
* common/signal.c [!HAVE_DOSISH_SYSTEM] (init_one_signal): Replace
RETSIGTYPE to void.
[!HAVE_DOSISH_SYSTEM] (got_fatal_signal, got_usr_signal): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-18 13:51:38 +09:00
parent aeeb8e975d
commit d66fb3aa53
16 changed files with 266 additions and 244 deletions

View File

@ -73,18 +73,18 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
AC_CACHE_VAL(gnupg_cv_c_endian,
[ gnupg_cv_c_endian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/param.h>]], [[
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/param.h>], [
#endif]])], [# It does; now see whether it defined to BIG_ENDIAN or not.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/param.h>]], [[
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif], gnupg_cv_c_endian=big, gnupg_cv_c_endian=little)])
#endif]])], gnupg_cv_c_endian=big, gnupg_cv_c_endian=little)])
if test "$gnupg_cv_c_endian" = unknown; then
AC_TRY_RUN([main () {
AC_RUN_IFELSE([AC_LANG_SOURCE([[main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
@ -93,7 +93,7 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
} u;
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
}],
}]])],
gnupg_cv_c_endian=little,
gnupg_cv_c_endian=big,
gnupg_cv_c_endian=$tmp_assumed_endian
@ -124,11 +124,11 @@ AC_DEFUN([GNUPG_BUILD_PROGRAM],
[m4_define([my_build], [m4_bpatsubst(build_$1, [[^a-zA-Z0-9_]], [_])])
my_build=$2
m4_if([$2],[yes],[
AC_ARG_ENABLE([$1], AC_HELP_STRING([--disable-$1],
AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1],
[do not build the $1 program]),
my_build=$enableval, my_build=$2)
],[
AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1],
AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1],
[build the $1 program]),
my_build=$enableval, my_build=$2)
])
@ -150,7 +150,7 @@ AC_DEFUN([GNUPG_BUILD_PROGRAM],
# GPG_USE_<NAME>.
AC_DEFUN([GNUPG_GPG_DISABLE_ALGO],
[AC_MSG_CHECKING([whether to enable the $2 for gpg])
AC_ARG_ENABLE([gpg-$1], AC_HELP_STRING([--disable-gpg-$1],
AC_ARG_ENABLE([gpg-$1], AS_HELP_STRING([--disable-gpg-$1],
[disable the $2 algorithm in gpg]),
, enableval=yes)
AC_MSG_RESULT($enableval)

View File

@ -51,7 +51,7 @@ static void (*cleanup_fnc)(void);
#ifndef HAVE_DOSISH_SYSTEM
static void
init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
init_one_signal (int sig, void (*handler)(int), int check_ign )
{
# ifdef HAVE_SIGACTION
struct sigaction oact, nact;
@ -69,7 +69,7 @@ init_one_signal (int sig, RETSIGTYPE (*handler)(int), int check_ign )
nact.sa_flags = 0;
sigaction ( sig, &nact, NULL);
# else
RETSIGTYPE (*ohandler)(int);
void (*ohandler)(int);
ohandler = signal (sig, handler);
if (check_ign && ohandler == SIG_IGN)
@ -96,7 +96,7 @@ get_signal_name( int signum )
#endif /*!HAVE_DOSISH_SYSTEM*/
#ifndef HAVE_DOSISH_SYSTEM
static RETSIGTYPE
static void
got_fatal_signal (int sig)
{
const char *s;
@ -155,7 +155,7 @@ got_fatal_signal (int sig)
#endif /*!HAVE_DOSISH_SYSTEM*/
#ifndef HAVE_DOSISH_SYSTEM
static RETSIGTYPE
static void
got_usr_signal (int sig)
{
(void)sig;

View File

@ -18,7 +18,7 @@
# along with this program; if not, see <https://www.gnu.org/licenses/>.
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_PREREQ([2.61])
min_automake_version="1.14"
# To build a release you need to create a tag with the version number
@ -47,7 +47,7 @@ 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_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
# When changing the SWDB tag please also adjust the hard coded tags in
# build-aux/speedo.mk and Makefile.am
@ -87,7 +87,7 @@ AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
AC_CANONICAL_HOST
AB_INIT
AC_GNU_SOURCE
AC_USE_SYSTEM_EXTENSIONS
# Some status variables.
@ -224,7 +224,7 @@ test -n "$GNUPG_DIRMNGR_LDAP_PGM" \
# 2.2. This option can be used to install gpg under the name gpg2.
#
AC_ARG_ENABLE(gpg-is-gpg2,
AC_HELP_STRING([--enable-gpg-is-gpg2],[Set installed name of gpg to gpg2]),
AS_HELP_STRING([--enable-gpg-is-gpg2],[Set installed name of gpg to gpg2]),
gpg_is_gpg2=$enableval)
if test "$gpg_is_gpg2" = "yes"; then
AC_DEFINE(USE_GPG2_HACK, 1, [Define to install gpg as gpg2])
@ -236,7 +236,7 @@ AM_CONDITIONAL(USE_GPG2_HACK, test "$gpg_is_gpg2" = "yes")
# leaking their contents through processing these files by gpg itself
AC_MSG_CHECKING([whether SELinux support is requested])
AC_ARG_ENABLE(selinux-support,
AC_HELP_STRING([--enable-selinux-support],
AS_HELP_STRING([--enable-selinux-support],
[enable SELinux support]),
selinux_support=$enableval, selinux_support=no)
AC_MSG_RESULT($selinux_support)
@ -244,7 +244,7 @@ AC_MSG_RESULT($selinux_support)
AC_MSG_CHECKING([whether to allocate extra secure memory])
AC_ARG_ENABLE(large-secmem,
AC_HELP_STRING([--enable-large-secmem],
AS_HELP_STRING([--enable-large-secmem],
[allocate extra secure memory]),
large_secmem=$enableval, large_secmem=no)
AC_MSG_RESULT($large_secmem)
@ -258,7 +258,7 @@ AC_DEFINE_UNQUOTED(SECMEM_BUFFER_SIZE,$SECMEM_BUFFER_SIZE,
AC_MSG_CHECKING([calibrated passphrase-stretching (s2k) duration])
AC_ARG_WITH(agent-s2k-calibration,
AC_HELP_STRING([--with-agent-s2k-calibration=MSEC],
AS_HELP_STRING([--with-agent-s2k-calibration=MSEC],
[calibrate passphrase stretching (s2k) to MSEC milliseconds]),
agent_s2k_calibration=$withval, agent_s2k_calibration=100)
AC_MSG_RESULT($agent_s2k_calibration milliseconds)
@ -267,7 +267,7 @@ AC_DEFINE_UNQUOTED(AGENT_S2K_CALIBRATION, $agent_s2k_calibration,
AC_MSG_CHECKING([whether to enable trust models])
AC_ARG_ENABLE(trust-models,
AC_HELP_STRING([--disable-trust-models],
AS_HELP_STRING([--disable-trust-models],
[disable all trust models except "always"]),
use_trust_models=$enableval)
AC_MSG_RESULT($use_trust_models)
@ -278,7 +278,7 @@ fi
AC_MSG_CHECKING([whether to enable TOFU])
AC_ARG_ENABLE(tofu,
AC_HELP_STRING([--disable-tofu],
AS_HELP_STRING([--disable-tofu],
[disable the TOFU trust model]),
use_tofu=$enableval, use_tofu=$use_trust_models)
AC_MSG_RESULT($use_tofu)
@ -288,7 +288,7 @@ fi
AC_MSG_CHECKING([whether to enable libdns])
AC_ARG_ENABLE(libdns,
AC_HELP_STRING([--disable-libdns],
AS_HELP_STRING([--disable-libdns],
[do not build with libdns support]),
use_libdns=$enableval, use_libdns=yes)
AC_MSG_RESULT($use_libdns)
@ -335,7 +335,7 @@ GNUPG_GPG_DISABLE_ALGO([sha512],[SHA-512 hash])
# implementations SHOULD support ZLIB.
AC_MSG_CHECKING([whether to enable the ZIP and ZLIB compression algorithm])
AC_ARG_ENABLE(zip,
AC_HELP_STRING([--disable-zip],
AS_HELP_STRING([--disable-zip],
[disable the ZIP and ZLIB compression algorithm]),
use_zip=$enableval)
AC_MSG_RESULT($use_zip)
@ -344,7 +344,7 @@ AC_MSG_RESULT($use_zip)
# It is defined only after we confirm the library is available later
AC_MSG_CHECKING([whether to enable the BZIP2 compression algorithm])
AC_ARG_ENABLE(bzip2,
AC_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
AS_HELP_STRING([--disable-bzip2],[disable the BZIP2 compression algorithm]),
use_bzip2=$enableval)
AC_MSG_RESULT($use_bzip2)
@ -352,7 +352,7 @@ AC_MSG_RESULT($use_bzip2)
# programs, like a photo viewer.
AC_MSG_CHECKING([whether to enable external program execution])
AC_ARG_ENABLE(exec,
AC_HELP_STRING([--disable-exec],[disable all external program execution]),
AS_HELP_STRING([--disable-exec],[disable all external program execution]),
use_exec=$enableval)
AC_MSG_RESULT($use_exec)
if test "$use_exec" = no ; then
@ -390,7 +390,7 @@ fi
#
AC_MSG_CHECKING([for the size of the key and uid cache])
AC_ARG_ENABLE(key-cache,
AC_HELP_STRING([--enable-key-cache=SIZE],
AS_HELP_STRING([--enable-key-cache=SIZE],
[Set key cache to SIZE (default 4096)]),,enableval=4096)
if test "$enableval" = "no"; then
enableval=5
@ -422,7 +422,7 @@ AC_MSG_RESULT($use_capabilities)
# Check whether to disable the card support
AC_MSG_CHECKING([whether smartcard support is requested])
AC_ARG_ENABLE(card-support,
AC_HELP_STRING([--disable-card-support],
AS_HELP_STRING([--disable-card-support],
[disable smartcard support]),
card_support=$enableval)
AC_MSG_RESULT($card_support)
@ -438,14 +438,14 @@ fi
#
AC_MSG_CHECKING([whether to enable the internal CCID driver])
AC_ARG_ENABLE(ccid-driver,
AC_HELP_STRING([--disable-ccid-driver],
AS_HELP_STRING([--disable-ccid-driver],
[disable the internal CCID driver]),
use_ccid_driver=$enableval)
AC_MSG_RESULT($use_ccid_driver)
AC_MSG_CHECKING([whether to auto start dirmngr])
AC_ARG_ENABLE(dirmngr-auto-start,
AC_HELP_STRING([--disable-dirmngr-auto-start],
AS_HELP_STRING([--disable-dirmngr-auto-start],
[disable auto starting of the dirmngr]),
dirmngr_auto_start=$enableval)
AC_MSG_RESULT($dirmngr_auto_start)
@ -629,7 +629,7 @@ AC_CHECK_TOOL(WINDRES, windres, :)
AC_PATH_PROG(YAT2M, "yat2m", "./yat2m" )
AC_ARG_VAR(YAT2M, [tool to convert texi to man pages])
AM_CONDITIONAL(HAVE_YAT2M, test -n "$ac_cv_path_YAT2M")
AC_ISC_POSIX
AC_SEARCH_LIBS([strerror],[cposix])
AC_SYS_LARGEFILE
@ -938,7 +938,7 @@ LIBS="$gnupg_dlopen_save_libs"
# Checks for g10
AC_ARG_ENABLE(sqlite,
AC_HELP_STRING([--disable-sqlite],
AS_HELP_STRING([--disable-sqlite],
[disable the use of SQLITE]),
try_sqlite=$enableval, try_sqlite=yes)
@ -1023,7 +1023,7 @@ fi
# Enable debugging of nPth
#
AC_ARG_ENABLE(npth-debug,
AC_HELP_STRING([--enable-npth-debug],
AS_HELP_STRING([--enable-npth-debug],
[build with debug version of npth]),
[if test $enableval = yes ; then
AC_DEFINE(NPTH_ENABLE_DEBUG,1,
@ -1037,7 +1037,7 @@ AC_ARG_ENABLE(npth-debug,
# GNUTLS.
#
AC_ARG_ENABLE(ntbtls,
AC_HELP_STRING([--disable-ntbtls],
AS_HELP_STRING([--disable-ntbtls],
[disable the use of NTBTLS as TLS library]),
try_ntbtls=$enableval, try_ntbtls=yes)
if test x"$try_ntbtls" = xyes ; then
@ -1049,7 +1049,7 @@ if test "$have_ntbtls" = yes ; then
AC_DEFINE(HTTP_USE_NTBTLS, 1, [Enable NTBTLS support in http.c])
else
AC_ARG_ENABLE(gnutls,
AC_HELP_STRING([--disable-gnutls],
AS_HELP_STRING([--disable-gnutls],
[disable GNUTLS as fallback TLS library]),
try_gnutls=$enableval, try_gnutls=yes)
if test x"$try_gnutls" = xyes ; then
@ -1077,7 +1077,7 @@ fi
# Allow to set a fixed trust store file for system provided certificates.
#
AC_ARG_WITH([default-trust-store-file],
[AC_HELP_STRING([--with-default-trust-store-file=FILE],
[AS_HELP_STRING([--with-default-trust-store-file=FILE],
[Use FILE as system trust store])],
default_trust_store_file="$withval",
default_trust_store_file="")
@ -1206,7 +1206,8 @@ AC_SUBST(DNSLIBS)
# gnupg_have_ldap from "n/a" to "no" or "yes".
AC_ARG_ENABLE(ldap,
AC_HELP_STRING([--disable-ldap],[disable LDAP support]),
AS_HELP_STRING([--disable-ldap],
[disable LDAP support]),
[if test "$enableval" = "no"; then gnupg_have_ldap=no; fi])
if test "$gnupg_have_ldap" != "no" ; then
@ -1243,7 +1244,7 @@ fi
# sendmail-ish interface to the outside world. That includes Exim,
# Postfix, etc. Basically, anything that can handle "sendmail -t".
AC_ARG_WITH(mailprog,
AC_HELP_STRING([--with-mailprog=NAME],
AS_HELP_STRING([--with-mailprog=NAME],
[use "NAME -t" for mail transport]),
,with_mailprog=yes)
if test x"$with_mailprog" = xyes ; then
@ -1366,8 +1367,13 @@ AC_C_INLINE
AC_C_VOLATILE
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_TYPE_SIGNAL
AC_DECL_SYS_SIGLIST
AC_CHECK_DECLS([sys_siglist],[],[],[#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
])
gl_HEADER_SYS_SOCKET
gl_TYPE_SOCKLEN_T
@ -1375,8 +1381,8 @@ gl_TYPE_SOCKLEN_T
AC_SEARCH_LIBS([inet_addr], [nsl])
AC_ARG_ENABLE(endian-check,
AC_HELP_STRING([--disable-endian-check],
[disable the endian check and trust the OS provided macros]),
AS_HELP_STRING([--disable-endian-check],
[disable the endian check and trust the OS provided macros]),
endiancheck=$enableval,endiancheck=yes)
if test x"$endiancheck" = xyes ; then
@ -1515,7 +1521,7 @@ if test "$use_bzip2" = yes ; then
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_ARG_WITH(bzip2,
AC_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
AS_HELP_STRING([--with-bzip2=DIR],[look for bzip2 in DIR]),
[
if test -d "$withval" ; then
CPPFLAGS="${CPPFLAGS} -I$withval/include"
@ -1681,7 +1687,7 @@ AC_SUBST(USE_C99_CFLAGS)
# things and eliminate variables.
#
AC_ARG_ENABLE(optimization,
AC_HELP_STRING([--disable-optimization],
AS_HELP_STRING([--disable-optimization],
[disable compiler optimization]),
[if test $enableval = no ; then
CFLAGS=`echo $CFLAGS | sed s/-O[[1-9]]\ /-O0\ /g`
@ -1693,7 +1699,7 @@ AC_ARG_ENABLE(optimization,
#
AC_MSG_CHECKING([whether to enable log_clock])
AC_ARG_ENABLE(log_clock,
AC_HELP_STRING([--enable-log-clock],
AS_HELP_STRING([--enable-log-clock],
[enable log_clock timestamps]),
enable_log_clock=$enableval, enable_log_clock=no)
AC_MSG_RESULT($enable_log_clock)
@ -1705,7 +1711,7 @@ fi
# misbehaving autoconf tests in case the user supplied -Werror.
#
AC_ARG_ENABLE(werror,
AC_HELP_STRING([--enable-werror],
AS_HELP_STRING([--enable-werror],
[append -Werror to CFLAGS]),
[if test $enableval = yes ; then
CFLAGS="$CFLAGS -Werror"
@ -1716,7 +1722,7 @@ AC_ARG_ENABLE(werror,
#
AC_MSG_CHECKING([whether "make check" shall run all tests])
AC_ARG_ENABLE(all-tests,
AC_HELP_STRING([--enable-all-tests],
AS_HELP_STRING([--enable-all-tests],
[let "make check" run all tests]),
run_all_tests=$enableval, run_all_tests=no)
AC_MSG_RESULT($run_all_tests)
@ -1730,7 +1736,7 @@ fi
#
AC_MSG_CHECKING([whether tests should be run])
AC_ARG_ENABLE(tests,
AC_HELP_STRING([--disable-tests],
AS_HELP_STRING([--disable-tests],
[do not run any tests]),
run_tests=$enableval, run_tests=yes)
AC_MSG_RESULT($run_tests)
@ -1757,7 +1763,7 @@ fi
# before /run/user
#
AC_ARG_ENABLE(run-gnupg-user-socket,
AC_HELP_STRING([--enable-run-gnupg-user-socket],
AS_HELP_STRING([--enable-run-gnupg-user-socket],
[try /run/gnupg/user for sockets prior to /run/user]),
use_run_gnupg_user_socket=$enableval)
if test x"$use_run_gnupg_user_socket" = x"yes"; then
@ -1908,7 +1914,7 @@ AC_SUBST(BUILD_VERSION)
AC_SUBST(BUILD_FILEVERSION)
AC_ARG_ENABLE([build-timestamp],
AC_HELP_STRING([--enable-build-timestamp],
AS_HELP_STRING([--enable-build-timestamp],
[set an explicit build timestamp for reproducibility.
(default is the current time in ISO-8601 format)]),
[if test "$enableval" = "yes"; then

View File

@ -1,5 +1,6 @@
# codeset.m4 serial 2 (gettext-0.16)
dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc.
# codeset.m4 serial 5 (gettext-0.18.2)
dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2020 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -8,14 +9,16 @@ dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>],
[char* cs = nl_langinfo(CODESET); return !cs;],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <langinfo.h>]],
[[char* cs = nl_langinfo(CODESET); return !cs;]])],
[am_cv_langinfo_codeset=yes],
[am_cv_langinfo_codeset=no])
])
if test $am_cv_langinfo_codeset = yes; then
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi
])

View File

@ -1,41 +1,39 @@
# gettext.m4 serial 60 (gettext-0.17)
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
# gettext.m4 serial 71 (gettext-0.20.2)
dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl the GNU General Public License or the GNU Lesser General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
dnl Macro to add for using GNU gettext.
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
dnl default (if it is not specified or empty) is 'no-libtool'.
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
dnl depending on --{enable,disable}-{shared,static} and on the presence of
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
dnl $(top_builddir)/intl/libintl.a will be created.
dnl AM-DISABLE-SHARED).
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
dnl implementations (in libc or libintl) without the ngettext() function
dnl will be ignored. If NEEDSYMBOL is specified and is
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
dnl INTLDIR is used to find the intl libraries. If empty,
dnl the value `$(top_builddir)/intl/' is used.
dnl the value '$(top_builddir)/intl/' is used.
dnl
dnl The result of the configuration is one of three cases:
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
@ -57,17 +55,17 @@ dnl
AC_DEFUN([AM_GNU_GETTEXT],
[
dnl Argument checking.
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], ,
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
])])])])])
])])])])
ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
[errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
])])
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
define([gt_included_intl],
ifelse([$1], [external],
ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
[yes]))
define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
ifelse([$1], [external], [no], [yes]))
gt_NEEDS_INIT
AM_GNU_GETTEXT_NEED([$2])
@ -89,13 +87,12 @@ AC_DEFUN([AM_GNU_GETTEXT],
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
dnl documented, we avoid it.
dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
ifelse(gt_included_intl, yes, , [
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
dnl Set USE_NLS.
@ -123,11 +120,11 @@ AC_DEFUN([AM_GNU_GETTEXT],
gt_use_preinstalled_gnugettext=no
ifelse(gt_included_intl, yes, [
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
AC_ARG_WITH([included-gettext],
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
@ -155,12 +152,23 @@ changequote([,])dnl
fi
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
[AC_TRY_LINK([#include <libintl.h>
$gt_revision_test_code
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;],
[bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
extern int *_nl_domain_bindings;
#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
#else
#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
#endif
$gt_revision_test_code
]],
[[
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
]])],
[eval "$gt_func_gnugettext_libc=yes"],
[eval "$gt_func_gnugettext_libc=no"])])
@ -181,35 +189,57 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
dnl Now see whether libintl exists and does not depend on libiconv.
AC_TRY_LINK([#include <libintl.h>
$gt_revision_test_code
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
const char *_nl_expand_alias (const char *);
#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
#else
#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
#endif
$gt_revision_test_code
]],
[[
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
]])],
[eval "$gt_func_gnugettext_libintl=yes"],
[eval "$gt_func_gnugettext_libintl=no"])
dnl Now see whether libintl exists and depends on libiconv.
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <libintl.h>
$gt_revision_test_code
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias (const char *);],
[bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
[LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
eval "$gt_func_gnugettext_libintl=yes"
])
const char *_nl_expand_alias (const char *);
#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
#else
#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
#endif
$gt_revision_test_code
]],
[[
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
]])],
[LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
eval "$gt_func_gnugettext_libintl=yes"
])
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
@ -243,8 +273,8 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
dnl Mark actions used to generate GNU NLS library.
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi
@ -267,7 +297,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1,
AC_DEFINE([ENABLE_NLS], [1],
[Define to 1 if translation of program messages to the user's native language
is requested.])
else
@ -301,9 +331,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi
dnl For backward compatibility. Some packages may be using this.
AC_DEFINE(HAVE_GETTEXT, 1,
AC_DEFINE([HAVE_GETTEXT], [1],
[Define if the GNU gettext() function is already present or preinstalled.])
AC_DEFINE(HAVE_DCGETTEXT, 1,
AC_DEFINE([HAVE_DCGETTEXT], [1],
[Define if the GNU dcgettext() function is already present or preinstalled.])
fi
@ -312,53 +342,24 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
fi
ifelse(gt_included_intl, yes, [
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
dnl to 'yes' because some of the testsuite requires it.
if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
BUILD_INCLUDED_LIBINTL=yes
fi
dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
dnl because some of the testsuite requires it.
BUILD_INCLUDED_LIBINTL=yes
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo
AC_SUBST(INSTOBJEXT)
dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat
AC_SUBST(GENCAT)
dnl For backward compatibility. Some Makefiles may be using this.
INTLOBJS=
if test "$USE_INCLUDED_LIBINTL" = yes; then
INTLOBJS="\$(GETTOBJS)"
fi
AC_SUBST(INTLOBJS)
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
AC_SUBST([BUILD_INCLUDED_LIBINTL])
AC_SUBST([USE_INCLUDED_LIBINTL])
AC_SUBST([CATOBJEXT])
])
dnl For backward compatibility. Some Makefiles may be using this.
INTLLIBS="$LIBINTL"
AC_SUBST(INTLLIBS)
AC_SUBST([INTLLIBS])
dnl Make all documented variables known to autoconf.
AC_SUBST(LIBINTL)
AC_SUBST(LTLIBINTL)
AC_SUBST(POSUB)
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
AC_SUBST([POSUB])
])
@ -379,3 +380,7 @@ AC_DEFUN([AM_GNU_GETTEXT_NEED],
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])

View File

@ -1,5 +1,5 @@
# gpg-error.m4 - autoconf macro to detect libgpg-error.
# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH
# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 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
@ -9,7 +9,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Last-changed: 2018-11-02
# Last-changed: 2020-11-17
dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@ -31,7 +31,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
dnl since that is consistent with how our three siblings use the directory/
dnl package name in --with-$dir_name-prefix=PFX.
AC_ARG_WITH(libgpg-error-prefix,
AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
AS_HELP_STRING([--with-libgpg-error-prefix=PFX],
[prefix where GPG Error is installed (optional)]),
[gpg_error_config_prefix="$withval"])

View File

@ -1,26 +0,0 @@
# isc-posix.m4 serial 2 (gettext-0.11.2)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
# give these diagnostics:
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
undefine([AC_ISC_POSIX])
AC_DEFUN([AC_ISC_POSIX],
[
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
]
)

View File

@ -8,7 +8,8 @@
# This file 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.
#
# Last-changed: 2020-11-18
dnl AM_PATH_KSBA([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
@ -26,7 +27,7 @@ AC_DEFUN([AM_PATH_KSBA],
dnl since that is consistent with how our three siblings use the directory/
dnl package name in --with-$dir_name-prefix=PFX.
AC_ARG_WITH(libksba-prefix,
AC_HELP_STRING([--with-libksba-prefix=PFX],
AS_HELP_STRING([--with-libksba-prefix=PFX],
[prefix where KSBA is installed (optional)]),
ksba_config_prefix="$withval", ksba_config_prefix="")

View File

@ -1,15 +1,16 @@
# lcmessage.m4 serial 4 (gettext-0.14.2)
dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
# lcmessage.m4 serial 8
dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2020 Free
dnl Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl the GNU General Public License or the GNU Lesser General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
@ -20,11 +21,15 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
AC_DEFUN([gt_LC_MESSAGES],
[
AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <locale.h>]],
[[return LC_MESSAGES]])],
[gt_cv_val_LC_MESSAGES=yes],
[gt_cv_val_LC_MESSAGES=no])])
if test $gt_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
AC_DEFINE([HAVE_LC_MESSAGES], [1],
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
])

View File

@ -19,7 +19,7 @@ AC_DEFUN([GNUPG_CHECK_LDAP],
# something like ./configure LDAPLIBS="-Lfoo -lbar"
gnupg_have_ldap=no
AC_ARG_WITH(ldap,
AC_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
AS_HELP_STRING([--with-ldap=DIR],[look for the LDAP library in DIR]),
[_ldap_with=$withval])
if test x$_ldap_with != xno ; then
@ -38,22 +38,22 @@ if test x$_ldap_with != xno ; then
_ldap_save_libs=$LIBS
LIBS="$MY_LDAPLIBS $1 $LIBS"
AC_MSG_CHECKING([whether LDAP via \"$MY_LDAPLIBS\" is present and sane])
AC_TRY_LINK([
AC_MSG_CHECKING([whether LDAP via "$MY_LDAPLIBS" is present and sane])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
#include <winsock2.h>
#include <winldap.h>
#else
#include <ldap.h>
#endif
],[ldap_open("foobar",1234);],
]],[[ldap_open("foobar",1234);]])],
[gnupg_cv_func_ldap_init=yes],[gnupg_cv_func_ldap_init=no])
AC_MSG_RESULT([$gnupg_cv_func_ldap_init])
if test $gnupg_cv_func_ldap_init = no; then
AC_MSG_CHECKING([whether I can make LDAP be sane with lber.h])
AC_TRY_LINK([#include <lber.h>
#include <ldap.h>],[ldap_open("foobar",1234);],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <lber.h>
#include <ldap.h>]],[[ldap_open("foobar",1234);]])],
[gnupg_cv_func_ldaplber_init=yes],[gnupg_cv_func_ldaplber_init=no])
AC_MSG_RESULT([$gnupg_cv_func_ldaplber_init])
fi
@ -75,7 +75,8 @@ if test x$_ldap_with != xno ; then
if test "$ac_cv_func_ldap_get_option" != yes ; then
AC_MSG_CHECKING([whether LDAP supports ld_errno])
AC_TRY_LINK([#include <ldap.h>],[LDAP *ldap; ldap->ld_errno;],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ldap.h>]],
[[LDAP *ldap; ldap->ld_errno;]])],
[gnupg_cv_func_ldap_ld_errno=yes],
[gnupg_cv_func_ldap_ld_errno=no])
AC_MSG_RESULT([$gnupg_cv_func_ldap_ld_errno])

View File

@ -9,6 +9,7 @@ dnl This file is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl SPDX-License-Identifier: FSFULLR
# Last-changed: 2020-11-17
dnl
dnl Common code used for libassuan detection [internal]
@ -17,7 +18,7 @@ dnl
AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
[ AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(libassuan-prefix,
AC_HELP_STRING([--with-libassuan-prefix=PFX],
AS_HELP_STRING([--with-libassuan-prefix=PFX],
[prefix where LIBASSUAN is installed (optional)]),
libassuan_config_prefix="$withval", libassuan_config_prefix="")
if test x$libassuan_config_prefix != x ; then

View File

@ -1,5 +1,5 @@
# libgcrypt.m4 - Autoconf macros to detect libgcrypt
# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH
# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 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
@ -9,15 +9,15 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Last-changed: 2018-11-13
# Last-changed: 2020-09-27
dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
dnl MINIMUM-VERSION is a string with the version number optionally prefixed
dnl with the API version to also check the API compatibility. Example:
dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed
dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
dnl this features allows to prevent build against newer versions of libgcrypt
dnl with a changed API.
@ -30,7 +30,7 @@ dnl
AC_DEFUN([AM_PATH_LIBGCRYPT],
[ AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(libgcrypt-prefix,
AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
[prefix where LIBGCRYPT is installed (optional)]),
libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
if test x"${LIBGCRYPT_CONFIG}" = x ; then

View File

@ -9,9 +9,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Last-changed: 2020-11-17
AC_DEFUN([_AM_PATH_NPTH_CONFIG],
[ AC_ARG_WITH(npth-prefix,
AC_HELP_STRING([--with-npth-prefix=PFX],
AS_HELP_STRING([--with-npth-prefix=PFX],
[prefix where NPTH is installed (optional)]),
npth_config_prefix="$withval", npth_config_prefix="")
if test "x$npth_config_prefix" != x ; then

View File

@ -9,7 +9,7 @@ dnl This file is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl
dnl Last-changed: 2018-11-13
dnl Last-changed: 2020-11-18
dnl AM_PATH_NTBTLS([MINIMUM-VERSION,
@ -26,7 +26,7 @@ dnl
AC_DEFUN([AM_PATH_NTBTLS],
[ AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_WITH(ntbtls-prefix,
AC_HELP_STRING([--with-ntbtls-prefix=PFX],
AS_HELP_STRING([--with-ntbtls-prefix=PFX],
[prefix where NTBTLS is installed (optional)]),
ntbtls_config_prefix="$withval", ntbtls_config_prefix="")
if test x"${NTBTLS_CONFIG}" = x ; then

View File

@ -14,7 +14,7 @@ dnl found, and sets @LIBREADLINE@ to the necessary libraries.
AC_DEFUN([GNUPG_CHECK_READLINE],
[
AC_ARG_WITH(readline,
AC_HELP_STRING([--with-readline=DIR],
AS_HELP_STRING([--with-readline=DIR],
[look for the readline library in DIR]),
[_do_readline=$withval],[_do_readline=yes])
@ -30,7 +30,7 @@ AC_DEFUN([GNUPG_CHECK_READLINE],
_combo="-lreadline${_termcap:+ $_termcap}"
LIBS="$LIBS $_combo"
AC_MSG_CHECKING([whether readline via \"$_combo\" is present and sane])
AC_MSG_CHECKING([whether readline via "$_combo" is present and sane])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>

View File

@ -1,5 +1,5 @@
# socklen.m4 serial 4
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
# socklen.m4 serial 11
dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -8,45 +8,69 @@ dnl From Albert Chin, Windows fixes from Simon Josefsson.
dnl Check for socklen_t: historically on BSD it is an int, and in
dnl POSIX 1g it is a type of its own, but some platforms use different
dnl types for the argument to getsockopt, getpeername, etc. So we
dnl have to test to find something that will work.
dnl types for the argument to getsockopt, getpeername, etc.:
dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
dnl So we have to test to find something that will work.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
[AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])dnl
AC_CHECK_TYPE([socklen_t], ,
[AC_CACHE_CHECK([for socklen_t equivalent],
[gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
gl_cv_socklen_t_equiv=
for arg2 in "struct sockaddr" void; do
for t in int size_t "unsigned int" "long int" "unsigned long int"; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/types.h>
#include <sys/socket.h>
int getpeername (int, $arg2 *, $t *);]],
[[$t len;
getpeername (0, 0, &len);]])],
[gl_cv_socklen_t_equiv="$t"])
test "$gl_cv_socklen_t_equiv" != "" && break
done
test "$gl_cv_socklen_t_equiv" != "" && break
done
if test "$gl_cv_socklen_t_equiv" = ""; then
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
fi
])
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
[type to use in place of socklen_t if not defined])],
[gl_SOCKET_HEADERS])])
dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
dnl it there first. That file is included by gnulib's socket_.h, which
dnl all users of this module should include. Cygwin must not include
dnl ws2tcpip.h.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
[AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl
AC_CHECK_TYPE([socklen_t], ,
[AC_MSG_CHECKING([for socklen_t equivalent])
AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv],
[# Systems have either "struct sockaddr *" or
# "void *" as the second argument to getpeername
gl_cv_socklen_t_equiv=
for arg2 in "struct sockaddr" void; do
for t in int size_t "unsigned int" "long int" "unsigned long int"; do
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>
dnl it there too. But on Cygwin, wc2tcpip.h must not be included. Users
dnl of this module should use the same include pattern as gl_SOCKET_HEADERS.
dnl When you change this macro, keep also in sync:
dnl - gl_CHECK_SOCKET_HEADERS,
dnl - the Include section of modules/socklen.
AC_DEFUN([gl_SOCKET_HEADERS],
[
/* <sys/types.h> is not needed according to POSIX, but the
<sys/socket.h> in i386-unknown-freebsd4.10 and
powerpc-apple-darwin5.5 required it. */
#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif
])
int getpeername (int, $arg2 *, $t *);],
[$t len;
getpeername (0, 0, &len);],
[gl_cv_socklen_t_equiv="$t"])
test "$gl_cv_socklen_t_equiv" != "" && break
done
test "$gl_cv_socklen_t_equiv" != "" && break
done
])
if test "$gl_cv_socklen_t_equiv" = ""; then
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
fi
AC_MSG_RESULT([$gl_cv_socklen_t_equiv])
AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv],
[type to use in place of socklen_t if not defined])],
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#elif HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif])])
dnl Tests for the existence of the header for socket facilities.
dnl Defines the C macros HAVE_SYS_SOCKET_H, HAVE_WS2TCPIP_H.
dnl This macro must match gl_SOCKET_HEADERS.
AC_DEFUN([gl_CHECK_SOCKET_HEADERS],
[AC_CHECK_HEADERS_ONCE([sys/socket.h])
if test $ac_cv_header_sys_socket_h = no; then
dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
dnl the check for those headers unconditional; yet cygwin reports
dnl that the headers are present but cannot be compiled (since on
dnl cygwin, all socket information should come from sys/socket.h).
AC_CHECK_HEADERS([ws2tcpip.h])
fi
])