$NetBSD: patch-configure,v 1.15 2025/03/30 21:10:47 wiz Exp $

Portability fix.
Solaris seems to need -std=c99 with recent pkgsrc so keep it.

--- configure.orig	2024-10-24 18:24:00.000000000 +0000
+++ configure
@@ -5884,6 +5884,7 @@ powerpc*-apple-darwin*)	icu_cv_host_frag
 *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;;
 *-*-nto*)	icu_cv_host_frag=mh-qnx ;;
 *-ncr-*)	icu_cv_host_frag=mh-mpras ;;
+-*-sco3.2v5*)	icu_cv_host_frag=mh-scoosr5 ;;
 *) 		icu_cv_host_frag=mh-unknown ;;
 esac
 
@@ -6511,6 +6512,29 @@ if test "x$plugins" = "xtrue"; then
 fi
 
 
+# check if sys/atomic.h is present.
+for ac_header in sys/atomic.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/atomic.h" "ac_cv_header_sys_atomic_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_atomic_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_ATOMIC_H 1
+_ACEOF
+
+fi
+
+done
+
+case "${host}" in
+*-netbsd*)
+if test "x$ac_cv_header_sys_atomic_h" = "xyes"; then
+    CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_NETBSD_ATOMIC_OPS=1";
+fi
+;;
+*)
+;;
+esac
+
 U_ENABLE_DYLOAD=1
 enable=yes
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins. Ignored if plugins disabled." >&5
