$NetBSD: patch-ab,v 1.3 2004/01/24 14:01:47 xtraeme Exp $

--- configure.orig	2004-01-24 14:14:38.000000000 +0100
+++ configure	2004-01-24 14:18:23.000000000 +0100
@@ -166,13 +166,6 @@
 echo "  libraries $xdir/lib"
 echo
 
-if [ $xdir != "/usr" ]; then
-    cflags="$cflags -I$xdir/include"
-    ldflags="$ldflags -L$xdir/lib"
-    rpath="$rpath:$xdir/lib"
-fi
-
-ldflags="$ldflags"
 targets="$targets rdesktop"
 
 #withoutopenssl not currently supported
@@ -205,12 +198,6 @@
     
     	echo "CRYPTOBJ    =" >>Makeconf
     
-    	if [ $ssldir != "/usr" ]; then
-    	    cflags="$cflags -I$ssldir/include"
-    	    ldflags="$ldflags -L$ssldir/lib"
-    	    rpath="$rpath:$ssldir/lib"
-    	fi
-    
     	cflags="$cflags -DWITH_OPENSSL"
     	ldflags="$ldflags -lcrypto"
     fi
@@ -259,7 +246,7 @@
 
 # Check for OSS sound support
 
-if [ -f /usr/include/sys/soundcard.h ]; then
+if [ -f /usr/include/sys/soundcard.h -o -f /usr/include/soundcard.h ]; then
     echo Sound support enabled: Open Sound System
     echo
     echo "SOUNDOBJ    = rdpsnd.o rdpsnd_oss.o" >>Makeconf
@@ -283,10 +270,7 @@
 
 case `uname -s` in
   SunOS)
-    ldflags="$ldflags -lsocket -lnsl -R$rpath"
-    ;;
-  OSF1)
-    ldflags="$ldflags -Wl,-rpath,$rpath"
+    ldflags="$ldflags -lsocket -lnsl"
     ;;
   HP-UX)
     cflags="$cflags -D_XOPEN_SOURCE_EXTENDED"
@@ -294,8 +278,8 @@
 esac
 
 
-echo "CFLAGS      = $cflags" >>Makeconf
-echo "LDFLAGS     = $ldflags" >>Makeconf
+echo "CFLAGS      = $CFLAGS $cflags" >>Makeconf
+echo "LDFLAGS     = $LDFLAGS $ldflags" >>Makeconf
 echo "TARGETS     = $targets" >>Makeconf
 
 echo "configure complete - now run make"
