$NetBSD: patch-aa,v 1.12 2012/05/30 09:13:16 jperkin Exp $

Extend which ports we accept to deal with.

--- configure.orig	2009-12-31 12:41:51.000000000 +0000
+++ configure
@@ -12167,7 +12167,7 @@ case "$host" in
 	TARGET=FRV; TARGETDIR=frv
 	;;
 
-  hppa*-*-linux* | parisc*-*-linux*)
+  hppa*-*-linux* | hppa*-*-netbsd* | parisc*-*-linux*)
 	TARGET=PA_LINUX; TARGETDIR=pa
 	;;
   hppa*64-*-hpux*)
@@ -12210,7 +12210,7 @@ case "$host" in
   mips-sgi-irix5.* | mips-sgi-irix6.*)
 	TARGET=MIPS; TARGETDIR=mips
 	;;
-  mips*-*-linux*)
+  mips*-*-linux* | mips*-*-netbsd*)
 	# Support 128-bit long double for NewABI.
 	HAVE_LONG_DOUBLE='defined(__mips64)'
 	TARGET=MIPS; TARGETDIR=mips
@@ -12228,7 +12228,7 @@ case "$host" in
   powerpc-*-aix* | rs6000-*-aix*)
 	TARGET=POWERPC_AIX; TARGETDIR=powerpc
 	;;
-  powerpc-*-freebsd*)
+  powerpc-*-freebsd* | powerpc-*-netbsd*)
 	TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
 	;;
   powerpc*-*-rtems*)
@@ -12239,7 +12239,7 @@ case "$host" in
 	TARGET=S390; TARGETDIR=s390
 	;;
 
-  sh-*-* | sh[34]*-*-*)
+  sh-*-* | shle-*-* | sh[34]*-*-*)
 	TARGET=SH; TARGETDIR=sh
 	;;
   sh64-*-* | sh5*-*-*)
@@ -14510,6 +14510,31 @@
      ;;
 esac
 
+if test x$TARGET = xX86_64; then
+    { $as_echo "$as_me:$LINENO: checking assembler supports unwind section type" >&5
+$as_echo_n "checking assembler supports unwind section type... " >&6; }
+if test "${libffi_cv_as_x86_64_unwind_section_type+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+	libffi_cv_as_x86_64_unwind_section_type=yes
+	echo '.section .eh_frame,"a",@unwind' > conftest.s
+	if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+	    libffi_cv_as_x86_64_unwind_section_type=no
+	fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $libffi_cv_as_x86_64_unwind_section_type" >&5
+$as_echo "$libffi_cv_as_x86_64_unwind_section_type" >&6; }
+    if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1
+_ACEOF
+
+    fi
+fi
+
 { $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
 $as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
 if test "${libffi_cv_ro_eh_frame+set}" = set; then
