From 5573aa37c49fde084f1450d0b410ee3221b7144f Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 25 Aug 2023 09:28:25 +0100 Subject: [PATCH 1/8] autoconf: Use AS_HELP_STRING if available, fixes warnings for any recent version of autoconf. --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 98d7c9831ea..810b86a70e5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -4,7 +4,7 @@ dnl Autoconf 2.50 can not handle substr correctly. It does have dnl AC_HELP_STRING, so let's try to call it if we can. dnl Note: this define must be on one line so that it can be properly returned dnl as the help string. -AC_DEFUN([APACHE_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl +AC_DEFUN([APACHE_HELP_STRING],[ifdef([AS_HELP_STRING], AS_HELP_STRING($1, $2),[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])])dnl dnl APACHE_SUBST(VARIABLE) dnl Makes VARIABLE available in generated files From 1c457ff9669aedc216a9dbe4e90217f5f9813490 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 25 Aug 2023 09:29:11 +0100 Subject: [PATCH 2/8] configure: Fix autoconf warnings. --- configure.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 2ba4c6f7100..7b2792ec18c 100644 --- a/configure.in +++ b/configure.in @@ -429,8 +429,6 @@ AC_AIX AC_MINIX ]) -AC_ISC_POSIX - # Ensure that satisfactory versions of apr and apr-util are # found if external copies are configured. if test "${apr_found}" = "yes"; then @@ -744,7 +742,7 @@ if test "$enable_pie" = "yes"; then PICFLAGS="-fPIE" PILDFLAGS="-pie" else - AC_ERROR([--enable-pie requested but $CC failed using PIE flags]) + AC_MSG_ERROR([--enable-pie requested but $CC failed using PIE flags]) fi fi APACHE_SUBST(PICFLAGS) From 7bc2635cbb45e510896c160a5a48a5d24f0384a4 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 25 Aug 2023 09:30:41 +0100 Subject: [PATCH 3/8] * acinclude.m4 (APACHE_CHECK_OPENSSL): Use AC_CACHE_CHECK/AC_COMPILE_IFELSE to fix autoconf warnings. --- acinclude.m4 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 810b86a70e5..740337de050 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -585,17 +585,17 @@ AC_DEFUN([APACHE_CHECK_OPENSSL],[ fi fi - AC_MSG_CHECKING([for OpenSSL version >= 0.9.8a]) - AC_TRY_COMPILE([#include ],[ + AC_CACHE_CHECK([for OpenSSL version >= 0.9.8a], [ap_cv_openssl098a], [ + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include ],[ #if !defined(OPENSSL_VERSION_NUMBER) #error "Missing OpenSSL version" #endif #if OPENSSL_VERSION_NUMBER < 0x0090801f #error "Unsupported OpenSSL version " OPENSSL_VERSION_TEXT -#endif], - [AC_MSG_RESULT(yes) - ac_cv_openssl=yes], - [AC_MSG_RESULT(no)]) +#endif]), [ap_cv_openssl098a=yes], [ap_cv_openssl098a=no])]) + if test "x$ap_cv_openssl098a" = xyes; then + ac_cv_openssl=yes + fi if test "x$ac_cv_openssl" = "xyes"; then ap_openssl_libs="${ap_openssl_libs:--lssl -lcrypto} `$apr_config --libs`" From 6c38a388e34ce68e3e34e3b1d96c7845b0d4a1bb Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 14 Feb 2025 09:45:25 +0000 Subject: [PATCH 4/8] * os/unix/config.m4: Move check for rlim_t here and use AC_CHECK_TYPE. * acinclude.m4: Remove APACHE_TYPE_RLIM_T. --- acinclude.m4 | 22 ---------------------- os/unix/config.m4 | 7 ++++++- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 740337de050..27ea1f00258 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -120,28 +120,6 @@ AC_DEFUN([APACHE_GEN_CONFIG_VARS],[ done ]) -dnl -dnl APACHE_TYPE_RLIM_T -dnl -dnl If rlim_t is not defined, define it to int -dnl -AC_DEFUN([APACHE_TYPE_RLIM_T], [ - AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [ - AC_TRY_COMPILE([ -#include -#include -#include -], [rlim_t spoon;], [ - ac_cv_type_rlim_t=yes - ],[ac_cv_type_rlim_t=no - ]) - ]) - if test "$ac_cv_type_rlim_t" = "no" ; then - AC_DEFINE(rlim_t, int, - [Define to 'int' if doesn't define it for us]) - fi -]) - dnl the list of build variables which are available for customization on a dnl per module subdir basis (to be inserted into modules.mk with a "MOD_" dnl prefix, i.e. MOD_CFLAGS etc.). Used in APACHE_MODPATH_{INIT,FINISH}. diff --git a/os/unix/config.m4 b/os/unix/config.m4 index dacbf6b5398..a2b443334ed 100644 --- a/os/unix/config.m4 +++ b/os/unix/config.m4 @@ -1,5 +1,10 @@ if test "$OS" = "unix" ; then - APACHE_TYPE_RLIM_T + AC_CHECK_TYPE(rlim_t, [], + AC_DEFINE_UNQUOTED(rlim_t, int, + [Define to 'int' if doesn't define it for us]), + [#include +#include +#include ]) AC_CHECK_HEADERS(sys/time.h sys/resource.h sys/sem.h sys/ipc.h) From 156ce9ce8ef16d515abf848ab4c1fdeaeef689f0 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 14 Feb 2025 10:03:23 +0000 Subject: [PATCH 5/8] * configure.in: Use AC_CHECK_MEMBER for struct tm.tm_gmtoff test. --- configure.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index 7b2792ec18c..e715fd22bd6 100644 --- a/configure.in +++ b/configure.in @@ -567,13 +567,10 @@ case ${host}X${ac_cv_func_gettid}X${ap_cv_gettid} in esac dnl ## Check for the tm_gmtoff field in struct tm to get the timezone diffs -AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, -[AC_TRY_COMPILE([#include -#include ], [struct tm tm; tm.tm_gmtoff;], - ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) -if test "$ac_cv_struct_tm_gmtoff" = "yes"; then - AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field]) -fi +AC_CHECK_MEMBER([struct tm.tm_gmtoff], + [AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])], [], + [#include +#include ]) AC_CHECK_DECL(CMSG_DATA,,, [#include #include ]) From 086266028a83b21a145cc07c12bae45e5b96dae5 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 14 Feb 2025 10:10:25 +0000 Subject: [PATCH 6/8] * buildconf: Run autoconf with -Wall -Wno-cross to suppress cross-compilation warnings by default, rather than grep. Support --with-errors argument to add -Werror and fail on autoconf/autoheader warnings. Fail if autoheader or autoconf fail. Add "buildconf: " prefix to output messages. --- buildconf | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/buildconf b/buildconf index e7199a70d87..74ad23c7a40 100755 --- a/buildconf +++ b/buildconf @@ -36,6 +36,7 @@ esac apr_src_dir="srclib/apr ../apr" apu_src_dir="" +autoconf_args="-Wall" # By default, touch the checked-in sources to suppress regeneration of # the ap_expr parser. @@ -61,6 +62,10 @@ do --with-regen-expr) regen_expr=yes ;; + + --with-errors) + autoconf_args="$autoconf_args -Werror" + ;; -h|--help) cat <&1 | grep -v "$cross_compile_warning" +if ${AUTOHEADER:-autoheader} ${autoconf_args}; then + : +else + echo buildconf: ERROR: autoheader failed, bailing out. + exit 1 +fi -echo rebuilding configure +echo buildconf: rebuilding configure rm -f config.cache -${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning" +if ${AUTOCONF:-autoconf} ${autoconf_args}; then + : +else + echo buildconf: ERROR: autoconf failed, bailing out. + exit 2 +fi # Remove autoconf 2.5x cache directories rm -rf autom4te*.cache @@ -309,7 +326,7 @@ rm -rf autom4te*.cache rm -rf bsd_converted if [ -f `which cut` ]; then - echo rebuilding rpm spec file + echo buildconf: rebuilding rpm spec file ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER` EPOCH=`build/get-version.sh epoch include/ap_release.h AP_SERVER` REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER` From abdba7a7bdc37db386d175966bd3d26d07cad697 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 14 Feb 2025 10:12:52 +0000 Subject: [PATCH 7/8] CI: Add workflow to fail if autoconf/autoheader warnings are produced. --- .github/workflows/linux.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 01a4310510d..e3bb786eec1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,6 +36,11 @@ jobs: SKIP_TESTING=1 TEST_LOGNO=1 # ------------------------------------------------------------------------- + - name: autoconf warnings test + env: | + BUILDCONFIG=--with-errors + SKIP_TESTING=1 + # ------------------------------------------------------------------------- - name: Default # ------------------------------------------------------------------------- - name: All-static modules From 0eeee1271e09b805d304e88c007c146857265453 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Fri, 8 May 2026 12:23:35 +0100 Subject: [PATCH 8/8] * 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 --- acinclude.m4 | 17 +++++++---------- configure.in | 23 +++++++---------------- modules/cache/config.m4 | 9 ++++----- modules/filters/config.m4 | 7 +++---- modules/http2/config2.m4 | 4 ++-- modules/lua/config.m4 | 2 +- modules/md/config2.m4 | 4 ++-- modules/session/config.m4 | 4 ++-- modules/ssl/config.m4 | 4 ++-- 9 files changed, 30 insertions(+), 44 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 27ea1f00258..456e16d0c45 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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 ],[], - [AC_MSG_RESULT(OK) - ac_cv_jansson=yes], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [AC_MSG_RESULT(OK) + ac_cv_jansson=yes], [AC_MSG_RESULT(FAILED)]) if test "x$ac_cv_jansson" = "xyes"; then diff --git a/configure.in b/configure.in index e715fd22bd6..4d1edd8bade 100644 --- a/configure.in +++ b/configure.in @@ -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 uses 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 be whatever PCRE determines. 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 the place, so just check for 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 #include -#include -int main(int argc, char **argv) { -pid_t t = syscall(SYS_gettid); return t == -1 ? 1 : 0; }, +#include ]], +[[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 diff --git a/modules/cache/config.m4 b/modules/cache/config.m4 index 4fa414b70b9..f1ebeca4510 100644 --- a/modules/cache/config.m4 +++ b/modules/cache/config.m4 @@ -79,10 +79,10 @@ if test "x$ap_distcache_configured" = "x"; then if test "$ap_distcache_found" = "yes"; then dnl test for a good version AC_MSG_CHECKING(for distcache version) - AC_TRY_COMPILE([#include ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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"; then ap_distcache_libs="-ldistcache -lnal" APR_ADDTO(LIBS, [$ap_distcache_libs]) - AC_TRY_LINK( - [#include ], - [DC_CTX *foo = DC_CTX_new((const char *)0,0);], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[DC_CTX *foo = DC_CTX_new((const char *)0,0);]])], [], [ap_distcache_found="no"]) AC_MSG_RESULT($ap_distcache_found) diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index 3a3cf3d4d0d..a7a1035b26c 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -78,7 +78,7 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [ fi APR_ADDTO(LIBS, [-lz]) AC_MSG_CHECKING([for zlib library]) - AC_TRY_LINK([#include ], [int i = Z_OK;], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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 support, , , most, [ 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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ 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" diff --git a/modules/http2/config2.m4 b/modules/http2/config2.m4 index c4579c4dbbd..f158eb15dcd 100644 --- a/modules/http2/config2.m4 +++ b/modules/http2/config2.m4 @@ -125,13 +125,13 @@ AC_DEFUN([APACHE_CHECK_NGHTTP2],[ fi AC_MSG_CHECKING([for nghttp2 version >= 1.2.1]) - AC_TRY_COMPILE([#include ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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)]) diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 index 40ae6f02416..0789c0139c1 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -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", :) diff --git a/modules/md/config2.m4 b/modules/md/config2.m4 index b20ab3b45e1..f4c404edb3a 100644 --- a/modules/md/config2.m4 +++ b/modules/md/config2.m4 @@ -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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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)]) diff --git a/modules/session/config.m4 b/modules/session/config.m4 index 7a38185d0f5..d9db948fad0 100644 --- a/modules/session/config.m4 +++ b/modules/session/config.m4 @@ -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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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]) diff --git a/modules/ssl/config.m4 b/modules/ssl/config.m4 index 687368aaef0..d83ad46cc94 100644 --- a/modules/ssl/config.m4 +++ b/modules/ssl/config.m4 @@ -55,13 +55,13 @@ APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) 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 ],[ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ #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.])])