$NetBSD: patch-aa,v 1.3 2001/03/30 00:12:02 jtb Exp $

--- configure.orig	Thu Jan 25 10:00:31 2001
+++ configure
@@ -543,6 +543,11 @@
 #define LINUX 1
 EOF
  system='Linux' ;;
+	NetBSD:*)
+		cat >> confdefs.h <<\EOF
+#define NETBSD 1
+EOF
+ system='NetBSD' ;;
 	HP-UX:*)
 		cat >> confdefs.h <<\EOF
 #define HPUX 1
@@ -2091,7 +2096,7 @@
 
   # It would also be nice to do this for all -L options, not just this one.
   if test -n "$x_libraries"; then
-    X_LIBS="$X_LIBS -L$x_libraries"
+    X_LIBS="$X_LIBS -R$x_libraries -L$x_libraries"
     # For Solaris; some versions of Sun CC require a space after -R and
     # others require no space.  Words are not sufficient . . . .
     case "`(uname -sr) 2>/dev/null`" in
@@ -2656,7 +2661,7 @@
 
   # Check for libraries that X11R6 Xt/Xaw programs need.
   ac_save_LDFLAGS="$LDFLAGS"
-  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -R$x_libraries -L$x_libraries"
   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
   # check for ICE first), but we must link in the order -lSM -lICE or
   # we get undefined symbols.  So assume we have SM if we have ICE.
@@ -3573,8 +3578,8 @@
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
-FLIBS=''
-FFLAGS='-O'
+# FLIBS=''
+# FFLAGS='-O'
 R8FLAG='-r8'
 TCOMPLEX_O='Tcomplex.o'
 VRANF_O=''
@@ -3629,6 +3634,8 @@
 		;;
 	OSF1)
 		FLIBS='-lfor -lots'
+		;;
+	NetBSD)
 		;;
 	Linux|*)
 		FLIBS='-lg2c -ldl'
