summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-11-17 12:28:10 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2020-11-17 12:36:14 +0900
commit41d753e21eaae3e4332e841de2f40e7055f2a68c (patch)
tree94687b963eb5a3625f11a54694bf6e133f8edfa6 /m4
parent4764c5a3a4d704b3b42bafc5eba3996579030703 (diff)
downloadlibgpg-error-41d753e21eaae3e4332e841de2f40e7055f2a68c.tar.gz
build: Update to new autoconf constructs.
* configure.ac Replace AC_GNU_SOURCE to Use AC_USE_SYSTEM_EXTENSIONS. Replace AC_HELP_STRING to AS_HELP_STRING. * m4/estream.m4: Replace AC_TRY_LINK to AC_LINK_IFELSE. * m4/gnupg-misc.m4: Replace AC_TRY_COMPILE to AC_COMPILE_IFELSE. * m4/libtool.m4: Use AC_LANG_PUSH/AC_LANG_POP instead of AC_LANG_SAVE/AC_LANG_RESTORE. * m4/readline.m4: Replace AC_HELP_STRING to AS_HELP_STRING. Fix quote for _combo. * m4/threadlib.m4: Replace AC_HELP_STRING to AS_HELP_STRING. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/estream.m45
-rw-r--r--m4/gnupg-misc.m44
-rw-r--r--m4/libtool.m416
-rw-r--r--m4/readline.m44
-rw-r--r--m4/threadlib.m44
5 files changed, 19 insertions, 14 deletions
diff --git a/m4/estream.m4 b/m4/estream.m4
index 548fe08..deb972d 100644
--- a/m4/estream.m4
+++ b/m4/estream.m4
@@ -26,8 +26,9 @@ AC_DEFUN([estream_PRINTF_INIT],
AC_CHECK_SIZEOF([void *])
AC_CACHE_CHECK([for nl_langinfo and THOUSEP],
estream_cv_langinfo_thousep,
- [AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(THOUSEP); return !cs;],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>]],
+ [[char* cs = nl_langinfo(THOUSEP); return !cs;]])],
estream_cv_langinfo_thousep=yes,
estream_cv_langinfo_thousep=no)
])
diff --git a/m4/gnupg-misc.m4 b/m4/gnupg-misc.m4
index 12f86d8..c707b35 100644
--- a/m4/gnupg-misc.m4
+++ b/m4/gnupg-misc.m4
@@ -16,7 +16,7 @@ dnl of the usual 2.
AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG],
[AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h)
AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
@@ -26,7 +26,7 @@ AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg,
#endif
#ifdef HAVE_DIRECT_H
# include <direct.h>
-#endif], [mkdir ("foo", 0);],
+#endif]], [[mkdir ("foo", 0);]])],
gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
AC_DEFINE(MKDIR_TAKES_ONE_ARG,1,
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 0cd84af..8795701 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -7474,7 +7474,7 @@ AC_LANG_POP
# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_GCJ_CONFIG],
[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
+AC_LANG_PUSH([Java])
# Source file extension for Java test sources.
ac_ext=java
@@ -7530,7 +7530,7 @@ if test -n "$compiler"; then
_LT_CONFIG($1)
fi
-AC_LANG_RESTORE
+AC_LANG_POP
GCC=$lt_save_GCC
CC=$lt_save_CC
@@ -7545,7 +7545,7 @@ CFLAGS=$lt_save_CFLAGS
# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_GO_CONFIG],
[AC_REQUIRE([LT_PROG_GO])dnl
-AC_LANG_SAVE
+AC_LANG_PUSH([Go])
# Source file extension for Go test sources.
ac_ext=go
@@ -7601,7 +7601,7 @@ if test -n "$compiler"; then
_LT_CONFIG($1)
fi
-AC_LANG_RESTORE
+AC_LANG_POP
GCC=$lt_save_GCC
CC=$lt_save_CC
@@ -7616,7 +7616,9 @@ CFLAGS=$lt_save_CFLAGS
# to write the compiler configuration to `libtool'.
m4_defun([_LT_LANG_RC_CONFIG],
[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
+
+dnl Here, something like AC_LANG_PUSH([RC]) is expected.
+dnl But Resource Compiler is not supported as a language by autoconf
# Source file extension for RC test sources.
ac_ext=rc
@@ -7655,8 +7657,10 @@ if test -n "$compiler"; then
_LT_CONFIG($1)
fi
+dnl Here, AC_LANG_POP is expected.
GCC=$lt_save_GCC
-AC_LANG_RESTORE
+dnl Back to C
+AC_LANG([C])
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
])# _LT_LANG_RC_CONFIG
diff --git a/m4/readline.m4 b/m4/readline.m4
index 0c9619d..2ffbc7b 100644
--- a/m4/readline.m4
+++ b/m4/readline.m4
@@ -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>
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 32c2ea5..b486395 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -54,8 +54,8 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={posix|solaris|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+AS_HELP_STRING([--enable-threads={posix|solaris|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
[gl_use_threads=$enableval],
[if test -n "$gl_use_threads_default"; then
gl_use_threads="$gl_use_threads_default"