glibc/sysdeps/mach/hurd/configure.ac
Flavio Cruz e3da8f9bad Use proc_getchildren_rusage when available in getrusage and times.
Message-ID: <20240217164846.1837223-1-flaviocruz@gmail.com>
2024-02-17 21:14:39 +01:00

51 lines
1.4 KiB
Plaintext

GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
dnl We need this setting because of the need for PLT calls in ld.so.
dnl See Roland's comment in
dnl https://sourceware.org/bugzilla/show_bug.cgi?id=15605
AC_DEFINE([NO_RTLD_HIDDEN])
if test -n "$sysheaders"; then
OLD_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
fi
AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(dnl
[[#include <hurd/version.h>]], [[
#define NEED_VERSION 20020609
#if HURD_INTERFACE_VERSION < NEED_VERSION
# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
#endif]])],
[libc_cv_hurd_version=ok],
[libc_cv_hurd_version=bad])])
if test "x$libc_cv_hurd_version" != xok; then
AC_MSG_ERROR(Hurd headers not installed or too old)
fi
dnl
dnl hurd_RPC_CHECK(interface.defs, rpc_method, define)
dnl
dnl Check if rpc_method RPC is defined by interface.defs
dnl and define `define`.
dnl
AC_DEFUN([hurd_RPC_CHECK], [dnl
AC_CACHE_CHECK(for $2 in $1, libc_cv_hurd_rpc_$2, [dnl
AC_EGREP_HEADER($2, hurd/$1,
libc_cv_hurd_rpc_$2=yes,
libc_cv_hurd_rpc_$2=no)])
if test $libc_cv_hurd_rpc_$2 = yes; then
AC_DEFINE([$3])
fi
])
hurd_RPC_CHECK(process.defs, proc_getchildren_rusage,
HAVE_HURD_PROC_GETCHILDREN_RUSAGE)
if test -n "$sysheaders"; then
CPPFLAGS=$OLD_CPPFLAGS
fi
# Hurd has libpthread as a separate library.
pthread_in_libc=no