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 /acinclude.m4 | |
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 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 1402b4920..cc5870ed8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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) |