summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-04-26 23:27:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-04-26 23:32:45 -0700
commit62a7ce5f503c4a7f8bb410f0cc10fefab106a4d2 (patch)
tree09ebfe2960f47c48e52a4246c5ca63e930606c03 /m4
parent852794283564e2ac05162f0826fd67da1a6e2c3e (diff)
downloadcoreutils-62a7ce5f503c4a7f8bb410f0cc10fefab106a4d2.tar.gz
maint: port to Autoconf 2.71
* configure.ac: Use AC_PROG_CC, not AC_PROG_CC_STDC. * gl/modules/smack (configure.ac): * m4/jm-macros.m4 (coreutils_MACROS): * m4/xattr.m4 (gl_FUNC_XATTR): Use AS_HELP_STRING, not AC_HELP_STRING. * m4/check-decl.m4 (gl_CHECK_DECLS): Do not require AC_HEADER_TIME; we no longer care about it directly. * m4/jm-macros.m4 (coreutils_MACROS): Do not require AC_ISC_POSIX, which became obsolete in 2006. Use AC_LINK_IFELSE instead of AC_TRY_LINK.
Diffstat (limited to 'm4')
-rw-r--r--m4/check-decl.m44
-rw-r--r--m4/jm-macros.m454
-rw-r--r--m4/xattr.m44
3 files changed, 33 insertions, 29 deletions
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index c67a95edb..02db0f330 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -1,4 +1,4 @@
-#serial 26
+#serial 27
# Check declarations for this package.
dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
@@ -13,8 +13,6 @@ dnl Putting it in a separate file like this helps share it between
dnl different packages.
AC_DEFUN([gl_CHECK_DECLS],
[
- AC_REQUIRE([AC_HEADER_TIME])
-
AC_CHECK_HEADERS_ONCE([grp.h pwd.h])
headers='
#include <sys/types.h>
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index db32cf483..fb66907f4 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -1,4 +1,4 @@
-#serial 112 -*- autoconf -*-
+#serial 113 -*- autoconf -*-
dnl Misc type-related macros for coreutils.
@@ -24,9 +24,6 @@ AC_DEFUN([coreutils_MACROS],
AM_MISSING_PROG(HELP2MAN, help2man)
AC_SUBST([MAN])
- dnl This macro actually runs replacement code. See isc-posix.m4.
- AC_REQUIRE([AC_ISC_POSIX])dnl
-
gl_CHECK_ALL_TYPES
AC_REQUIRE([gl_CHECK_DECLS])
@@ -116,7 +113,7 @@ AC_DEFUN([coreutils_MACROS],
# Check whether libcap is usable -- for ls --color support
LIB_CAP=
AC_ARG_ENABLE([libcap],
- AC_HELP_STRING([--disable-libcap], [disable libcap support]))
+ AS_HELP_STRING([--disable-libcap], [disable libcap support]))
if test "X$enable_libcap" != "Xno"; then
AC_CHECK_LIB([cap], [cap_get_file],
[AC_CHECK_HEADER([sys/capability.h],
@@ -142,29 +139,38 @@ AC_DEFUN([coreutils_MACROS],
# and doesn't have a separate math library.
AC_SUBST([SEQ_LIBM])
- ac_seq_body='
- static double x, y;
- x = floor (x);
- x = rint (x);
- x = modf (x, &y);'
- AC_TRY_LINK([#include <math.h>], [$ac_seq_body], ,
- [ac_seq_save_LIBS="$LIBS"
- LIBS="$LIBS -lm"
- AC_TRY_LINK([#include <math.h>], [$ac_seq_body], [SEQ_LIBM=-lm])
- LIBS="$ac_seq_save_LIBS"
- ])
-
+ jm_break=:
+ for jm_seqlibs in '' '-lm'; do
+ jm_seq_save_LIBS=$LIBS
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <math.h>
+ ]],
+ [[static double x, y;
+ x = floor (x);
+ x = rint (x);
+ x = modf (x, &y);]])],
+ [SEQ_LIBM=$jm_seqlibs
+ jm_break=break])
+ LIBS=$jm_seq_save_LIBS
+ $jm_break
+ done
# See is fpsetprec() required to use extended double precision
# This is needed on 32 bit FreeBSD to give accurate conversion of:
# `numfmt 9223372036854775808`
- AC_TRY_LINK([#include <ieeefp.h>],
- [#ifdef __i386__
- fpsetprec(FP_PE);
- #else
- # error not required on 64 bit
- #endif
- ], [ac_have_fpsetprec=yes], [ac_have_fpsetprec=no])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <ieeefp.h>
+ ]],
+ [[#ifdef __i386__
+ fpsetprec(FP_PE);
+ #else
+ # error not required on 64 bit
+ #endif
+ ]])],
+ [ac_have_fpsetprec=yes],
+ [ac_have_fpsetprec=no])
if test "$ac_have_fpsetprec" = "yes" ; then
AC_DEFINE([HAVE_FPSETPREC], 1, [whether fpsetprec is present and required])
fi
diff --git a/m4/xattr.m4 b/m4/xattr.m4
index 3fbcd9104..5f9248939 100644
--- a/m4/xattr.m4
+++ b/m4/xattr.m4
@@ -1,5 +1,5 @@
# xattr.m4 - check for Extended Attributes (Linux)
-# serial 3
+# serial 4
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -11,7 +11,7 @@
AC_DEFUN([gl_FUNC_XATTR],
[
AC_ARG_ENABLE([xattr],
- AC_HELP_STRING([--disable-xattr],
+ AS_HELP_STRING([--disable-xattr],
[do not support extended attributes]),
[use_xattr=$enableval], [use_xattr=yes])