📄 txphysics.m4
字号:
dnl ######################################################################dnldnl File: txphysics.m4dnldnl Purpose: Determine the locations of the txphysic componentdnl includes and libraries. Componenets are nsecc and dnl txcrange.dnl Allows also for the installation of the ML library. dnl dnl Version: $Id: txphysics.m4,v 1.6 2005/08/26 14:16:19 veitzer Exp $dnldnl Tech-X configure systemdnldnl ######################################################################dnl ######################################################################dnldnl Allow the user to specify an overall txphysics directory. If specified,dnl we look for include and lib under this.dnldnl ######################################################################AC_ARG_WITH(txphysics-dir,[ --with-txphysics-dir=<location of txphysics installation> ],TXPHYSICS_DIR="$withval",TXPHYSICS_DIR="")dnl ######################################################################dnldnl Find nsecc and txcrange 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(txphysics-incdir,[ --with-txphysics-incdir=<location of txphysics includes> ],TXPHYSICS_INCDIR="$withval",TXPHYSICS_INCDIR="")if test -n "$TXPHYSICS_INCDIR"; then TXPHYSICS_INCPATH=$TXPHYSICS_INCDIRelif test -n "$TXPHYSICS_DIR"; then TXPHYSICS_INCPATH=$TXPHYSICS_DIR/includeelse TXPHYSICS_INCPATH="/usr/local/txphysics/include"fidnl ######################################################################dnldnl Find nsecc, txcrange and ionpack header filesdnldnl ######################################################################if test -n "$TXPHYSICS_INCPATH"; then dnl ############### nsecc AC_PATH_PROGS(NSECC_H, nsecc.h, "", $TXPHYSICS_INCPATH) if test -z "$NSECC_H"; then AC_MSG_WARN(nsecc.h not found in $TXPHYSICS_INCPATH. Set with --with-txphysics-incdir=) TXPHYSICS_INC=" " else NSECC_INCDIR=`dirname $NSECC_H` AC_SUBST(NSECC_INCDIR) NSECC_INC="-I$NSECC_INCDIR" AC_SUBST(NSECC_INC) NSECC_DIR=`dirname $NSECC_INCDIR` fidnl ############### txcrange AC_PATH_PROGS(TXCRANGE_H, txcrange.h, "", $TXPHYSICS_INCPATH) if test -z "$TXCRANGE_H"; then AC_MSG_WARN(txcrange.h not found in $TXPHYSICS_INCPATH. Set with --with-txphysics-incdir=) TXPHYSICS_INC=" " else TXCRANGE_INCDIR=`dirname $TXCRANGE_H` AC_SUBST(TXCRANGE_INCDIR) TXCRANGE_INC="-I$TXCRANGE_INCDIR" AC_SUBST(TXCRANGE_INC) TXCRANGE_DIR=`dirname $TXCRANGE_INCDIR` fidnl ############### ionpack AC_PATH_PROGS(IONPACK_H, ionpack.h, "", $TXPHYSICS_INCPATH) if test -z "$IONPACK_H"; then AC_MSG_WARN(ionpack.h not found in $TXPHYSICS_INCPATH. Set with --with-txphysics-incdir=) TXPHYSICS_INC=" " else IONPACK_INCDIR=`dirname $IONPACK_H` AC_SUBST(IONPACK_INCDIR) IONPACK_INC="-I$IONPACK_INCDIR" AC_SUBST(IONPACK_INC) IONPACK_DIR=`dirname $IONPACK_INCDIR` fifidnl ######################################################################dnldnl Find nsecc, txcrange and ionpack librariesdnldnl ######################################################################AC_ARG_WITH(txphysics-libdir,[ --with-txphysics-libdir=<location of txphysics libraries> ],TXPHYSICS_LIBDIR="$withval",TXPHYSICS_LIBDIR="")if test -n "$TXPHYSICS_LIBDIR"; then TXPHYSICS_LIBPATH=$TXPHYSICS_LIBDIRelif test -n "$TXPHYSICS_DIR"; then TXPHYSICS_LIBPATH=$TXPHYSICS_DIR/libelse TXPHYSICS_LIBPATH=`dirname $TXCRANGE_INCDIR`/libfiif test -n "$TXPHYSICS_LIBPATH"; thendnl ########### nsecc AC_PATH_PROGS(LIBNSECC_A, libnsecc.a, "", $TXPHYSICS_LIBPATH) if test -z "$LIBNSECC_A"; then AC_MSG_WARN(libnsecc.a not found. Set with --with-txphysics-libdir=) NSECC_LIBS="" else NSECC_LIBDIR=`dirname $LIBNSECC_A` AC_SUBST(NSECC_LIBDIR) NSECC_LIBS="-L$NSECC_LIBDIR -lnsecc $FLIBS"' $(RPATH_FLAG)'"$NSECC_LIBDIR" fi AC_SUBST(NSECC_LIBS)dnl ########### txcrange AC_PATH_PROGS(LIBTXCRANGE_A, libtxcrange.a, "", $TXPHYSICS_LIBPATH) if test -z "$LIBTXCRANGE_A"; then AC_MSG_WARN(libtxcrange.a not found. Set with --with-txphysics-libdir=) TXCRANGE_LIBS="" else TXCRANGE_LIBDIR=`dirname $LIBTXCRANGE_A` AC_SUBST(TXCRANGE_LIBDIR) TXCRANGE_LIBS="-L$TXCRANGE_LIBDIR -ltxcrange $FLIBS"' $(RPATH_FLAG)'"$TXCRANGE_LIBDIR" fi AC_SUBST(TXCRANGE_LIBS)dnl ########### ionpack AC_PATH_PROGS(LIBIONPACK_A, libionpack.a, "", $TXPHYSICS_LIBPATH) if test -z "$LIBIONPACK_A"; then AC_MSG_WARN(libionpack.a not found. Set with --with-txphysics-libdir=) IONPACK_LIBS="" else IONPACK_LIBDIR=`dirname $LIBIONPACK_A` AC_SUBST(IONPACK_LIBDIR) IONPACK_LIBS="-L$IONPACK_LIBDIR -lionpack $FLIBS"' $(RPATH_FLAG)'"$IONPACK_LIBDIR" fi AC_SUBST(IONPACK_LIBS)fidnl ######################################################################dnldnl Defines for whether nsecc and txcrange found. Not possible to explicitlydnl disable these. If libraries were found they will be used.dnldnl ######################################################################if test -n "$NSECC_LIBS"; then AC_DEFINE(HAVE_NSECC)fiif test -n "$TXCRANGE_LIBS"; then AC_DEFINE(HAVE_TXCRANGE)fiif test -n "$IONPACK_LIBS"; then AC_DEFINE(HAVE_IONPACK)fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -