]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: port to Autoconf 2.71
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Apr 2021 06:27:59 +0000 (23:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 27 Apr 2021 06:32:45 +0000 (23:32 -0700)
* 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.

configure.ac
gl/modules/smack
m4/check-decl.m4
m4/jm-macros.m4
m4/xattr.m4

index 7fbecbf8d4a6dc08953f785933b9fb3e960d49f1..02291a4aef94d6c5e6ebea6e04ee9ead30c1aae9 100644 (file)
@@ -52,7 +52,7 @@ m4_syscmd([test "${GNULIB_POSIXCHECK+set}" = set])
 m4_if(m4_sysval, [0], [], [dnl
 gl_ASSERT_NO_GNULIB_POSIXCHECK])
 
-AC_PROG_CC_STDC
+AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CPP
 AC_PROG_GCC_TRADITIONAL
index a6dcbaa6221ad5d32263efc38900b93c7ebfcf3c..1c4a541a656a03f7d0325fb98443bad271d025df 100644 (file)
@@ -10,7 +10,7 @@ configure.ac:
 # Check whether libsmack is available
 LIB_SMACK=
 AC_ARG_ENABLE([libsmack],
-  AC_HELP_STRING([--disable-libsmack], [disable libsmack support]))
+  AS_HELP_STRING([--disable-libsmack], [disable libsmack support]))
 if test "X$enable_libsmack" != "Xno"; then
   AC_CHECK_LIB([smack], [smack_new_label_from_self],
     [AC_CHECK_LIB([smack], [smack_new_label_from_path],
index c67a95edb77a4bf6ee6f14fa3bf53025013d3386..02db0f330a61eecccaaea1af11e262179a7e9754 100644 (file)
@@ -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>
index db32cf48320c1215a8f26dabd463b2c806b249bd..fb66907f42f3d2030e8ff13f5732c9a9d7705c8f 100644 (file)
@@ -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
index 3fbcd91047662ab3bf7a1118d3a5fc232639929b..5f9248939783cfe06f772258153fec6928de6155 100644 (file)
@@ -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])