diff --git a/config/pac.m4 b/config/pac.m4
index aa783333..e4d8c454 100644
--- a/config/pac.m4
+++ b/config/pac.m4
@@ -1056,9 +1056,9 @@ AC_ARG_WITH(blasdir,
[AC_HELP_STRING([--with-blasdir=
], [search for BLAS library in ])])
case $with_blasdir in
"") ;;
- *) if test -d $with_blasdir; then
+ *) if test -d $with_blasdir; then
BLAS_LIBDIR="-L$with_blasdir";
- fi ;;
+ fi ;;
esac
# Get fortran linker names of BLAS functions to check for.
#AC_FC_FUNC(sgemm)
@@ -1079,7 +1079,7 @@ if test "x$BLAS_LIBS" != x; then
fi
fi
-
+LIBS="$BLAS_LIBDIR $save_LIBS "
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
if test $pac_blas_ok = no; then
AC_LANG([C])
@@ -1173,10 +1173,8 @@ fi
# BLAS linked to by default? (happens on some supercomputers)
if test $pac_blas_ok = no; then
- save_LIBS="$LIBS"; LIBS=" $BLAS_LIBDIR $LIBS"
AC_TRY_LINK_FUNC(sgemm, [pac_blas_ok=yes], [BLAS_LIBS=""])
dnl AC_CHECK_FUNC(sgemm, [pac_blas_ok=yes])
- LIBS="$save_LIBS"
fi
# Generic BLAS library?
@@ -1199,6 +1197,7 @@ else
fi
])dnl PAC_BLAS
+
dnl @synopsis PAC_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl @synopsis ACX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
diff --git a/configure b/configure
index 21d17903..ed459b69 100755
--- a/configure
+++ b/configure
@@ -7643,7 +7643,7 @@ case $with_blasdir in
"") ;;
*) if test -d $with_blasdir; then
BLAS_LIBDIR="-L$with_blasdir";
- fi ;;
+ fi ;;
esac
# Get fortran linker names of BLAS functions to check for.
#AC_FC_FUNC(sgemm)
@@ -7681,7 +7681,7 @@ $as_echo "$pac_blas_ok" >&6; }
fi
fi
-
+LIBS="$BLAS_LIBDIR $save_LIBS "
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
if test $pac_blas_ok = no; then
ac_ext=c
@@ -8351,7 +8351,6 @@ fi
# BLAS linked to by default? (happens on some supercomputers)
if test $pac_blas_ok = no; then
- save_LIBS="$LIBS"; LIBS=" $BLAS_LIBDIR $LIBS"
cat > conftest.$ac_ext <<_ACEOF
program main
call sgemm
@@ -8364,7 +8363,6 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LIBS="$save_LIBS"
fi
# Generic BLAS library?