~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to config/acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-03-23 11:14:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110323111426-cjvhey7lxt6077ty
Tags: 5.93-1
* New upstream release (minor changes):
  - some extra warning message deleted in heap_allocator
  - graphic output with mayavi2 fixed
  - add doc refman in .info and .pdf format

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
dnl #    for adding in CXXFLAGS and LDFLAGS, respectively,
172
172
dnl #    If not, set the shell variable to "no".
173
173
dnl #    Includes and libraries options are
174
 
dnl #    given shell variable $rheo_ldadd_taucs and $rheo_includes_taucs.
 
174
dnl #    given shell variable $rheo_ldadd_taucs and $rheo_incdir_taucs.
175
175
dnl #    These shell variables could be set for instance
176
176
dnl #    by appropriates "--with-taucs-ldadd="'rheo_ldadd_taucs' and
177
 
dnl #    "--with-taucs-includes="'rheo_includes_taucs' options.
 
177
dnl #    "--with-taucs-includes="'rheo_incdir_taucs' options.
178
178
dnl #
179
179
AC_DEFUN([RHEO_CHECK_TAUCS],
180
180
    [AH_TEMPLATE([HAVE_TAUCS], Defines if you have taucs library)]
185
185
    rheo_have_taucs=yes
186
186
    PREV_CPPFLAGS=$CPPFLAGS
187
187
    PREV_LDFLAGS=$LDFLAGS
188
 
    INCLUDES_TAUCS=${rheo_includes_taucs}
 
188
    INCLUDES_TAUCS=${rheo_incdir_taucs}
189
189
    CPPFLAGS="${CPPFLAGS} ${INCLUDES_TAUCS}"
190
190
    [AC_CHECK_HEADER(taucs.h, true, rheo_have_taucs=no)]
191
191
 
231
231
dnl #    and LDADD_BOOST for adding in LIBS.
232
232
dnl #    If not, set the shell variable to "no".
233
233
dnl #    Includes options are
234
 
dnl #    given in the shell variables $rheo_includes_boost and $rheo_libdir_boost.
 
234
dnl #    given in the shell variables $rheo_incdir_boost and $rheo_libdir_boost.
235
235
dnl #    These shell variables could be set for instance
236
 
dnl #    by appropriates "--with-boost-includes="'rheo_includes_boost'
 
236
dnl #    by appropriates "--with-boost-includes="'rheo_incdir_boost'
237
237
dnl #    and "--with-boost-libdir="'rheo_libdir_boost' options.
238
238
dnl #
239
239
AC_DEFUN([RHEO_CHECK_BOOST],
256
256
          macincdir=`expr $f : '\(.*\)/boost/numeric/ublas/matrix.hpp'`
257
257
        fi
258
258
      fi
259
 
      inc_path_boost="${rheo_includes_boost} /usr/include ${macdir} ${prefix}/include /usr/local/include"
 
259
      inc_path_boost="${rheo_incdir_boost} /usr/include ${macdir} ${prefix}/include /usr/local/include"
260
260
      for dir in ${inc_path_boost}; do
261
261
        [AC_MSG_CHECKING(for boost/numeric/ublas/matrix.hpp presence in $dir...)]
262
262
        if test -f $dir/boost/numeric/ublas/matrix.hpp; then
268
268
          if test x"${rheo_libdir_boost}" != x""; then
269
269
              LDADD_BOOST="-L${rheo_libdir_boost}"
270
270
          fi
271
 
          echo "INCLUDES_BOOST=$INCLUDES_BOOST"
272
 
          echo "LDADD_BOOST=$LDADD_BOOST"
273
271
          CPPFLAGS="$CPPFLAGS $INCLUDES_BOOST"
274
272
          break
275
273
        else
485
483
    LDADD_UMFPACK="$lib"
486
484
    LIBS_UMFPACK="${LDADD_UMFPACK}"
487
485
    incdir_list="/usr/include/umfpack /usr/include/ufsparse /usr/include/suitesparse"
488
 
    if test x"${rheo_includes_umfpack}" != x""; then
489
 
      incdir_list="${rheo_includes_umfpack} ${incdir_list}"
 
486
    if test x"${rheo_incdir_umfpack}" != x""; then
 
487
      incdir_list="${rheo_incdir_umfpack} ${incdir_list}"
490
488
    fi
491
489
    [AC_MSG_CHECKING(for umfpack.h)]
492
490
    rheo_incdir_umfpack=""
1594
1592
            if test x"${rheo_libdir_mpi}" = x""; then
1595
1593
                rheo_libdir_mpi="/usr/lib/openmpi/lib"
1596
1594
            fi
1597
 
            if test x"${rheo_includes_mpi}" = x""; then
1598
 
                rheo_includes_mpi="/usr/lib/openmpi/include"
 
1595
            if test x"${rheo_incdir_mpi}" = x""; then
 
1596
                rheo_incdir_mpi="/usr/lib/openmpi/include"
1599
1597
            fi
1600
 
            INCLUDES_MPI="-I${rheo_includes_mpi}"
 
1598
            INCLUDES_MPI="-pthread -I${rheo_incdir_mpi}"
1601
1599
            LDADD_MPI="-pthread -L${rheo_libdir_mpi} -lmpi_cxx -lmpi -lopen-rte -lopen-pal"
1602
1600
            ;;
1603
1601
          lam)
1623
1621
        [AC_CHECK_HEADERS(boost/mpi.hpp, [true], [rheo_have_boost_mpi=no])]
1624
1622
        if test x"${rheo_have_boost_mpi}" != x"no"; then
1625
1623
            INCLUDE_BOOST_MPI="${INCLUDES_BOOST}"
1626
 
            LDADD_BOOST_MPI="${LDADD_BOOST} -lboost_mpi"
 
1624
            LDADD_BOOST_MPI="${LDADD_BOOST} -lboost_mpi -lboost_serialization"
1627
1625
            [AC_MSG_CHECKING(for boost::mpi)]
1628
1626
            [AC_MSG_RESULT(${LDADD_BOOST_MPI})]
1629
1627
        fi
1715
1713
dnl #
1716
1714
dnl #    @code{RHEO_CHECK_SCOTCH}
1717
1715
dnl #
1718
 
dnl #    Check for the "scotch" libraries.
 
1716
dnl #    Check for the "scotch" distributed mesh partitionner libraries.
1719
1717
dnl #    Defines HAVE_SCOTCH and substitues 
1720
1718
dnl #    INCLUDES_SCOTCH and LDADD_SCOTCH.
1721
1719
dnl #    Requires the MPI library.
1722
1720
dnl -----------------------------------------------------------------------------
1723
1721
AC_DEFUN([RHEO_CHECK_SCOTCH],
1724
 
    [AH_TEMPLATE([HAVE_SCOTCH], Defines if you have the scotch parallel mesh partitionner libraries)]
 
1722
    [AH_TEMPLATE([HAVE_SCOTCH], Defines if you have the scotch distributed mesh partitionner libraries)]
1725
1723
    [AC_SUBST(INCLUDES_SCOTCH)]
1726
1724
    [AC_SUBST(LDADD_SCOTCH)]
1727
1725
    [AC_MSG_CHECKING(for scotch library)]
1733
1731
    fi
1734
1732
    rheo_libdir_scotch=""
1735
1733
    for d in ${libpath}; do
1736
 
        if test -f $d/libptscotchparmetis.so -a -f $d/libptscotch.so -a -f $d/libptscotcherrexit.so || test -f $d/libptscotchparmetis.a -a -f $d/libptscotch.a -a -f $d/libptscotcherrexit.a ; then
 
1734
        founded=false
 
1735
        # sequential libs:
 
1736
        if test -f $d/libscotch.so -a -f $d/libscotcherrexit.so || test -f $d/libscotch.a -a -f $d/libscotcherrexit.a ; then
 
1737
            founded=true
 
1738
        fi
 
1739
        # distributed libs:
 
1740
        if $founded && test x"${rheo_have_mpi}" = x"yes"; then
 
1741
          if test -f $d/libptscotchparmetis.so -a -f $d/libptscotch.so -a -f $d/libptscotcherrexit.so || test -f $d/libptscotchparmetis.a -a -f $d/libptscotch.a -a -f $d/libptscotcherrexit.a ; then
 
1742
            true
 
1743
          else
 
1744
            founded=true
 
1745
          fi
 
1746
        fi
 
1747
        if $founded; then
1737
1748
          rheo_libdir_scotch=$d
1738
 
          break
1739
 
        fi
 
1749
          break
 
1750
        fi
1740
1751
    done
1741
1752
    if test x"${rheo_libdir_scotch}" = x""; then
1742
1753
        rheo_have_scotch="no"
1744
1755
    if test x"${rheo_have_scotch}" = x"yes"; then
1745
1756
        [AC_DEFINE(HAVE_SCOTCH)]
1746
1757
        INCLUDES_SCOTCH=""
1747
 
        LDADD_SCOTCH="-lptscotchparmetis -lptscotch -lptscotcherrexit"
 
1758
        LDADD_SCOTCH=""
 
1759
        if test x"${rheo_have_mpi}" = x"yes"; then
 
1760
          LDADD_SCOTCH="-lptscotchparmetis -lptscotch -lptscotcherrexit"
 
1761
        fi
 
1762
        LDADD_SCOTCH="$LDADD_SCOTCH -lscotch -lscotcherrexit"
1748
1763
        if test "${rheo_libdir_scotch}" != "/lib" -a "${rheo_libdir_scotch}" != "/usr/lib"; then
1749
1764
          LDADD_SCOTCH="-L${rheo_libdir_scotch} ${LDADD_SCOTCH}"
1750
1765
        fi
1756
1771
    fi
1757
1772
)
1758
1773
dnl -----------------------------------------------------------------------------
 
1774
dnl #
 
1775
dnl #    @code{RHEO_CHECK_BLAS}
 
1776
dnl #
 
1777
dnl #    Check for the "blas" basic linear algebra subroutines library.
 
1778
dnl #    Defines HAVE_BLAS and substitues LDADD_BLAS and INCLUDES_BLAS.
 
1779
dnl -----------------------------------------------------------------------------
 
1780
AC_DEFUN([RHEO_CHECK_BLAS],
 
1781
    [AH_TEMPLATE([HAVE_BLAS], Defines if you have the basic linea algebra subroutines libraries)]
 
1782
    [AC_SUBST(INCLUDES_BLAS)]
 
1783
    [AC_SUBST(LDADD_BLAS)]
 
1784
    [AC_MSG_CHECKING(for blas library)]
 
1785
    rheo_have_blas=yes
 
1786
    INCLUDES_BLAS=""
 
1787
    if test x"${rheo_ldadd_blas}" != x"yes" -a x"${rheo_ldadd_blas}" != x""; then
 
1788
      LDADD_BLAS="${rheo_ldadd_blas}"
 
1789
    elif test x"${rheo_libdir_blas}" != x"yes" -a x"${rheo_libdir_blas}" != x""; then
 
1790
      LDADD_BLAS="-L${rheo_libdir_blas} -lblas"
 
1791
    else
 
1792
      LDADD_BLAS="-lblas"
 
1793
    fi
 
1794
    [AC_DEFINE(HAVE_BLAS)]
 
1795
    [AC_MSG_RESULT(${LDADD_BLAS})]
 
1796
)
 
1797
dnl -----------------------------------------------------------------------------
 
1798
dnl #
 
1799
dnl #    @code{RHEO_CHECK_PASTIX}
 
1800
dnl #
 
1801
dnl #    Check for the "pastix" distributed direct solver libraries.
 
1802
dnl #    Defines HAVE_PASTIX and substitues 
 
1803
dnl #    INCLUDES_PASTIX and LDADD_PASTIX.
 
1804
dnl #    Requires the MPI and SCOTCH libraries.
 
1805
dnl -----------------------------------------------------------------------------
 
1806
AC_DEFUN([RHEO_CHECK_PASTIX],
 
1807
    [AH_TEMPLATE([HAVE_PASTIX], Defines if you have the pastix distributed direct solver libraries)]
 
1808
    [AC_SUBST(INCLUDES_PASTIX)]
 
1809
    [AC_SUBST(LDADD_PASTIX)]
 
1810
    [AC_MSG_CHECKING(for pastix library)]
 
1811
    rheo_have_pastix=yes
 
1812
    if test x"${rheo_libdir_pastix}" = x"yes" -o x"${rheo_libdir_pastix}" = x""; then
 
1813
      rheo_libdir_pastix="\${HOME}/lib"
 
1814
    fi
 
1815
    if test x"${rheo_have_mpi}" = x"yes"; then
 
1816
      LDADD_PASTIX="-L${rheo_libdir_pastix} -lpastix -lrt \${LDADD_BLAS}"
 
1817
    else
 
1818
      LDADD_PASTIX="-L${rheo_libdir_pastix} -lpastix_32bit_nompi_smp_int_double_real_scotch_i686_pc_linux -lrt -lpthread ${LDADD_BLAS}"
 
1819
    fi
 
1820
    if test x"${rheo_incdir_pastix}" = x"yes" -o x"${rheo_incdir_pastix}" = x""; then
 
1821
      rheo_incdir_pastix="\${HOME}/include/pastix"
 
1822
    fi
 
1823
    INCLUDES_PASTIX="-I${rheo_incdir_pastix}"
 
1824
    [AC_DEFINE(HAVE_PASTIX)]
 
1825
    [AC_MSG_RESULT(${LDADD_PASTIX})]
 
1826
)
 
1827
dnl -----------------------------------------------------------------------------
1759
1828
dnl #SEE ALSO:
1760
1829
dnl #    "autoconf"(1), "automake"(1), 
1761
1830
dnl #    "libtool"(1), "make"(1)