Mercurial > hg > octave-avbm
comparison configure.ac @ 15329:719ffb2f35a6
Fix Octave builds with SuiteSparse >=4.0 (bug #37031)
* configure.ac: Call OCTAVE_UMFPACK_NEED_SUITESPARSE_TIME to check if
UMFPACK needs SuiteSparse_time function. If it does, use AC_SEARCH_LIBS
to find a possible library.
* m4/acinclude.m4: Add new macro OCTAVE_UMFPACK_NEED_SUITESPARSE_TIME.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 07 Sep 2012 17:05:12 -0700 |
parents | c42bf5cadb60 |
children | dc39c1d84c5b |
comparison
equal
deleted
inserted
replaced
15328:efbc896c1ecc | 15329:719ffb2f35a6 |
---|---|
1318 UMFPACK_LIBS="$UMFPACK_LIBS -lcblas" | 1318 UMFPACK_LIBS="$UMFPACK_LIBS -lcblas" |
1319 fi | 1319 fi |
1320 LIBS="$save_LIBS" | 1320 LIBS="$save_LIBS" |
1321 fi | 1321 fi |
1322 | 1322 |
1323 ## Test features of the installed UMFPACK library | |
1324 | |
1323 if test -n "$UMFPACK_LIBS"; then | 1325 if test -n "$UMFPACK_LIBS"; then |
1326 ## SuiteSparse >= 4.0 needs additional link library for SuiteSparse_time() | |
1324 save_LIBS="$LIBS"; | 1327 save_LIBS="$LIBS"; |
1325 LIBS="$UMFPACK_LIBS $AMD_LIBS $BLAS_LIBS $FLIBS $LIBS" | 1328 LIBS="$UMFPACK_LIBS $FLIBS $LIBS" |
1326 OCTAVE_UMFPACK_SEPARATE_SPLIT | 1329 xtra_libs= |
1330 OCTAVE_UMFPACK_NEED_SUITESPARSE_TIME | |
1331 if test "$octave_cv_umfpack_need_suitesparse_time" = yes; then | |
1332 AC_CHECK_LIB([rt], [clock_gettime], [xtra_libs="-lrt"], [xtra_libs=]) | |
1333 ## FIXME: This library list is only accurate for Linux, Mac OS X. | |
1334 ## Possibly need other library names for MinGW, Cygwin. | |
1335 AC_SEARCH_LIBS([SuiteSparse_time], | |
1336 [suitesparseconfig SuiteSparse], | |
1337 [], [], [$xtra_libs]) | |
1338 case "$ac_cv_search_SuiteSparse_time" in | |
1339 -l*) | |
1340 UMFPACK_LIBS="$UMFPACK_LIBS $ac_cv_search_SuiteSparse_time" | |
1341 ;; | |
1342 no) | |
1343 UMFPACK_LIBS= | |
1344 AC_MSG_WARN([UMFPACK library found but is missing SuiteSparse_time functionality.]) | |
1345 AC_MSG_WARN([UMFPACK library will be disabled.]) | |
1346 ;; | |
1347 esac | |
1348 fi | |
1327 LIBS="$save_LIBS" | 1349 LIBS="$save_LIBS" |
1350 | |
1351 ## Check for UMFPACK separately split complex matrix and RHS. | |
1352 if test -n "$UMFPACK_LIBS"; then | |
1353 save_LIBS="$LIBS"; | |
1354 LIBS="$UMFPACK_LIBS $CHOLMOD_LIBS $AMD_LIBS $COLAMD_LIBS $LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS $xtra_libs" | |
1355 OCTAVE_UMFPACK_SEPARATE_SPLIT | |
1356 LIBS="$save_LIBS" | |
1357 fi | |
1328 fi | 1358 fi |
1329 | 1359 |
1330 ### Check for ARPACK library. | 1360 ### Check for ARPACK library. |
1331 | 1361 |
1332 save_LIBS="$LIBS" | 1362 save_LIBS="$LIBS" |