diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-18 05:51:38 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-11-18 06:12:51 +0100 |
commit | d66fb3aa53a6c4a815fe35a15e3c61886c5df628 (patch) | |
tree | 00d4dcf54f94f1cc8551fc5a09392b78bb9b127b /configure.ac | |
parent | build: Use modern Autoconf check for types. (diff) | |
download | gnupg2-d66fb3aa53a6c4a815fe35a15e3c61886c5df628.tar.xz gnupg2-d66fb3aa53a6c4a815fe35a15e3c61886c5df628.zip |
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 80 |
1 files changed, 43 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 059c2fe6e..b6b8d1e01 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |