$NetBSD: patch-configure,v 1.4 2019/11/27 15:11:45 hauke Exp $

Add POSIX syntax for passing ld(1) options through the compiler 
front end

For Solarish, select _XOPEN_SOURCE version depending on __STDC_VERSION__,
see <https://gist.github.com/jperkin/b08f9108daf8d0ac695067d71f882a9d>

Remove bashism

--- configure.orig	2021-07-28 11:28:27.824674514 +0000
+++ configure
@@ -9156,10 +9156,13 @@ case "$opsys" in
    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
 
       if test "$os_release" -ge 505; then
-     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
      $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
 
+     $as_echo "#if __STDC_VERSION__ - 0 < 199901L" >>confdefs.h
+     $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+     $as_echo "#else" >>confdefs.h
+     $as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
+     $as_echo "#endif" >>confdefs.h
    fi ;;
   linux)
     $as_echo "#define _POSIX_C_SOURCE 199506L" >>confdefs.h
@@ -10061,7 +10064,7 @@ $as_echo_n "checking for runtime librari
     linux* | irix*) dash_r="-rpath " ;;
     *)
       dash_r=""
-      for try_dash_r in "-R" "-R " "-rpath "; do
+      for try_dash_r in "-Wl,R" "-R" "-R " "-rpath "; do
         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
 
 if test "$GCC" = "yes"; then
@@ -22507,7 +22510,7 @@ fi
 if test "$have_vdb_mach" = yes ; then
   echo "  Using mach exception mechanism as vdb fault handler."
 fi
-if test "$have_vdb_fake" = yes && test "$with_vdb" == fake; then
+if test "$have_vdb_fake" = yes && test "$with_vdb" = fake; then
   echo "  Virtual dirty bit write barrier manually disabled."
 fi
 test "$with_pdump" = yes && echo "  Using the new portable dumper."
