$NetBSD: patch-ab,v 1.17 2004/02/25 19:11:43 drochner Exp $

--- configure.orig	2003-03-18 15:19:12.000000000 +0100
+++ configure	2004-02-25 20:04:08.000000000 +0100
@@ -822,6 +822,7 @@
       sparc*-*-netbsd*)	machine=sparc ;;
       vax-*-netbsd*)	machine=vax ;;
       arm-*-netbsd*)	machine=arm ;;
+      x86_64-*-netbsd*)	machine=amd64 ;;
     esac
   ;;
 
@@ -9124,6 +9125,22 @@
 fi
 
 
+# NETBSD: NetBSD's newer run-time linker fix.
+if test $opsys = netbsd; then
+  if test -f /usr/lib/crti.o; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_NETBSD_CRTI 1
+EOF
+
+  fi
+  if test -f /usr/lib/crtn.o; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_NETBSD_CRTN 1
+EOF
+
+  fi
+fi
+
 # Set up the CFLAGS for real compilation, so we can substitute it.
 CFLAGS="$REAL_CFLAGS"
 CPPFLAGS="$REAL_CPPFLAGS"
