diff configure.in @ 9568:d3fccc4c4b9e

use OCTAVE_CHECK_LIBRARY to check for ARPACK
author John W. Eaton <jwe@octave.org>
date Wed, 26 Aug 2009 13:15:40 -0400
parents 1d51ab34b509
children 1ab56c73ec7c
line wrap: on
line diff
--- a/configure.in	Wed Aug 26 11:44:01 2009 -0400
+++ b/configure.in	Wed Aug 26 13:15:40 2009 -0400
@@ -936,26 +936,13 @@
 
 AC_SUBST(TEXINFO_UMFPACK)
 
-ARPACK_LIBS=
-AC_SUBST(ARPACK_LIBS)
-
-AC_ARG_WITH(arpack,
-  [AS_HELP_STRING([--without-arpack],
-     [don't use ARPACK library, disable some sparse functionality])],
-  with_arpack=$withval, with_arpack=yes)
-
-warn_arpack="arpack not found. This will result in a lack of the eigs function."
-if test "$with_arpack" = yes; then
-  with_arpack=no
-  AC_CHECK_LIB(arpack, F77_FUNC(dseupd,DSEUPD), [ARPACK_LIBS="-larpack"; with_arpack=yes], , $LAPACK_LIBS $FLIBS)
-  if test "$with_arpack" = yes; then
-    AC_DEFINE(HAVE_ARPACK, 1, [Define if the ARPACK library is used.])
-    warn_arpack=
-  fi
-fi
-if test -n "$warn_arpack"; then
-  AC_MSG_WARN($warn_arpack)
-fi
+save_LIBS="$LIBS"
+LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
+OCTAVE_CHECK_LIBRARY(arpack, ARPACK,
+  [arpack not found.  The eigs function will be disabled.],
+  [],
+  [F77_FUNC(dseupd,DSEUPD)],
+  [], [don't use the ARPACK library, disable eigs function])
 
 ### Handle shared library options.