$NetBSD: patch-an,v 1.2 2009/12/30 12:26:55 moubctez Exp $

--- configure.orig	2009-05-30 05:36:32.000000000 +0000
+++ configure
@@ -2238,7 +2238,7 @@ fi
 	    SHLIB_SUFFIX=".so"
 	    LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
 	    CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	    LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+	    LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 	    if test "${GRASS_THREADS}" = "1" ; then
 		# The -pthread needs to go in the CFLAGS, not LIBS
 		LIBS=`echo $LIBS | sed s/-pthread//`
@@ -12953,6 +12953,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char dnrm2_();
 
+int MAIN__() { return 0; }
+
 int main() {
 dnrm2_()
 ; return 0; }
@@ -13082,6 +13084,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char sgemm_();
 
+int MAIN__() { return 0; }
+
 int main() {
 sgemm_()
 ; return 0; }
@@ -13267,6 +13271,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char sgemm_();
 
+int MAIN__() { return 0; }
+
 int main() {
 sgemm_()
 ; return 0; }
@@ -13564,6 +13570,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char dsegv_();
 
+int MAIN__() { return 0; }
+
 int main() {
 
 /* The GNU C library defines this for functions which it implements
@@ -13617,6 +13625,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char desgv_();
 
+int MAIN__() { return 0; }
+
 int main() {
 desgv_()
 ; return 0; }
@@ -13666,6 +13676,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char dgesv_();
 
+int MAIN__() { return 0; }
+
 int main() {
 dgesv_()
 ; return 0; }
@@ -13702,6 +13714,8 @@ cat > conftest.$ac_ext <<EOF
     builtin and then its argument prototype would still apply.  */
 char dgesv_();
 
+int MAIN__() { return 0; }
+
 int main() {
 dgesv_()
 ; return 0; }
