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

David Bateman adb014 at gmail.com
Thu Jan 4 22:21:33 CET 2007


Rafael Laboissiere wrote:
> * David Bateman <David.Bateman at motorola.com> [2007-01-02 10:22]:
> 
>> I've already added to the cvs of octave an autoconf test for the
>> sparsesuite headers in the location /usr/include/sparsesuite and so this
>> is fine at least from the 2.9.10 release when it is released...
> 
> Thanks for the info. 
> 
> There will probably be a problem with the Debian package, though, since the
> header files are installed in /usr/include/suitesparse instead of
> /usr/include/sparsesuite.  I am a little bit confused by that, because it is
> not clear to me whether the choice of the directory name is upstream
> authors' choice or the Debian pacakger's choice.  Christophe: could you
> please clarify this issue?
>  

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..

D.

-------------- next part --------------
*** ./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>
***************
*** 42,48 ****
  #include <umfpack.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_COLAMD_H)
  #include <sparsesuite/colamd.h>
  #elif defined (HAVE_UFSPARSE_COLAMD_H)
  #include <ufsparse/colamd.h>
--- 42,48 ----
  #include <umfpack.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_COLAMD_H)
  #include <sparsesuite/colamd.h>
  #elif defined (HAVE_UFSPARSE_COLAMD_H)
  #include <ufsparse/colamd.h>
***************
*** 52,58 ****
  #include <colamd.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CCOLAMD_H)
  #include <sparsesuite/ccolamd.h>
  #elif defined (HAVE_UFSPARSE_CCOLAMD_H)
  #include <ufsparse/ccolamd.h>
--- 52,58 ----
  #include <colamd.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CCOLAMD_H)
  #include <sparsesuite/ccolamd.h>
  #elif defined (HAVE_UFSPARSE_CCOLAMD_H)
  #include <ufsparse/ccolamd.h>
***************
*** 62,68 ****
  #include <ccolamd.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_METIS_H)
  #include <sparsesuite/metis.h>
  #elif defined (HAVE_UFSPARSE_METIS_H)
  #include <ufsparse/metis.h>
--- 62,68 ----
  #include <ccolamd.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_METIS_H)
  #include <sparsesuite/metis.h>
  #elif defined (HAVE_UFSPARSE_METIS_H)
  #include <ufsparse/metis.h>
***************
*** 72,78 ****
  #include <metis.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CHOLMOD_H)
  #include <sparsesuite/cholmod.h>
  #elif defined (HAVE_UFSPARSE_CHOLMOD_H)
  #include <ufsparse/cholmod.h>
--- 72,78 ----
  #include <metis.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CHOLMOD_H)
  #include <sparsesuite/cholmod.h>
  #elif defined (HAVE_UFSPARSE_CHOLMOD_H)
  #include <ufsparse/cholmod.h>
***************
*** 82,88 ****
  #include <cholmod.h>
  #endif
  
! #if defined (HAVE_SPARSESUITE_CS_H)
  #include <sparsesuite/cs.h>
  #elif defined (HAVE_UFSPARSE_CS_H)
  #include <ufsparse/cs.h>
--- 82,88 ----
  #include <cholmod.h>
  #endif
  
! #if defined (HAVE_SUITESPARSE_CS_H)
  #include <sparsesuite/cs.h>
  #elif defined (HAVE_UFSPARSE_CS_H)
  #include <ufsparse/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