summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-01-07 15:08:45 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-01-07 15:32:56 -0800
commita1b558a2e24d71ff6634a0ff50d46380c162c961 (patch)
treeb5799f5520c10e0644386f0d8d246899a4d10396 /m4
parent0be40fbe43c4e409a417b12d2919ca64326e0281 (diff)
downloademacs-a1b558a2e24d71ff6634a0ff50d46380c162c961.tar.gz
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'm4')
-rw-r--r--m4/acl.m46
-rw-r--r--m4/clock_time.m415
-rw-r--r--m4/euidaccess.m411
-rw-r--r--m4/getrandom.m411
-rw-r--r--m4/nanosleep.m412
-rw-r--r--m4/pthread_sigmask.m415
-rw-r--r--m4/timer_time.m415
7 files changed, 50 insertions, 35 deletions
diff --git a/m4/acl.m4 b/m4/acl.m4
index 6c2db7d3203..e612f1ae34b 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
# acl.m4 - check for access control list (ACL) primitives
-# serial 25
+# serial 26
# Copyright (C) 2002, 2004-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -141,7 +141,6 @@ int type = ACL_TYPE_EXTENDED;]])],
fi
if test -n "$gl_need_lib_has_acl"; then
FILE_HAS_ACL_LIB=$LIB_ACL
- LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
fi
AC_SUBST([LIB_ACL])
AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
@@ -211,7 +210,4 @@ AC_DEFUN([gl_FILE_HAS_ACL],
FILE_HAS_ACL_LIB=$LIB_ACL
fi
AC_SUBST([FILE_HAS_ACL_LIB])
- dnl For backward compatibility (e.g. coreutils still uses LIB_HAS_ACL).
- LIB_HAS_ACL="$FILE_HAS_ACL_LIB"
- AC_SUBST([LIB_HAS_ACL])
])
diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
index 411e0710e7f..d624a73d35d 100644
--- a/m4/clock_time.m4
+++ b/m4/clock_time.m4
@@ -1,14 +1,14 @@
-# clock_time.m4 serial 11
+# clock_time.m4 serial 12
dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for clock_getres, clock_gettime and clock_settime,
-# and set LIB_CLOCK_GETTIME.
+# and set CLOCK_TIME_LIB.
# For a program named, say foo, you should add a line like the following
# in the corresponding Makefile.am file:
-# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+# foo_LDADD = $(LDADD) $(CLOCK_TIME_LIB)
AC_DEFUN([gl_CLOCK_TIME],
[
@@ -21,12 +21,15 @@ AC_DEFUN([gl_CLOCK_TIME],
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
# programs in the package would end up linked with that potentially-shared
# library, inducing unnecessary run-time overhead.
- LIB_CLOCK_GETTIME=
- AC_SUBST([LIB_CLOCK_GETTIME])
+ CLOCK_TIME_LIB=
+ AC_SUBST([CLOCK_TIME_LIB])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
[test "$ac_cv_search_clock_gettime" = "none required" ||
- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+ CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
LIBS=$gl_saved_libs
+ # For backward compatibility.
+ LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
+ AC_SUBST([LIB_CLOCK_GETTIME])
])
diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4
index 0dc757820ee..f0eb5bde84a 100644
--- a/m4/euidaccess.m4
+++ b/m4/euidaccess.m4
@@ -1,4 +1,4 @@
-# euidaccess.m4 serial 15
+# euidaccess.m4 serial 16
dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -41,12 +41,15 @@ AC_DEFUN([gl_PREREQ_EUIDACCESS], [
# Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
# programs in the package would end up linked with that potentially-shared
# library, inducing unnecessary run-time overhead.
- LIB_EACCESS=
- AC_SUBST([LIB_EACCESS])
+ EUIDACCESS_LIBGEN=
+ AC_SUBST([EUIDACCESS_LIBGEN])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([eaccess], [gen],
[test "$ac_cv_search_eaccess" = "none required" ||
- LIB_EACCESS=$ac_cv_search_eaccess])
+ EUIDACCESS_LIBGEN=$ac_cv_search_eaccess])
AC_CHECK_FUNCS([eaccess])
LIBS=$gl_saved_libs
+ # For backward compatibility.
+ LIB_EACCESS="$EUIDACCESS_LIBGEN"
+ AC_SUBST([LIB_EACCESS])
])
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4
index f2010c0213f..c508f1a55c3 100644
--- a/m4/getrandom.m4
+++ b/m4/getrandom.m4
@@ -1,4 +1,4 @@
-# getrandom.m4 serial 9
+# getrandom.m4 serial 10
dnl Copyright 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -62,13 +62,16 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
if test $gl_cv_lib_assume_bcrypt = yes; then
AC_DEFINE([HAVE_LIB_BCRYPT], [1],
[Define to 1 if the bcrypt library is guaranteed to be present.])
- LIB_GETRANDOM='-lbcrypt'
+ GETRANDOM_LIB='-lbcrypt'
else
- LIB_GETRANDOM='-ladvapi32'
+ GETRANDOM_LIB='-ladvapi32'
fi
;;
*)
- LIB_GETRANDOM= ;;
+ GETRANDOM_LIB= ;;
esac
+ AC_SUBST([GETRANDOM_LIB])
+ dnl For backward compatibility.
+ LIB_GETRANDOM="$GETRANDOM_LIB"
AC_SUBST([LIB_GETRANDOM])
])
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index 21ee5a21daf..e21a3e343cb 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,4 +1,4 @@
-# serial 42
+# serial 43
dnl From Jim Meyering.
dnl Check for the nanosleep function.
@@ -25,11 +25,11 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- LIB_NANOSLEEP=
- AC_SUBST([LIB_NANOSLEEP])
+ NANOSLEEP_LIB=
+ AC_SUBST([NANOSLEEP_LIB])
AC_SEARCH_LIBS([nanosleep], [rt posix4],
[test "$ac_cv_search_nanosleep" = "none required" ||
- LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ NANOSLEEP_LIB=$ac_cv_search_nanosleep])
if test "x$ac_cv_search_nanosleep" != xno; then
dnl The system has a nanosleep function.
@@ -143,4 +143,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
HAVE_NANOSLEEP=0
fi
LIBS=$nanosleep_save_libs
+
+ # For backward compatibility.
+ LIB_NANOSLEEP="$NANOSLEEP_LIB"
+ AC_SUBST([LIB_NANOSLEEP])
])
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 5110668155e..27795282bee 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,4 +1,4 @@
-# pthread_sigmask.m4 serial 21
+# pthread_sigmask.m4 serial 22
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_macro=no])
])
- LIB_PTHREAD_SIGMASK=
+ PTHREAD_SIGMASK_LIB=
if test $gl_cv_func_pthread_sigmask_macro = yes; then
dnl pthread_sigmask is a dummy macro.
@@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
dnl pthread_sigmask is available with -pthread or -lpthread.
- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+ PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
else
dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
@@ -101,6 +101,9 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
fi
+ AC_SUBST([PTHREAD_SIGMASK_LIB])
+ dnl For backward compatibility.
+ LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
@@ -114,7 +117,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
dnl that are not linked with -lpthread, the pthread_sigmask() function
dnl always returns 0 and has no effect.
- if test -z "$LIB_PTHREAD_SIGMASK"; then
+ if test -z "$PTHREAD_SIGMASK_LIB"; then
case " $LIBS " in
*' -pthread '*) ;;
*' -lpthread '*) ;;
@@ -162,7 +165,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_return_works],
[
gl_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+ LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <pthread.h>
@@ -208,7 +211,7 @@ int main ()
gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
esac
m4_ifdef([gl_][THREADLIB],
- [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
+ [dnl Link against $LIBMULTITHREAD, not only $PTHREAD_SIGMASK_LIB.
dnl Otherwise we get a false positive on those platforms where
dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
gl_save_LIBS=$LIBS
diff --git a/m4/timer_time.m4 b/m4/timer_time.m4
index 4c2608b58e8..437d1dc5428 100644
--- a/m4/timer_time.m4
+++ b/m4/timer_time.m4
@@ -1,10 +1,10 @@
-# timer_time.m4 serial 5
+# timer_time.m4 serial 6
dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# Check for timer_settime, and set LIB_TIMER_TIME.
+# Check for timer_settime, and set TIMER_TIME_LIB.
AC_DEFUN([gl_TIMER_TIME],
[
@@ -21,13 +21,13 @@ AC_DEFUN([gl_TIMER_TIME],
AC_CHECK_DECL([timer_settime], [], [],
[[#include <time.h>
]])
- LIB_TIMER_TIME=
- AC_SUBST([LIB_TIMER_TIME])
+ TIMER_TIME_LIB=
+ AC_SUBST([TIMER_TIME_LIB])
AS_IF([test "$ac_cv_have_decl_timer_settime" = yes], [
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([timer_settime], [rt posix4],
[test "$ac_cv_search_timer_settime" = "none required" ||
- LIB_TIMER_TIME=$ac_cv_search_timer_settime])
+ TIMER_TIME_LIB=$ac_cv_search_timer_settime])
m4_ifdef([gl_][PTHREADLIB],
[dnl GLIBC uses threads to emulate posix timers when kernel support
dnl is not available (like Linux < 2.6 or when used with kFreeBSD)
@@ -42,8 +42,11 @@ AC_DEFUN([gl_TIMER_TIME],
#endif
#endif
],
- [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBPMULTITHREAD"])])
+ [TIMER_TIME_LIB="$TIMER_TIME_LIB $LIBPMULTITHREAD"])])
AC_CHECK_FUNCS([timer_settime])
LIBS=$gl_saved_libs
])
+ dnl For backward compatibility.
+ LIB_TIMER_TIME="$TIMER_TIME_LIB"
+ AC_SUBST([LIB_TIMER_TIME])
])