$NetBSD$

--- configure.orig	2013-02-21 20:21:49.000000000 +0000
+++ configure
@@ -5198,7 +5198,7 @@ case $host_os in *\ *) host_os=`echo "$h
 if test -z "$host"; then
   host=unknown
 fi
-canonical_host_type=$host
+canonical_host_type=$host_alias
 if test "$host" = unknown; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: configuring Octave for unknown system type
 " >&5
@@ -33819,7 +33819,12 @@ else
 fi
 	  done
 	  ;;
-	-[lLR]*)
+	-R*)
+	  ac_arg="-Wl,$ac_arg"
+	  shift
+	  set X $ac_arg "$@"
+	  ;;
+	-[lLR]*|-Wl*)
 	    ac_exists=false
   for ac_i in $ac_cv_f77_libs; do
     if test x"$ac_arg" = x"$ac_i"; then
