You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/08/28 13:33:50 UTC

svn commit: r1937568 - in httpd/httpd/trunk: . modules/cache modules/filters modules/http2 modules/lua modules/md modules/session modules/ssl

Author: jorton
Date: Fri Aug 28 13:33:49 2026
New Revision: 1937568

Log:
* configure.in, acinclude.m4, modules/cache/config.m4,
  modules/filters/config.m4, modules/http2/config2.m4,
  modules/lua/config.m4, modules/md/config2.m4,
  modules/session/config.m4, modules/ssl/config.m4:
  Replace obsolete autoconf macros to fix warnings with -Wall -Werror.
  AC_CONFIG_HEADER -> AC_CONFIG_HEADERS.
  AC_CANONICAL_SYSTEM -> AC_CANONICAL_HOST.
  AC_TRY_RUN -> AC_RUN_IFELSE with AC_LANG_PROGRAM/AC_LANG_SOURCE.
  AC_TRY_COMPILE -> AC_COMPILE_IFELSE with AC_LANG_PROGRAM.
  AC_TRY_LINK -> AC_LINK_IFELSE with AC_LANG_PROGRAM.
  AC_HELP_STRING -> AS_HELP_STRING.
  Remove obsolete AC_PROG_CC_C99 (subsumed by AC_PROG_CC).
  Remove obsolete AC_HEADER_STDC.
  Add proper m4 quoting around AC_LANG_PROGRAM in APACHE_CHECK_OPENSSL
  to fix AC_LANG_CONFTEST warnings.

Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
GitHub: PR #380

Modified:
   httpd/httpd/trunk/acinclude.m4
   httpd/httpd/trunk/configure.in
   httpd/httpd/trunk/modules/cache/config.m4
   httpd/httpd/trunk/modules/filters/config.m4
   httpd/httpd/trunk/modules/http2/config2.m4
   httpd/httpd/trunk/modules/lua/config.m4
   httpd/httpd/trunk/modules/md/config2.m4
   httpd/httpd/trunk/modules/session/config.m4
   httpd/httpd/trunk/modules/ssl/config.m4

Modified: httpd/httpd/trunk/acinclude.m4
==============================================================================
--- httpd/httpd/trunk/acinclude.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/acinclude.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -564,13 +564,13 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[
     fi
 
     AC_CACHE_CHECK([for OpenSSL version >= 0.9.8a], [ap_cv_openssl098a], [
-    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <openssl/opensslv.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/opensslv.h>]],[[
 #if !defined(OPENSSL_VERSION_NUMBER)
 #error "Missing OpenSSL version"
 #endif
 #if OPENSSL_VERSION_NUMBER < 0x0090801f
 #error "Unsupported OpenSSL version " OPENSSL_VERSION_TEXT
-#endif]), [ap_cv_openssl098a=yes], [ap_cv_openssl098a=no])])
+#endif]])], [ap_cv_openssl098a=yes], [ap_cv_openssl098a=no])])
     if test "x$ap_cv_openssl098a" = xyes; then
        ac_cv_openssl=yes
     fi
@@ -910,11 +910,8 @@ dnl
 AC_DEFUN([APACHE_CHECK_VOID_PTR_LEN], [
 
 AC_CACHE_CHECK([for void pointer length], [ap_cv_void_ptr_lt_long],
-[AC_TRY_RUN([
-int main(void)
-{
-    return sizeof(void *) < sizeof(long); 
-}], [ap_cv_void_ptr_lt_long=no], [ap_cv_void_ptr_lt_long=yes], 
+[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return sizeof(void *) < sizeof(long);])],
+    [ap_cv_void_ptr_lt_long=no], [ap_cv_void_ptr_lt_long=yes],
     [ap_cv_void_ptr_lt_long="cross compile - not checked"])])
 
 if test "$ap_cv_void_ptr_lt_long" = "yes"; then
@@ -1056,9 +1053,9 @@ AC_DEFUN([APACHE_CHECK_JANSSON],[
 
     # attempts to include jansson.h fail me. So lets make sure we can at least
     # include its other header file
-    AC_TRY_COMPILE([#include <jansson_config.h>],[],
-      [AC_MSG_RESULT(OK) 
-       ac_cv_jansson=yes], 
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <jansson_config.h>]], [[]])],
+      [AC_MSG_RESULT(OK)
+       ac_cv_jansson=yes],
        [AC_MSG_RESULT(FAILED)])
 
     if test "x$ac_cv_jansson" = "xyes"; then

Modified: httpd/httpd/trunk/configure.in
==============================================================================
--- httpd/httpd/trunk/configure.in	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/configure.in	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -7,7 +7,7 @@ dnl
 AC_PREREQ(2.60)
 AC_INIT(ABOUT_APACHE)
 
-AC_CONFIG_HEADER(include/ap_config_auto.h)
+AC_CONFIG_HEADERS(include/ap_config_auto.h)
 AC_CONFIG_AUX_DIR(build)
 
 dnl Absolute source/build directory
@@ -76,7 +76,7 @@ dnl ## Run configure for packages Apache
 dnl shared library support for these packages doesn't currently
 dnl work on some platforms
 
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
 
 orig_prefix="$prefix"
 
@@ -203,9 +203,6 @@ dnl PCRE and for our config tests will b
 AC_PROG_CC
 AC_PROG_CPP
 
-dnl Try to get c99 support for variadic macros
-ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
-
 dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
 dnl we got already CC_FOR_BUILD from environment.
 if test "x${build_alias}" != "x${host_alias}"; then
@@ -362,7 +359,7 @@ case $host in
       APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
       ;;
   *-solaris2*)
-      dnl This is a hack -- we should be using AC_TRY_RUN instead
+      dnl This is a hack -- we should be using AC_RUN_IFELSE instead
       ap_platform_runtime_link_flag="-R"
       dnl solaris 8 and above don't have a thundering herd
       dnl not sure about rev's before this one.
@@ -460,11 +457,6 @@ dnl I think these are just used all over
 dnl them at the base of the tree. If some are specific to a single
 dnl directory, they should be moved (Comment #Spoon)
 
-dnl Regarding standard header files: AC_HEADER_STDC doesn't set symbols
-dnl HAVE_STRING_H, HAVE_STDLIB_H, etc., so those are checked for
-dnl explicitly so that the normal HAVE_xxx_H symbol is defined.
-
-AC_HEADER_STDC
 AC_CHECK_HEADERS( \
 string.h \
 limits.h \
@@ -548,12 +540,11 @@ APACHE_CHECK_VOID_PTR_LEN
 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
+[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
 #include <unistd.h>
 #include <sys/syscall.h>
-#include <sys/types.h>
-int main(int argc, char **argv) {
-pid_t t = syscall(SYS_gettid); return t == -1 ? 1 : 0; },
+#include <sys/types.h>]],
+[[pid_t t = syscall(SYS_gettid); return t == -1 ? 1 : 0;]])],
   [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()])
@@ -730,7 +721,7 @@ if test "$enable_pie" = "yes"; then
      save_LDFLAGS=$LDFLAGS
      CFLAGS="$CFLAGS -fPIE"
      LDFLAGS="$LDFLAGS -pie"
-     AC_TRY_RUN([static int foo[30000]; int main () { return 0; }],
+     AC_RUN_IFELSE([AC_LANG_SOURCE([static int foo[30000]; int main () { return 0; }])],
       [ap_cv_cc_pie=yes], [ap_cv_cc_pie=no], [ap_cv_cc_pie=yes])
      CFLAGS=$save_CFLAGS
      LDFLAGS=$save_LDFLAGS

Modified: httpd/httpd/trunk/modules/cache/config.m4
==============================================================================
--- httpd/httpd/trunk/modules/cache/config.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/cache/config.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -79,10 +79,10 @@ if test "x$ap_distcache_configured" = "x
   if test "$ap_distcache_found" = "yes"; then
     dnl test for a good version
     AC_MSG_CHECKING(for distcache version)
-    AC_TRY_COMPILE([#include <distcache/dc_client.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <distcache/dc_client.h>]],[[
 #if DISTCACHE_CLIENT_API != 0x0001
 #error "distcache API version is unrecognised"
-#endif],
+#endif]])],
       [],
       [ap_distcache_found="no"])
     AC_MSG_RESULT($ap_distcache_found)
@@ -99,9 +99,8 @@ if test "x$ap_distcache_configured" = "x
     ap_distcache_libs="-ldistcache -lnal"
     APR_ADDTO(LIBS, [$ap_distcache_libs])
 
-    AC_TRY_LINK(
-      [#include <distcache/dc_client.h>],
-      [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <distcache/dc_client.h>]],
+      [[DC_CTX *foo = DC_CTX_new((const char *)0,0);]])],
       [],
       [ap_distcache_found="no"])
     AC_MSG_RESULT($ap_distcache_found)

Modified: httpd/httpd/trunk/modules/filters/config.m4
==============================================================================
--- httpd/httpd/trunk/modules/filters/config.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/filters/config.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -78,7 +78,7 @@ APACHE_MODULE(deflate, Deflate transfer
     fi
     APR_ADDTO(LIBS, [-lz])
     AC_MSG_CHECKING([for zlib library])
-    AC_TRY_LINK([#include <zlib.h>], [int i = Z_OK;], 
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]], [[int i = Z_OK;]])],
       [AC_MSG_RESULT(found) 
        APR_ADDTO(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])],
       [AC_MSG_RESULT(not found)
@@ -152,10 +152,9 @@ APACHE_MODULE(brotli, Brotli compression
     ap_save_cppflags=$CPPFLAGS
     APR_ADDTO(CPPFLAGS, [-I${ap_brotli_base}/include])
     AC_MSG_CHECKING([for Brotli library >= 0.6.0 via prefix])
-    AC_TRY_COMPILE(
-      [#include <brotli/encode.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <brotli/encode.h>]],[[
 const uint8_t *o = BrotliEncoderTakeOutput((BrotliEncoderState*)0, (size_t*)0);
-if (o) return *o;],
+if (o) return *o;]])],
       [AC_MSG_RESULT(yes)
        ap_brotli_found=yes
        ap_brotli_cflags="-I${ap_brotli_base}/include"

Modified: httpd/httpd/trunk/modules/http2/config2.m4
==============================================================================
--- httpd/httpd/trunk/modules/http2/config2.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/http2/config2.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -125,13 +125,13 @@ AC_DEFUN([APACHE_CHECK_NGHTTP2],[
     fi
 
     AC_MSG_CHECKING([for nghttp2 version >= 1.2.1])
-    AC_TRY_COMPILE([#include <nghttp2/nghttp2ver.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nghttp2/nghttp2ver.h>]],[[
 #if !defined(NGHTTP2_VERSION_NUM)
 #error "Missing nghttp2 version"
 #endif
 #if NGHTTP2_VERSION_NUM < 0x010201
 #error "Unsupported nghttp2 version " NGHTTP2_VERSION_TEXT
-#endif],
+#endif]])],
       [AC_MSG_RESULT(OK)
        ac_cv_nghttp2=yes],
       [AC_MSG_RESULT(FAILED)])

Modified: httpd/httpd/trunk/modules/lua/config.m4
==============================================================================
--- httpd/httpd/trunk/modules/lua/config.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/lua/config.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -44,7 +44,7 @@ AC_DEFUN([CHECK_LUA],
 
 AC_ARG_WITH(
     lua,
-    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua installation prefix])],
+    [AS_HELP_STRING([--with-lua=PATH],[Path to the Lua installation prefix])],
     lua_path="$withval",
     :)
 

Modified: httpd/httpd/trunk/modules/md/config2.m4
==============================================================================
--- httpd/httpd/trunk/modules/md/config2.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/md/config2.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -100,7 +100,7 @@ AC_DEFUN([APACHE_CHECK_CURL],[
     AC_CHECK_HEADERS([curl/curl.h])
 
     AC_MSG_CHECKING([for curl version >= 7.29])
-    AC_TRY_COMPILE([#include <curl/curlver.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curl/curlver.h>]],[[
 #if !defined(LIBCURL_VERSION_MAJOR)
 #error "Missing libcurl version"
 #endif
@@ -109,7 +109,7 @@ AC_DEFUN([APACHE_CHECK_CURL],[
 #endif
 #if LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 29
 #error "Unsupported libcurl version " LIBCURL_VERSION
-#endif],
+#endif]])],
       [AC_MSG_RESULT(OK)
        ac_cv_curl=yes],
       [AC_MSG_RESULT(FAILED)])

Modified: httpd/httpd/trunk/modules/session/config.m4
==============================================================================
--- httpd/httpd/trunk/modules/session/config.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/session/config.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -40,11 +40,11 @@ fi
 if test "$session_mods_enable_crypto" != "no"; then
   saved_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $APR_INCLUDES $APU_INCLUDES"
-  AC_TRY_COMPILE([#include <apr_crypto.h>],[
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <apr_crypto.h>]],[[
 #if APU_HAVE_CRYPTO == 0
 #error no crypto support
 #endif
-  ], [ap_HAVE_APR_CRYPTO="yes"], [ap_HAVE_APR_CRYPTO="no"])
+  ]])], [ap_HAVE_APR_CRYPTO="yes"], [ap_HAVE_APR_CRYPTO="no"])
   CPPFLAGS="$saved_CPPFLAGS"
   if test $ap_HAVE_APR_CRYPTO = "no"; then
     AC_MSG_WARN([Your APR does not include SSL/EVP support. To enable it: configure --with-crypto])

Modified: httpd/httpd/trunk/modules/ssl/config.m4
==============================================================================
--- httpd/httpd/trunk/modules/ssl/config.m4	Fri Aug 28 13:33:34 2026	(r1937567)
+++ httpd/httpd/trunk/modules/ssl/config.m4	Fri Aug 28 13:33:49 2026	(r1937568)
@@ -55,13 +55,13 @@ APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$m
 ssl_ct_objs="mod_ssl_ct.lo ssl_ct_log_config.lo ssl_ct_sct.lo ssl_ct_util.lo"
 APACHE_MODULE(ssl_ct, [Support for Certificate Transparency (RFC 6962)], $ssl_ct_objs, , no, [
     AC_MSG_CHECKING([for OpenSSL version >= 1.0.2])
-    AC_TRY_COMPILE([#include <openssl/opensslv.h>],[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/opensslv.h>]],[[
 #if !defined(OPENSSL_VERSION_NUMBER)
 #error "Missing OpenSSL version"
 #endif
 #if OPENSSL_VERSION_NUMBER < 0x10002003L
 #error "Unsupported OpenSSL version " OPENSSL_VERSION_TEXT
-#endif],
+#endif]])],
       [AC_MSG_RESULT(yes)],
       [AC_MSG_ERROR([mod_ssl_ct requires OpenSSL 1.0.2-beta3 or later.])])