$NetBSD: patch-configure,v 1.3 2022/06/27 01:19:40 gutteridge Exp $

Skip compiler detection magic.

Avoid choosing aligned_alloc() when it's not present, such as CentOS 6
with lang/gcc7 and older Solaris releases.

--- configure.orig	2021-07-14 20:55:34.000000000 +0000
+++ configure
@@ -563,8 +563,6 @@ else
     fi
   done
 fi # icc
-test -z "$cc_vendor" && die "compiler not found"
-test "$cc_fail" = "yes" && die "unsupported compiler version"
 
 log_start "compiler working with default options"
 if ! cc_check_cflag; then
@@ -660,6 +658,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes
   finish_check "$ALLOW_RUNTIME_LINKING"
 fi
 
+start_check "libc provides aligned_alloc"
+HAS_STDC_ALIGNED_ALLOC=no
+if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then
+  HAS_STDC_ALIGNED_ALLOC=yes
+fi
+if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then
+  BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNO_STDC_ALIGNED_ALLOC)
+fi
+finish_check "$HAS_STDC_ALIGNED_ALLOC"
+
 SHARED_VSCRIPT=
 if ! darwin; then
   start_check "linker support for --version-script"
