From 2926f8bc02e1030bb4ce032e7c3b534d904b4f77 Mon Sep 17 00:00:00 2001
From: Jaroslav Hajek <hajek@hajek.vzlu.local>
Date: Wed, 8 Sep 2010 10:28:42 +0200
Subject: [PATCH 1/2] save & restore LIBS in ax_blas_f77_func

---
 m4/ax_blas_f77_func.m4 |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/m4/ax_blas_f77_func.m4 b/m4/ax_blas_f77_func.m4
index ace48f5..3c96a1e 100644
--- a/m4/ax_blas_f77_func.m4
+++ b/m4/ax_blas_f77_func.m4
@@ -63,6 +63,7 @@ AC_REQUIRE([AX_BLAS])
 if test "$cross_compiling" = yes ; then
 	ifelse($3, ,$1,$3)
 elif test x"$ax_blas_ok" = xyes; then
+	save_ax_blas_f77_func_LIBS="$LIBS"
 	LIBS="$BLAS_LIBS $LIBS"
 	AC_LANG_PUSH(Fortran 77)
 # LSAME check (LOGICAL return values)
@@ -94,7 +95,7 @@ elif test x"$ax_blas_ok" = xyes; then
 	[ax_blas_isamax_fcall_ok=no])
 	AC_MSG_RESULT([$ax_blas_isamax_fcall_ok])
 # SDOT check (REAL return values)
-	AC_MSG_CHECKING([whether DDOT is called correctly from Fortran])
+	AC_MSG_CHECKING([whether SDOT is called correctly from Fortran])
 	AC_RUN_IFELSE(AC_LANG_PROGRAM(,[[
       real sdot,a(1),b(1),w
       external sdot
@@ -156,6 +157,7 @@ elif test x"$ax_blas_ok" = xyes; then
 		ax_blas_f77_func_ok=no;
 		$2
 	fi
+	LIBS="$save_ax_blas_f77_func_LIBS"
 fi
 
 ])dnl AX_BLAS_F77_FUNC
-- 
1.6.4.2

