libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 351b66f2a1093e6d86d8040c56c3173919b0a44d
parent d94229422f07a8023dac2c32638b012b7a73b47a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat,  3 Aug 2024 18:07:20 +0200

mhd_sys_extentions.m4: updated, workarounds for broken clang behaviour

Diffstat:
Mm4/mhd_sys_extentions.m4 | 32++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/m4/mhd_sys_extentions.m4 b/m4/mhd_sys_extentions.m4 @@ -40,18 +40,23 @@ # # LICENSE # -# Copyright (c) 2016, 2017 Karlson2k (Evgeny Grin) <k2k@narod.ru> +# Copyright (c) 2016, 2017, 2024 Karlson2k (Evgeny Grin) <k2k@narod.ru> # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 2 +#serial 3 AC_DEFUN([MHD_SYS_EXT],[dnl AC_PREREQ([2.64])dnl for AS_VAR_IF, AS_VAR_SET_IF, m4_ifnblank - AC_LANG_PUSH([C])dnl Use C language for simplicity + AC_LANG_ASSERT([C])dnl Only C is supported +m4_ifdef([_AC_UNDECLARED_BUILTIN], +[AC_DEFUN_ONCE([_AC_UNDECLARED_BUILTIN_]_AC_LANG_ABBREV, + [_AC_UNDECLARED_BUILTIN])]dnl +[AC_REQUIRE([_AC_UNDECLARED_BUILTIN_]_AC_LANG_ABBREV)]dnl +)dnl m4_ifdef _AC_UNDECLARED_BUILTIN mhd_mse_sys_ext_defines="" mhd_mse_sys_ext_flags="" @@ -278,6 +283,8 @@ int main() " AC_CACHE_CHECK([[for useful system-specific features]], [[mhd_cv_headers_useful_features_present]], [dnl + mhd_SYS_EXT_SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ ${mhd_mse_sys_ext_defines} ${mhd_mse_sys_features_src} @@ -303,6 +310,8 @@ ${mhd_mse_sys_features_src} ])dnl ] )dnl + CFLAGS="$mhd_SYS_EXT_SAVE_CFLAGS" + AS_UNSET([mhd_SYS_EXT_SAVE_CFLAGS]) ] ) @@ -366,7 +375,6 @@ ${mhd_mse_sys_features_src} AS_UNSET([[mhd_mse_result]]) AS_UNSET([[mhd_mse_xopen_flags]]) AS_UNSET([[mhd_mse_sys_ext_flags]]) - AC_LANG_POP([C]) ]) @@ -761,6 +769,8 @@ $2 dnl Check whether features test works without _XOPEN_SOURCE and dnl with disabled extensions (undefined most of dnl predefined macros for specific requested mode). + mhd_SYS_EXT_SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $ac_[]_AC_LANG_ABBREV[]_undeclared_builtin_options" AC_COMPILE_IFELSE([AC_LANG_SOURCE([ _MHD_UNDEF_ALL_EXT $src_Var @@ -947,6 +957,8 @@ $src_Var ) ] ) + CFLAGS="$mhd_SYS_EXT_SAVE_CFLAGS" + AS_UNSET([mhd_SYS_EXT_SAVE_CFLAGS]) AS_UNSET([defs_Var]) AS_UNSET([src_Var]) AS_VAR_POPDEF([defs_Var])dnl @@ -991,18 +1003,6 @@ AC_DEFUN([MHD_CHECK_HEADERS_PRESENCE], [dnl # -# MHD_CHECK_HEADERS_PRESENCE_COMPACT(oneheader.h otherheader.h ...) -# -# Same as MHD_CHECK_HEADERS_PRESENCE, but a bit slower and produce more compact 'configure'. - -AC_DEFUN([MHD_CHECK_HEADERS_PRESENCE_COMPACT], [dnl - for mhd_chk_Header in $1 ; do - MHD_CHECK_HEADER_PRESENCE([[${mhd_chk_Header}]]) - done -]) - - -# # MHD_CHECK_BASIC_HEADERS_PRESENCE # # Check basic headers for presence.