From 550d8e8e6ccef95a119bc265101792b0475a7aa0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 15:42:57 +0200 Subject: Adding upstream version 2.4.59. Signed-off-by: Daniel Baumann --- configure.in | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 62ed7b0..8134a69 100644 --- a/configure.in +++ b/configure.in @@ -488,6 +488,28 @@ LIBS="" AC_SEARCH_LIBS(crypt, crypt) CRYPT_LIBS="$LIBS" APACHE_SUBST(CRYPT_LIBS) + +if test "$ac_cv_search_crypt" != "no"; then + # Test crypt() with the SHA-512 test vector from https://akkadia.org/drepper/SHA-crypt.txt + AC_CACHE_CHECK([whether crypt() supports SHA-2], [ap_cv_crypt_sha2], [ + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +#include + +#define PASSWD_0 "Hello world!" +#define SALT_0 "\$6\$saltstring" +#define EXPECT_0 "\$6\$saltstring\$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJu" \ + "esI68u4OTLiBFdcbYEdFCoEOfaS35inz1" +]], [char *result = crypt(PASSWD_0, SALT_0); + if (!result) return 1; + if (strcmp(result, EXPECT_0)) return 2; +])], [ap_cv_crypt_sha2=yes], [ap_cv_crypt_sha2=no], [ap_cv_crypt_sha2=no])]) + if test "$ap_cv_crypt_sha2" = yes; then + AC_DEFINE([HAVE_CRYPT_SHA2], 1, [Define if crypt() supports SHA-2 hashes]) + fi +fi + LIBS="$saved_LIBS" dnl See Comment #Spoon @@ -501,22 +523,26 @@ prctl \ timegm \ getpgid \ fopen64 \ -getloadavg +getloadavg \ +gettid ) dnl confirm that a void pointer is large enough to store a long integer APACHE_CHECK_VOID_PTR_LEN -AC_CACHE_CHECK([for gettid()], ac_cv_gettid, +if test $ac_cv_func_gettid = no; then + # On Linux before glibc 2.30, gettid() is only usable via syscall() + AC_CACHE_CHECK([for gettid() via syscall], ap_cv_gettid, [AC_TRY_RUN(#define _GNU_SOURCE #include #include #include int main(int argc, char **argv) { pid_t t = syscall(SYS_gettid); return t == -1 ? 1 : 0; }, -[ac_cv_gettid=yes], [ac_cv_gettid=no], [ac_cv_gettid=no])]) -if test "$ac_cv_gettid" = "yes"; then - AC_DEFINE(HAVE_GETTID, 1, [Define if you have gettid()]) + [ap_cv_gettid=yes], [ap_cv_gettid=no], [ap_cv_gettid=no])]) + if test "$ap_cv_gettid" = "yes"; then + AC_DEFINE(HAVE_SYS_GETTID, 1, [Define if you have gettid() via syscall()]) + fi fi dnl ## Check for the tm_gmtoff field in struct tm to get the timezone diffs @@ -869,6 +895,7 @@ fi if test -d ./test/modules/http2; then APACHE_FAST_OUTPUT(test/Makefile) AC_CONFIG_FILES([test/pyhttpd/config.ini]) + APACHE_FAST_OUTPUT(test/clients/Makefile) fi dnl ## Finalize the variables -- cgit v1.2.3