OLD_CXXFLAGS="$CXXFLAGS"
OLD_CPPFLAGS="$CPPFLAGS"
-echo $DEAL_II_TRILINOS_INCDIR
CPPFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CPPFLAGS"
CXXFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CXXFLAGS"
AC_CHECK_HEADERS([Amesos.h \
dnl --------------------------------------------------
AC_DEFUN(DEAL_II_WITH_UMFPACK, dnl
[
- acx_umfpack=no
-
AC_ARG_WITH(umfpack,
[ --with-umfpack=umfpack-root-directory Use installed UMFPack version.
'umfpack-root-directory' should be the directory
contributed UMFPack library is used if no argument
is given. Default is not to use UMFPack.],
[
- UMFPACK_DIR=$withval
- ])
+ AC_MSG_CHECKING(UMFPACK library)
+ USE_CONTRIB_UMFPACK='yes'
+ if test "x$withval" = "xyes" ; then
+ UMFPACK_DIR="`pwd`/contrib/umfpack"
+ UMFPACK_INCLUDE_DIR="-I`pwd`/contrib/umfpack/UMFPACK/Include"
+ AC_MSG_RESULT(using included version)
+ DEAL_II_USE_INTERNAL_UMFPACK=yes
+ else
+ UMFPACK_DIR=$withval
+ UMFPACK_INCLUDE_DIR="-I$withval/Include"
+ AC_MSG_RESULT(trying version at $withval)
+ fi
+ ])
+ acx_umfpack=no
AC_ARG_WITH(umfpack-include,
[ --with-umfpack-include=/path/to/UMFPACK Specify the path to the UMFPACK headers file;
use this if you want to override the
acx_umfpack=yes
])
- if test "x$UMFPACK_DIR" != "x" -a "x$acs_umfpack" == "xno" ; then
- dnl A pathname has been given to --with-umfpack
-
- dnl Try old naming scheme for umfpack/amd libraries (before
- dnl Tim Davis incorporated everything into SuiteSparse)
- OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L${UMFPACK_DIR}/UMFPACK/Lib $LDFLAGS"
- AC_CHECK_LIB(
- [umfpack],
- [umfpack_di_defaults],
- [
- DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack)
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/UMFPACK/Lib $LDFLAGS"
- fi
- ],
- [
- dnl Old naming scheme failed, try the new one
- LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
- AC_CHECK_LIB(
- [umfpack],
- [umfpack_di_defaults],
- [
- DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack)
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
- fi
- ],
- [
- AC_MSG_ERROR(installation of UMFPACK could not be determined)
- ]
- )
- ]
- )
-
- dnl Now do the same for amd. this one comes second since on the linker
- dnl line, -lumfpack has to preceded -lamd
- OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
- AC_CHECK_LIB(
- [amd],
- [amd_info],
- [
- DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd)
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
- fi
- ],
- [
- dnl Old naming scheme failed, try the new one
- LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
- AC_CHECK_LIB(
- [amd],
- [amd_info],
- [
- DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd)
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
- fi
- ],
- [
- AC_MSG_ERROR(installation of AMD could not be determined)
- ]
- )
- ]
- )
+ if test "x$UMFPACK_DIR" != "x" -a "x$acx_umfpack" == "xno" ; then
+ dnl A pathname has been given to --with-umfpack but nothing
+ dnl has been specified through the other two flags
+
+ dnl Check whether the libraries are there (unless we use the
+ dnl internal version, which we will first have to compile
+ dnl before the libs are there)
+ if test "x$DEAL_II_USE_INTERNAL_UMFPACK" != "xyes" ; then
+ dnl Try old naming scheme for umfpack/amd libraries (before
+ dnl Tim Davis incorporated everything into SuiteSparse)
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L${UMFPACK_DIR}/UMFPACK $LDFLAGS"
+ AC_CHECK_LIB(
+ [umfpack],
+ [umfpack_di_defaults],
+ [
+ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack)
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/UMFPACK $LDFLAGS"
+ fi
+ ],
+ [
+ dnl Old naming scheme failed, try the new one
+ LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
+ AC_CHECK_LIB(
+ [umfpack],
+ [umfpack_di_defaults],
+ [
+ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lumfpack)
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
+ fi
+ ],
+ [
+ AC_MSG_ERROR(installation of UMFPACK could not be determined)
+ ]
+ )
+ ]
+ )
+
+ dnl Now do the same for amd. this one comes second since on the linker
+ dnl line, -lumfpack has to preceded -lamd
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
+ AC_CHECK_LIB(
+ [amd],
+ [amd_info],
+ [
+ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd)
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
+ fi
+ ],
+ [
+ dnl Old naming scheme failed, try the new one
+ LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
+ AC_CHECK_LIB(
+ [amd],
+ [amd_info],
+ [
+ DEAL_II_ADD_EXTERNAL_LIBS_AT_TAIL(-lamd)
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
+ fi
+ ],
+ [
+ AC_MSG_ERROR(installation of AMD could not be determined)
+ ]
+ )
+ ]
+ )
+ fi
dnl Try old and new naming scheme for header files
AC_CHECK_FILE(
)
dnl We also have to see whether the UFconfig.h file can be found
- dnl somewhere
- AC_CHECK_FILE(
- [${UMFPACK_DIR}/UFconfig/UFconfig.h],
- [
- UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/UFconfig"
- ],
- [
- AC_MSG_ERROR(not found)
- ]
- )
-
+ dnl somewhere. This is not of importance if we use the
+ dnl built-in version
+ if test "x$DEAL_II_USE_INTERNAL_UMFPACK" != "xyes" ; then
+ AC_CHECK_FILE(
+ [${UMFPACK_DIR}/UFconfig/UFconfig.h],
+ [
+ UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/UFconfig"
+ ],
+ [
+ AC_MSG_ERROR(not found)
+ ]
+ )
+ fi
else
if test "x$UMFPACK_INCDIR" != "x" ; then
+ dnl Something has been passed to --with-umfpack-include
+
UMFPACK_INCLUDE_DIR="-I${UMFPACK_INCDIR}"
OLD_CXXFLAGS="$CXXFLAGS"
OLD_CPPFLAGS="$CPPFLAGS"
[],
[AC_MSG_ERROR(installation of UMFPACK could not be determined)]
)
- AC_CHECK_HEADER([amd.h], [], [AC_MSG_ERROR(installation of UMFPACK could not be determined)])
- AC_CHECK_HEADER([UFconfig.h], [], [AC_MSG_ERROR(installation of UMFPACK could not be determined)])
+ AC_CHECK_HEADER([amd.h], [],
+ [AC_MSG_ERROR(installation of UMFPACK could not be determined)])
+ AC_CHECK_HEADER([UFconfig.h], [],
+ [AC_MSG_ERROR(installation of UMFPACK could not be determined)])
if test "x$UMFPACK_LIBDIR" != "x" ; then
AC_CHECK_LIB(
[AC_MSG_ERROR(installation of UMFPACK could not be determined)]
)
fi
-
- else
- dnl Use the umfpack version we package with deal.II
- AC_MSG_CHECKING(UmfPack library)
- UMFPACK_INCLUDE_DIR='-I$D/contrib/umfpack/UMFPACK/Include'
- USE_CONTRIB_UMFPACK='yes'
- AC_MSG_RESULT(using included version)
fi
fi
OLD_CXXFLAGS="$CXXFLAGS"
OLD_CPPFLAGS="$CPPFLAGS"
-echo $DEAL_II_TRILINOS_INCDIR
CPPFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CPPFLAGS"
CXXFLAGS="-I$DEAL_II_TRILINOS_INCDIR $CXXFLAGS"
+
if test "x$with_umfpack" != "x" -a "x$with_umfpack" != "xno" ; then
if test "x$with_blas" = "x" -o "x$with_blas" = "xno"; then
with_blas="yes"
- acx_umfpack=no
-
# Check whether --with-umfpack was given.
if test "${with_umfpack+set}" = set; then
withval=$with_umfpack;
- UMFPACK_DIR=$withval
+ { echo "$as_me:$LINENO: checking UMFPACK library" >&5
+echo $ECHO_N "checking UMFPACK library... $ECHO_C" >&6; }
+ USE_CONTRIB_UMFPACK='yes'
+ if test "x$withval" = "xyes" ; then
+ UMFPACK_DIR="`pwd`/contrib/umfpack"
+ UMFPACK_INCLUDE_DIR="-I`pwd`/contrib/umfpack/UMFPACK/Include"
+ { echo "$as_me:$LINENO: result: using included version" >&5
+echo "${ECHO_T}using included version" >&6; }
+ DEAL_II_USE_INTERNAL_UMFPACK=yes
+ else
+ UMFPACK_DIR=$withval
+ UMFPACK_INCLUDE_DIR="-I$withval/Include"
+ { echo "$as_me:$LINENO: result: trying version at $withval" >&5
+echo "${ECHO_T}trying version at $withval" >&6; }
+ fi
fi
+ acx_umfpack=no
# Check whether --with-umfpack-include was given.
if test "${with_umfpack_include+set}" = set; then
fi
- if test "x$UMFPACK_DIR" != "x" -a "x$acs_umfpack" == "xno" ; then
+ if test "x$UMFPACK_DIR" != "x" -a "x$acx_umfpack" == "xno" ; then
- OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L${UMFPACK_DIR}/UMFPACK/Lib $LDFLAGS"
- { echo "$as_me:$LINENO: checking for umfpack_di_defaults in -lumfpack" >&5
+ if test "x$DEAL_II_USE_INTERNAL_UMFPACK" != "xyes" ; then
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L${UMFPACK_DIR}/UMFPACK $LDFLAGS"
+ { echo "$as_me:$LINENO: checking for umfpack_di_defaults in -lumfpack" >&5
echo $ECHO_N "checking for umfpack_di_defaults in -lumfpack... $ECHO_C" >&6; }
if test "${ac_cv_lib_umfpack_umfpack_di_defaults+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
LIBS="$LIBS -lumfpack"
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/UMFPACK/Lib $LDFLAGS"
- fi
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/UMFPACK $LDFLAGS"
+ fi
else
- LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
- { echo "$as_me:$LINENO: checking for umfpack_di_defaults in -lumfpack" >&5
+ LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
+ { echo "$as_me:$LINENO: checking for umfpack_di_defaults in -lumfpack" >&5
echo $ECHO_N "checking for umfpack_di_defaults in -lumfpack... $ECHO_C" >&6; }
if test "${ac_cv_lib_umfpack_umfpack_di_defaults+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
LIBS="$LIBS -lumfpack"
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
- fi
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
+ fi
else
- { { echo "$as_me:$LINENO: error: installation of UMFPACK could not be determined" >&5
+ { { echo "$as_me:$LINENO: error: installation of UMFPACK could not be determined" >&5
echo "$as_me: error: installation of UMFPACK could not be determined" >&2;}
{ (exit 1); exit 1; }; }
fi
- OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="-L${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
- { echo "$as_me:$LINENO: checking for amd_info in -lamd" >&5
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
+ { echo "$as_me:$LINENO: checking for amd_info in -lamd" >&5
echo $ECHO_N "checking for amd_info in -lamd... $ECHO_C" >&6; }
if test "${ac_cv_lib_amd_amd_info+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
LIBS="$LIBS -lamd"
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
- fi
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/AMD/Lib $LDFLAGS"
+ fi
else
- LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
- { echo "$as_me:$LINENO: checking for amd_info in -lamd" >&5
+ LDFLAGS="-L${UMFPACK_DIR}/lib $OLD_LDFLAGS"
+ { echo "$as_me:$LINENO: checking for amd_info in -lamd" >&5
echo $ECHO_N "checking for amd_info in -lamd... $ECHO_C" >&6; }
if test "${ac_cv_lib_amd_amd_info+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
LIBS="$LIBS -lamd"
- if test "$LD_PATH_OPTION" != "no"; then
- LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
- fi
+ if test "$LD_PATH_OPTION" != "no"; then
+ LDFLAGS="$LD_PATH_OPTION${UMFPACK_DIR}/lib $LDFLAGS"
+ fi
else
- { { echo "$as_me:$LINENO: error: installation of AMD could not be determined" >&5
+ { { echo "$as_me:$LINENO: error: installation of AMD could not be determined" >&5
echo "$as_me: error: installation of AMD could not be determined" >&2;}
{ (exit 1); exit 1; }; }
fi
+ fi
as_ac_File=`echo "ac_cv_file_${UMFPACK_DIR}/UMFPACK/Include/umfpack.h" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for ${UMFPACK_DIR}/UMFPACK/Include/umfpack.h" >&5
fi
- as_ac_File=`echo "ac_cv_file_${UMFPACK_DIR}/UFconfig/UFconfig.h" | $as_tr_sh`
+ if test "x$DEAL_II_USE_INTERNAL_UMFPACK" != "xyes" ; then
+ as_ac_File=`echo "ac_cv_file_${UMFPACK_DIR}/UFconfig/UFconfig.h" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for ${UMFPACK_DIR}/UFconfig/UFconfig.h" >&5
echo $ECHO_N "checking for ${UMFPACK_DIR}/UFconfig/UFconfig.h... $ECHO_C" >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_File'}'` = yes; then
- UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/UFconfig"
+ UMFPACK_INCLUDE_DIR="${UMFPACK_INCLUDE_DIR} -I${UMFPACK_DIR}/UFconfig"
else
- { { echo "$as_me:$LINENO: error: not found" >&5
+ { { echo "$as_me:$LINENO: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-
+ fi
else
if test "x$UMFPACK_INCDIR" != "x" ; then
+
UMFPACK_INCLUDE_DIR="-I${UMFPACK_INCDIR}"
OLD_CXXFLAGS="$CXXFLAGS"
OLD_CPPFLAGS="$CPPFLAGS"
fi
fi
-
- else
- { echo "$as_me:$LINENO: checking UmfPack library" >&5
-echo $ECHO_N "checking UmfPack library... $ECHO_C" >&6; }
- UMFPACK_INCLUDE_DIR='-I$D/contrib/umfpack/UMFPACK/Include'
- USE_CONTRIB_UMFPACK='yes'
- { echo "$as_me:$LINENO: result: using included version" >&5
-echo "${ECHO_T}using included version" >&6; }
fi
fi