📄 aztec.m4
字号:
dnl ######################################################################dnldnl File: aztec.m4dnldnl Purpose: Determine the locations of aztec includes and libraries. dnl Allows also for the installation of the ML library. dnl dnl Assumptions:dnl there are some assumptions about the libraries:dnl ML:dnl it is assumed that ml is compiled with SUPERLU support. dnl recompile superlu if it does not support it.dnl AZTEC: dnl it seems that aztec requires the library g2c on some dnl system. It is not clear yet, if other OS require a dnl similar library. If your OS requires other libraries todnl built aztec, add them in the OS branch below. dnl dnldnl Version: $Id: aztec.m4,v 1.12 2005/07/17 18:29:51 cary Exp $dnldnl Tech-X configure systemdnldnl ######################################################################dnl ######################################################################dnldnl First find if the user supplies also the ml library. dnldnl ######################################################################dnl ######################################################################dnldnl Find ml includes - looking in include location if present,dnl otherwise in dir/include if present, otherwise in default locations,dnl first parallel, then serial.dnldnl ######################################################################AC_ARG_WITH(ml-dir, [ --with-ml-dir=<location of ml installation> ], ML_DIR = "$withval", ML_DIR="")if test -n "$ML_DIR"; then ML_DIR=$ML_DIRelsednl do not try to guess the ml location. Either the user provides it ordnl we ignore it. ML_DIR=""fi AC_ARG_WITH(ml-incdir,[ --with-ml-incdir=<location of ml includes> ], ML_INCDIR="$withval",ML_INCDIR="")if test -n "$ML_INCDIR"; then ML_INCPATH=$ML_INCDIRelif test -n "$ML_DIR"; thendnl ML has carzy locations for include files and libraries ML_INCPATH=$ML_DIR/libelse ML_INCPATH=""fiif test -n "$ML_INCPATH"; then AC_PATH_PROGS(ML_H, ml_include.h, "", $ML_INCPATH) if test -z "$ML_H"; then AC_MSG_WARN(ml_include.h not found in $ML_INCPATH. Set with --with-ml-incdir=) ML_INC=" " ac_cv_have_ml=no else ML_INCDIR=`dirname $ML_H` AC_SUBST(ML_INCDIR) ML_INC=-I$ML_INCDIR AC_SUBST(ML_INC) ML_DIR=`dirname $ML_INCDIR` ac_cv_have_ml=yes fielse ac_cv_have_ml=nofidnl ######################################################################dnldnl Find ml librariesdnldnl ######################################################################AC_ARG_WITH(ml-libdir,[ --with-ml-libdir=<location of ml library> ], ML_LIBDIR="$withval",ML_LIBDIR="")if test $ac_cv_have_ml = yes; then if test -n "$ML_LIBDIR"; then ML_LIBPATH=$ML_LIBDIR else ML_LIBPATH=$ML_DIR/lib fi AC_PATH_PROGS(LIBML_A, libml.a, "", $ML_LIBPATH) if test -z "$LIBML_A"; then AC_MSG_WARN(libml.a not found. Set with --with-ml-libdir=) ac_cv_have_ml=no ML_LIB=" " else ML_LIBDIR=`dirname $LIBML_A` AC_SUBST(ML_LIBDIR) ML_LIB="-L$ML_LIBDIR -lml -lsuperlu" fi AC_SUBST(ML_LIB)fidnl ######################################################################dnldnl Define for whether ml founddnldnl ######################################################################if test $ac_cv_have_ml = yes; then AC_DEFINE(HAVE_ML)fidnl ######################################################################dnldnl Now here comes the actual AZTEC stuff. dnl If AZTEC is not supported, the provided ML library will be ignoreddnldnl ######################################################################dnl ######################################################################dnldnl Allow the user to specify an overall aztec directory. If specified,dnl we look for include and lib under this.dnldnl ######################################################################AC_ARG_WITH(aztec-dir,[ --with-aztec-dir=<location of aztec installation> ],AZTEC_DIR="$withval",AZTEC_DIR="")dnl ######################################################################dnldnl Find aztec includes - looking in include location if present,dnl otherwise in dir/include if present, otherwise in default locations,dnl first parallel, then serial.dnldnl ####################################################################### echo MPI = $MPI# echo AZTEC_INCDIR = $AZTEC_INCDIRAC_ARG_WITH(aztec-incdir,[ --with-aztec-incdir=<location of aztec includes> ],AZTEC_INCDIR="$withval",AZTEC_INCDIR="")# echo AZTEC_INCDIR = $AZTEC_INCDIRif test -n "$AZTEC_INCDIR"; then AZTEC_INCPATH=$AZTEC_INCDIRelif test -n "$AZTEC_DIR"; thendnl AZTEC has some crazy default paths for include files AZTEC_INCPATH=$AZTEC_DIR/libelif test "$MPI" = yes; then AZTEC_INCPATH=$abs_top_builddir/../txmodules/aztecmpi/include:$HOME/$UNIXFLAVOR/aztecmpi/include:$HOME/aztecmpi/include:$HOME/opt/aztecmpi/include:$HOME/$host/aztecmpi/include:/usr/local/aztecmpi/include:/opt/aztecmpi/include:/loc/aztecmpi/include:/local/aztecmpi/include:$abs_top_builddir/../txmodules/aztec/include:$HOME/$UNIXFLAVOR/aztec/lib:$HOME/aztec/lib:$HOME/opt/aztec/include:$HOME/$host/aztec/include:/usr/local/aztec/lib:/opt/aztec/include:/loc/aztec/lib:/local/aztec/libelse AZTEC_INCPATH=$abs_top_builddir/../txmodules/aztec/include:$HOME/$UNIXFLAVOR/aztec/include:$HOME/aztec/include:$HOME/opt/aztec/include:$HOME/$host/aztec/include:/usr/local/aztec/include:/opt/aztec/include:/loc/aztec/include:/local/aztec/includefi# echo AZTEC_INCPATH = $AZTEC_INCPATHif test -n "$AZTEC_INCPATH"; then AC_PATH_PROGS(AZTEC_H, az_aztec.h, "", $AZTEC_INCPATH) if test -z "$AZTEC_H"; then AC_MSG_WARN(az_aztec.h not found in $AZTEC_INCPATH. Set with --with-aztec-incdir=) AZTEC_INC=" " ac_cv_have_aztec=no else AZTEC_INCDIR=`dirname $AZTEC_H` AC_SUBST(AZTEC_INCDIR) AZTEC_INC="$ML_INC -I$AZTEC_INCDIR" AC_SUBST(AZTEC_INC) AZTEC_DIR=`dirname $AZTEC_INCDIR` ac_cv_have_aztec=yes fielse ac_cv_have_aztec=nofidnl ######################################################################dnldnl Find aztec librariesdnldnl ######################################################################AC_ARG_WITH(aztec-libdir,[ --with-aztec-libdir=<location of aztec library> ],AZTEC_LIBDIR="$withval",AZTEC_LIBDIR="")if test $ac_cv_have_aztec = yes; then if test -n "$AZTEC_LIBDIR"; then AZTEC_LIBPATH=$AZTEC_LIBDIR else AZTEC_LIBPATH=$AZTEC_DIR/lib fi AC_PATH_PROGS(LIBAZTEC_A, libaztec.a, "", $AZTEC_LIBPATH) if test -z "$LIBAZTEC_A"; then AC_MSG_WARN(libaztec.a not found. Set with --with-aztec-libdir=) ac_cv_have_aztec=no AZTEC_LIBS=" " else AZTEC_LIBDIR=`dirname $LIBAZTEC_A` AC_SUBST(AZTEC_LIBDIR)dnl ######################################################################dnldnl Additional libraries used to link AZTEC. Modify if required!!dnldnl ###################################################################### AC_MSG_CHECKING(full aztec library set) case "$host" in *-linux* | *-freebsd* ) AZTEC_LIBS="$ML_LIB -L$AZTEC_LIBDIR -laztec ${CXX_LIBFLAG} -lg2c" ;; s00* | powerpc-ibm-aix4.* | powerpc-ibm-aix5.* ) AZTEC_LIBS="$ML_LIB -L$AZTEC_LIBDIR -laztec -lblas -lxlf90" ;; *) AZTEC_LIBS="$ML_LIB -L$AZTEC_LIBDIR -laztec" ;; esac AC_MSG_RESULT($AZTEC_LIBS) fi AC_SUBST(AZTEC_LIBS)fidnl ######################################################################dnldnl Define for whether aztec founddnldnl ######################################################################if test $ac_cv_have_aztec = yes; then AC_DEFINE(HAVE_AZTEC)fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -