I have attached new versions which apply on the current master.
Andreas
From a4a4970d37b710449ccd57a8b4d896a3c004b62a Mon Sep 17 00:00:00 2001
From: Andreas Karlsson andr...@proxel.se
Date: Thu, 12 Feb 2015 23:55:01 +0100
Subject: [PATCH 1/4] Replace obsolete macros AC_TRY_* with AC_*_IFELSE.
The AC_TRY_* macros have been obsolete for a long time and cause warnings
to be written to the log. The new macros have existed since at least
autoconf 2.49a, which was released in late 2000.
---
config/ac_func_accept_argtypes.m4 | 6 ++--
config/acx_pthread.m4 | 4 +--
config/c-compiler.m4 | 69 +++--
config/c-library.m4 | 36 ++--
config/programs.m4| 4 +--
configure.in | 72 ---
6 files changed, 97 insertions(+), 94 deletions(-)
diff --git a/config/ac_func_accept_argtypes.m4 b/config/ac_func_accept_argtypes.m4
index a82788d..0e50c8d 100644
--- a/config/ac_func_accept_argtypes.m4
+++ b/config/ac_func_accept_argtypes.m4
@@ -50,15 +50,15 @@ AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
- AC_TRY_COMPILE(
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#ifdef HAVE_SYS_TYPES_H
#include sys/types.h
#endif
#ifdef HAVE_SYS_SOCKET_H
#include sys/socket.h
#endif
-extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
- [], [ac_not_found=no; break 4], [ac_not_found=yes])
+extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);], [])],
+ [ac_not_found=no; break 4], [ac_not_found=yes])
done
done
done
diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4
index 581164b..ebb4f06 100644
--- a/config/acx_pthread.m4
+++ b/config/acx_pthread.m4
@@ -122,10 +122,10 @@ for flag in $acx_pthread_flags; do
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
-AC_TRY_LINK([#include pthread.h],
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include pthread.h],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ])],
[acx_pthread_ok=yes], [acx_pthread_ok=no])
if test x$acx_pthread_ok = xyes; then
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4
index 4ef0de6..bf9b758 100644
--- a/config/c-compiler.m4
+++ b/config/c-compiler.m4
@@ -7,8 +7,8 @@
# Check if the C compiler understands signed types.
AC_DEFUN([PGAC_C_SIGNED],
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
-[AC_TRY_COMPILE([],
-[signed char c; signed short s; signed int i;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[signed char c; signed short s; signed int i;])],
[pgac_cv_c_signed=yes],
[pgac_cv_c_signed=no])])
if test x$pgac_cv_c_signed = xno ; then
@@ -81,7 +81,7 @@ AC_DEFUN([PGAC_TYPE_64BIT_INT],
[define([Ac_define], [translit([have_$1_64], [a-z *], [A-Z_P])])dnl
define([Ac_cachevar], [translit([pgac_cv_type_$1_64], [ *], [_p])])dnl
AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
-[AC_TRY_RUN(
+[AC_RUN_IFELSE([AC_LANG_SOURCE(
[typedef $1 ac_int64;
/*
@@ -107,7 +107,7 @@ int does_int64_work()
}
main() {
exit(! does_int64_work());
-}],
+}])],
[Ac_cachevar=yes],
[Ac_cachevar=no],
[# If cross-compiling, check the size reported by the compiler and
@@ -169,8 +169,8 @@ fi])# PGAC_TYPE_128BIT_INT
# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
[AC_CACHE_CHECK(for __func__, pgac_cv_funcname_func_support,
-[AC_TRY_COMPILE([#include stdio.h],
-[printf(%s\n, __func__);],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include stdio.h],
+[printf(%s\n, __func__);])],
[pgac_cv_funcname_func_support=yes],
[pgac_cv_funcname_func_support=no])])
if test x$pgac_cv_funcname_func_support = xyes ; then
@@ -178,8 +178,8 @@ AC_DEFINE(HAVE_FUNCNAME__FUNC, 1,
[Define to 1 if your compiler understands __func__.])
else
AC_CACHE_CHECK(for __FUNCTION__, pgac_cv_funcname_function_support,
-[AC_TRY_COMPILE([#include stdio.h],
-[printf(%s\n, __FUNCTION__);],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include stdio.h],
+[printf(%s\n, __FUNCTION__);])],
[pgac_cv_funcname_function_support=yes],
[pgac_cv_funcname_function_support=no])])
if test x$pgac_cv_funcname_function_support = xyes ; then
@@ -199,8 +199,8 @@ fi])#