Mercurial > hg > octave-lojdl
changeset 9570:1ab56c73ec7c
use OCTAVE_CHECK_LIBRARY to check for qrupdate library
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 26 Aug 2009 14:59:37 -0400 |
parents | 86787a560712 |
children | 263a8ed419b0 |
files | ChangeLog Makeconf.in configure.in octave-bug.cc.in octave-bug.in src/ChangeLog src/oct-conf.h.in src/toplev.cc |
diffstat | 8 files changed, 41 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-08-26 John W. Eaton <jwe@octave.org> + + * configure.in: Use OCTAVE_CHECK_LIBRARY to check for qrupdate. + * octave-bug.in, octave-bug.cc.in: Substitute QRUPDATE_CPPFLAGS and + QRUPDATE_LDFLAGS. + * Makeconf.in (QRUPDATE_CPPFLAGS, QRUPDATE_LDFLAGS): New variables. + (do-subst-config-vals): Substitute them. + 2009-08-26 John W. Eaton <jwe@octave.org> * octave-bug.in: Correct substitutions.
--- a/Makeconf.in +++ b/Makeconf.in @@ -289,7 +289,11 @@ UMFPACK_LIBS = @UMFPACK_LIBS@ OPENGL_LIBS = @OPENGL_LIBS@ + +QRUPDATE_CPPFLAGS = @QRUPDATE_CPPFLAGS@ +QRUPDATE_LDFLAGS = @QRUPDATE_LDFLAGS@ QRUPDATE_LIBS = @QRUPDATE_LIBS@ + READLINE_LIBS = @READLINE_LIBS@ TERM_LIBS = @TERM_LIBS@ @@ -651,6 +655,8 @@ -e "s|%OCTAVE_CONF_QHULL_CPPFLAGS%|\"${QHULL_CPPFLAGSS}\"|" \ -e "s|%OCTAVE_CONF_QHULL_LDFLAGS%|\"${QHULL_LDFLAGSS}\"|" \ -e "s|%OCTAVE_CONF_QHULL_LIBS%|\"${QHULL_LIBS}\"|" \ + -e "s|%OCTAVE_CONF_QRUPDATE_CPPFLAGS%|\"${QRUPDATE_CPPFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_QRUPDATE_LDFLAGS%|\"${QRUPDATE_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_QRUPDATE_LIBS%|\"${QRUPDATE_LIBS}\"|" \ -e "s|%OCTAVE_CONF_RANLIB%|\"${RANLIB}\"|" \ -e "s|%OCTAVE_CONF_RDYNAMIC_FLAG%|\"${RDYNAMIC_FLAG}\"|" \
--- a/configure.in +++ b/configure.in @@ -813,33 +813,16 @@ AC_MSG_WARN($warn_blas_f77_incompatible) fi -QRUPDATE_LIBS= -AC_SUBST(QRUPDATE_LIBS) - # Check for the qrupdate library -AC_ARG_WITH(qrupdate, - [AS_HELP_STRING([--without-qrupdate], - [don't use qrupdate, disable QR & Cholesky updating functions])], - with_qrupdate=$withval, with_qrupdate=yes) -warn_qrupdate="qrupdate not found. The QR & Cholesky updating functions will be slow." -if test "$with_qrupdate" = yes; then - with_qrupdate=no - if $have_fortran_compiler; then - AC_F77_FUNC(sqr1up) - elif $have_f2c; then - sqr1up=sqr1up_ - fi - AC_CHECK_LIB(qrupdate, $sqr1up, - [QRUPDATE_LIBS="-lqrupdate"; with_qrupdate=yes], [], [$BLAS_LIBS $FLIBS]) - if test "$with_qrupdate" = yes; then - AC_DEFINE(HAVE_QRUPDATE, 1, [Define if the qrupdate library is used.]) - warn_qrupdate= - fi -fi -if test -n "$warn_qrupdate"; then - AC_MSG_WARN($warn_qrupdate) -fi +save_LIBS="$LIBS" +LIBS="$BLAS_LIBS $FLIBS $LIBS" +OCTAVE_CHECK_LIBRARY(qrupdate, qrupdate, + [qrupdate not found. The QR & Cholesky updating functions will be slow.], + [], + [F77_FUNC(sqr1up,SQR1UP)], + [], [don't use qrupdate, disable QR & Cholesky updating functions]) +LIBS="$save_LIBS" # Check for AMD library
--- a/octave-bug.cc.in +++ b/octave-bug.cc.in @@ -147,6 +147,8 @@ vars["QHULL_CPPFLAGS"] = %OCTAVE_CONF_QHULL_CPPFLAGS%; vars["QHULL_LDFLAGS"] = %OCTAVE_CONF_QHULL_LDFLAGS%; vars["QHULL_LIBS"] = %OCTAVE_CONF_QHULL_LIBS%; + vars["QRUPDATE_CPPFLAGS"] = %OCTAVE_CONF_QRUPDATE_CPPFLAGS%; + vars["QRUPDATE_LDFLAGS"] = %OCTAVE_CONF_QRUPDATE_LDFLAGS%; vars["QRUPDATE_LIBS"] = %OCTAVE_CONF_QRUPDATE_LIBS%; vars["READLINE_LIBS"] = %OCTAVE_CONF_READLINE_LIBS%; vars["REGEX_LIBS"] = %OCTAVE_CONF_REGEX_LIBS%;
--- a/octave-bug.in +++ b/octave-bug.in @@ -99,6 +99,8 @@ QHULL_CPPFLAGS=%OCTAVE_CONF_QHULL_CPPFLAGS% QHULL_LDFLAGS=%OCTAVE_CONF_QHULL_LDFLAGS% QHULL_LIBS=%OCTAVE_CONF_QHULL_LIBS% +QRUPDATE_CPPFLAGS=%OCTAVE_CONF_QRUPDATE_CPPFLAGS% +QRUPDATE_LDFLAGS=%OCTAVE_CONF_QRUPDATE_LDFLAGS% QRUPDATE_LIBS=%OCTAVE_CONF_QRUPDATE_LIBS% READLINE_LIBS=%OCTAVE_CONF_READLINE_LIBS% REGEX_LIBS=%OCTAVE_CONF_REGEX_LIBS%
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-08-26 John W. Eaton <jwe@octave.org> + + * oct-conf.h.in: New defines for QRUPDATE_CPPFLAGS and QRUPDATE_LDFLAGS. + * toplev.cc (octave_config_info): Include them in the list. + 2009-08-26 John W. Eaton <jwe@octave.org> * oct-conf.h.in: New defines for ARPACK_CPPFLAGS and ARPACK_LDFLAGS.
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -413,6 +413,14 @@ #define OCTAVE_CONF_QHULL_LIBS %OCTAVE_CONF_QHULL_LIBS% #endif +#ifndef OCTAVE_CONF_QRUPDATE_CPPFLAGS +#define OCTAVE_CONF_QRUPDATE_CPPFLAGS %OCTAVE_CONF_QRUPDATE_CPPFLAGS% +#endif + +#ifndef OCTAVE_CONF_QRUPDATE_LDFLAGS +#define OCTAVE_CONF_QRUPDATE_LDFLAGS %OCTAVE_CONF_QRUPDATE_LDFLAGS% +#endif + #ifndef OCTAVE_CONF_QRUPDATE_LIBS #define OCTAVE_CONF_QRUPDATE_LIBS %OCTAVE_CONF_QRUPDATE_LIBS% #endif
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -1284,6 +1284,8 @@ { false, "QHULL_CPPFLAGS", OCTAVE_CONF_QHULL_CPPFLAGS }, { false, "QHULL_LDFLAGS", OCTAVE_CONF_QHULL_LDFLAGS }, { false, "QHULL_LIBS", OCTAVE_CONF_QHULL_LIBS }, + { false, "QRUPDATE_CPPFLAGS", OCTAVE_CONF_QRUPDATE_CPPFLAGS }, + { false, "QRUPDATE_LDFLAGS", OCTAVE_CONF_QRUPDATE_LDFLAGS }, { false, "QRUPDATE_LIBS", OCTAVE_CONF_QRUPDATE_LIBS }, { false, "RANLIB", OCTAVE_CONF_RANLIB }, { false, "RDYNAMIC_FLAG", OCTAVE_CONF_RDYNAMIC_FLAG },