[Pkg-octave-devel] Re: [prudhomm@debian.org: [Pkg-scicomp-devel] suitesparse and octave]

David Bateman adb014 at gmail.com
Fri Jan 5 20:51:58 CET 2007


Rafael Laboissiere wrote:
> * David Bateman <adb014 at gmail.com> [2007-01-04 22:21]:
> 
>> Ok, my fault.. Although it currently checks in sparsesuite, as the new
>> name is suitesparse that is in fact where it should check. This patch
>> should fix that and address your problem..
> 
> Thanks for that.  Also, forget my question to you in my last post in this
> thread.
> 
> As regards your patch:
> 
>> *** ./liboctave/oct-sparse.h.orig21	2007-01-04 22:19:32.188201467 +0100
>> --- ./liboctave/oct-sparse.h	2007-01-04 22:19:14.618136917 +0100
>> ***************
>> *** 32,38 ****
>>   extern "C" {
>>   #endif
>>   
>> ! #if defined (HAVE_SPARSESUITE_UMFPACK_H)
>>   #include <sparsesuite/umfpack.h>
>>   #elif defined (HAVE_UFSPARSE_UMFPACK_H)
>>   #include <ufsparse/umfpack.h>
>> --- 32,38 ----
>>   extern "C" {
>>   #endif
>>   
>> ! #if defined (HAVE_SUITESPARSE_UMFPACK_H)
>>   #include <sparsesuite/umfpack.h>
>>   #elif defined (HAVE_UFSPARSE_UMFPACK_H)
>>   #include <ufsparse/umfpack.h>
>> [snip]
> 
> Shouldn't the above read "#include <suitesparse/umfpack.h>" intead of
> "#include <sparsesuite/umfpack.h>"?
> 
> [Sorry, I am really confused by this naming issue.]
> 

Grrr... I should be more careful with the search and replaces... Yes you
are right that is a mistake as well. Updated patch attached..

D.
-------------- next part --------------
*** ./liboctave/oct-sparse.h.orig21	2007-01-04 22:19:32.188201467 +0100
--- ./liboctave/oct-sparse.h	2007-01-05 20:50:06.245857826 +0100
***************
*** 32,39 ****
  extern "C" {
  #endif
  
! #if defined (HAVE_SPARSESUITE_UMFPACK_H)
! #include <sparsesuite/umfpack.h>
  #elif defined (HAVE_UFSPARSE_UMFPACK_H)
  #include <ufsparse/umfpack.h>
  #elif defined (HAVE_UMFPACK_UMFPACK_H)
--- 32,39 ----
  extern "C" {
  #endif
  
! #if defined (HAVE_SUITESPARSE_UMFPACK_H)
! #include <suitesparse/umfpack.h>
  #elif defined (HAVE_UFSPARSE_UMFPACK_H)
  #include <ufsparse/umfpack.h>
  #elif defined (HAVE_UMFPACK_UMFPACK_H)
***************
*** 42,49 ****
  #include <umfpack.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_COLAMD_H)
! #include <sparsesuite/colamd.h>
  #elif defined (HAVE_UFSPARSE_COLAMD_H)
  #include <ufsparse/colamd.h>
  #elif defined (HAVE_COLAMD_COLAMD_H)
--- 42,49 ----
  #include <umfpack.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_COLAMD_H)
! #include <suitesparse/colamd.h>
  #elif defined (HAVE_UFSPARSE_COLAMD_H)
  #include <ufsparse/colamd.h>
  #elif defined (HAVE_COLAMD_COLAMD_H)
***************
*** 52,59 ****
  #include <colamd.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CCOLAMD_H)
! #include <sparsesuite/ccolamd.h>
  #elif defined (HAVE_UFSPARSE_CCOLAMD_H)
  #include <ufsparse/ccolamd.h>
  #elif defined (HAVE_CCOLAMD_CCOLAMD_H)
--- 52,59 ----
  #include <colamd.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CCOLAMD_H)
! #include <suitesparse/ccolamd.h>
  #elif defined (HAVE_UFSPARSE_CCOLAMD_H)
  #include <ufsparse/ccolamd.h>
  #elif defined (HAVE_CCOLAMD_CCOLAMD_H)
***************
*** 62,69 ****
  #include <ccolamd.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_METIS_H)
! #include <sparsesuite/metis.h>
  #elif defined (HAVE_UFSPARSE_METIS_H)
  #include <ufsparse/metis.h>
  #elif defined (HAVE_METIS_METIS_H)
--- 62,69 ----
  #include <ccolamd.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_METIS_H)
! #include <suitesparse/metis.h>
  #elif defined (HAVE_UFSPARSE_METIS_H)
  #include <ufsparse/metis.h>
  #elif defined (HAVE_METIS_METIS_H)
***************
*** 72,79 ****
  #include <metis.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CHOLMOD_H)
! #include <sparsesuite/cholmod.h>
  #elif defined (HAVE_UFSPARSE_CHOLMOD_H)
  #include <ufsparse/cholmod.h>
  #elif defined (HAVE_UMFPACK_CHOLMOD_H)
--- 72,79 ----
  #include <metis.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CHOLMOD_H)
! #include <suitesparse/cholmod.h>
  #elif defined (HAVE_UFSPARSE_CHOLMOD_H)
  #include <ufsparse/cholmod.h>
  #elif defined (HAVE_UMFPACK_CHOLMOD_H)
***************
*** 82,89 ****
  #include <cholmod.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CS_H)
! #include <sparsesuite/cs.h>
  #elif defined (HAVE_UFSPARSE_CS_H)
  #include <ufsparse/cs.h>
  #elif defined (HAVE_CXSPARSE_CS_H)
--- 82,89 ----
  #include <cholmod.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CS_H)
! #include <suitesparse/cs.h>
  #elif defined (HAVE_UFSPARSE_CS_H)
  #include <ufsparse/cs.h>
  #elif defined (HAVE_CXSPARSE_CS_H)
***************
*** 92,98 ****
  #include <cs.h>
  #endif
  
! #if (defined (HAVE_SPARSESUITE_CHOLMOD_H) \
       || defined (HAVE_UFSPARSE_CHOLMOD_H) \
       || defined (HAVE_UMFPACK_CHOLMOD_H) \
       || defined (HAVE_CHOLMOD_H))
--- 92,98 ----
  #include <cs.h>
  #endif
  
! #if (defined (HAVE_SUITESPARSE_CHOLMOD_H) \
       || defined (HAVE_UFSPARSE_CHOLMOD_H) \
       || defined (HAVE_UMFPACK_CHOLMOD_H) \
       || defined (HAVE_CHOLMOD_H))
*** ./configure.in.orig21	2007-01-04 22:18:28.208607812 +0100
--- ./configure.in	2007-01-04 22:18:50.917398770 +0100
***************
*** 842,848 ****
  warn_umfpack="UMFPACK not found.  This will result in some lack of functionality for sparse matrices."
  if test "$with_umfpack" = yes && test "$with_amd" = yes; then
    with_umfpack=no
!   AC_CHECK_HEADERS([sparsesuite/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], [
      AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [
        UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [
          ## Invalidate the cache.
--- 842,848 ----
  warn_umfpack="UMFPACK not found.  This will result in some lack of functionality for sparse matrices."
  if test "$with_umfpack" = yes && test "$with_amd" = yes; then
    with_umfpack=no
!   AC_CHECK_HEADERS([suitesparse/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], [
      AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [
        UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [
          ## Invalidate the cache.
***************
*** 883,889 ****
  warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_colamd" = yes; then
    with_colamd=no
!   AC_CHECK_HEADERS([sparsesuite/colamd.h ufsparse/colamd.h colamd/colamd.h colamd.h], [
      AC_CHECK_LIB(colamd, colamd, [COLAMD_LIBS="-lcolamd"; with_colamd=yes])
      if test "$with_colamd" = yes; then
        AC_DEFINE(HAVE_COLAMD, 1, [Define if the COLAMD library is used.])
--- 883,889 ----
  warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_colamd" = yes; then
    with_colamd=no
!   AC_CHECK_HEADERS([suitesparse/colamd.h ufsparse/colamd.h colamd/colamd.h colamd.h], [
      AC_CHECK_LIB(colamd, colamd, [COLAMD_LIBS="-lcolamd"; with_colamd=yes])
      if test "$with_colamd" = yes; then
        AC_DEFINE(HAVE_COLAMD, 1, [Define if the COLAMD library is used.])
***************
*** 909,915 ****
  warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_ccolamd" = yes; then
    with_ccolamd=no
!   AC_CHECK_HEADERS([sparsesuite/ccolamd.h ufsparse/ccolamd.h ccolamd/ccolamd.h ccolamd.h], [
      AC_CHECK_LIB(ccolamd, ccolamd, [CCOLAMD_LIBS="-lccolamd"; with_ccolamd=yes])
      if test "$with_ccolamd" = yes; then
        AC_DEFINE(HAVE_CCOLAMD, 1, [Define if the CCOLAMD library is used.])
--- 909,915 ----
  warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_ccolamd" = yes; then
    with_ccolamd=no
!   AC_CHECK_HEADERS([suitesparse/ccolamd.h ufsparse/ccolamd.h ccolamd/ccolamd.h ccolamd.h], [
      AC_CHECK_LIB(ccolamd, ccolamd, [CCOLAMD_LIBS="-lccolamd"; with_ccolamd=yes])
      if test "$with_ccolamd" = yes; then
        AC_DEFINE(HAVE_CCOLAMD, 1, [Define if the CCOLAMD library is used.])
***************
*** 933,940 ****
  if test "$with_cholmod" = yes && test "$with_colamd" = yes &&
  	test "$with_ccolamd" = yes && test "$with_amd" = yes; then
    with_cholmod=no
!   AC_CHECK_HEADERS([sparsesuite/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], [
!     AC_CHECK_HEADERS([sparsesuite/metis.h ufsparse/metis.h metis/metis.h metis.h], [
        AC_CHECK_LIB(metis, METIS_NodeND, with_metis=yes, with_metis=no)
        break],
        with_metis=no)
--- 933,940 ----
  if test "$with_cholmod" = yes && test "$with_colamd" = yes &&
  	test "$with_ccolamd" = yes && test "$with_amd" = yes; then
    with_cholmod=no
!   AC_CHECK_HEADERS([suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], [
!     AC_CHECK_HEADERS([suitesparse/metis.h ufsparse/metis.h metis/metis.h metis.h], [
        AC_CHECK_LIB(metis, METIS_NodeND, with_metis=yes, with_metis=no)
        break],
        with_metis=no)
***************
*** 980,986 ****
  warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_cxsparse" = yes; then
    with_cxsparse=no
!   AC_CHECK_HEADERS([sparsesuite/cs.h ufsparse/cs.h cxsparse/cs.h cs.h], [
      AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse"; with_cxsparse=yes])
      if test "$with_cxsparse" = yes; then
        AC_DEFINE(HAVE_CXSPARSE, 1, [Define if the CXSparse library is used.])
--- 980,986 ----
  warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices."
  if test "$with_cxsparse" = yes; then
    with_cxsparse=no
!   AC_CHECK_HEADERS([suitesparse/cs.h ufsparse/cs.h cxsparse/cs.h cs.h], [
      AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse"; with_cxsparse=yes])
      if test "$with_cxsparse" = yes; then
        AC_DEFINE(HAVE_CXSPARSE, 1, [Define if the CXSparse library is used.])


More information about the Pkg-octave-devel mailing list