$NetBSD: patch-configure,v 1.3 2014/03/04 12:07:16 obache Exp $ Portability fix. Solaris seems to need -std=c99 with recent pkgsrc so keep it and at the same time fix a typo involving CXXFLAGS. --- configure.orig 2013-10-04 20:54:58.000000000 +0000 +++ configure @@ -4083,9 +4083,6 @@ $as_echo "$ac_use_strict_options" >&6; } if test "$GCC" = yes then case "${host}" in - *-*-solaris*) - # Don't use -std=c99 option on Solaris/GCC - ;; *) # Do not use -ansi. It limits us to C90, and it breaks some platforms. # We use -std=c99 to disable the gnu99 defaults and its associated warnings @@ -4578,7 +4575,7 @@ fi if test "$CAN_BUILD_64" != yes; then # Nope. back out changes. CFLAGS="${CFLAGS_OLD}" - CXXFLAGS="${CFLAGS_OLD}" + CXXFLAGS="${CXXFLAGS_OLD}" # 2. try xarch=v9 [deprecated] ## TODO: cross compile: the following won't work. SPARCV9=`isainfo -n 2>&1 | grep sparcv9` @@ -5452,6 +5449,23 @@ if test "x$ac_cv_header_elf_h" = "xyes"; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1"; 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 + +if test "x$ac_cv_header_sys_atomic_h" = "xyes"; then + CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_NETBSD_ATOMIC_OPS=1"; +fi + U_ENABLE_DYLOAD=1 enable=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable dynamic loading of plugins" >&5 @@ -7442,13 +7456,13 @@ fi # Now that we're done using CPPFLAGS etc. for tests, we can change it # for build. -if test "${CC}" == "clang"; then +if test "${CC}" = "clang"; then CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality" else CLANGCFLAGS="" fi -if test "${CXX}" == "clang++"; then +if test "${CXX}" = "clang++"; then CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality" else CLANGCXXFLAGS=""