📄 linlibs.m4
字号:
dnl ######################################################################dnldnl Determine locations of linear algebra librariesdnldnl ######################################################################AC_LANG_SAVEAC_LANG_FORTRAN77# Determine absolute path of linear algebra librariesAC_ARG_WITH(LIN_LIBDIR,[ --with-LIN_LIBDIR=<linalgebra libdir> to set location of linear algebra libraries],LIN_LIBDIR="$withval")if test -n "$LIN_LIBDIR"; then LIN_LIB_PATH=$LIN_LIBDIRelse LIN_LIB_PATH=$HOME/$hosttype/lib:/loc/lib:/mfe/local/lib:/usr/lib:/usr/local/libfiAC_PATH_PROGS(ABS_LAPACK_LIB, liblapack.a liblapack.so, "", $LIN_LIB_PATH)if test -n "$ABS_LAPACK_LIB"; then AC_SUBST(ABS_LAPACK_LIB) LIN_LIBDIR=`dirname $ABS_LAPACK_LIB` AC_SUBST(LIN_LIBDIR) ABS_BLAS_LIB=$LIN_LIBDIR/libblas.a AC_SUBST(ABS_BLAS_LIB)else AC_MSG_WARN(Unable to find the lapack library in $LIN_LIB_PATH. Use --with-LIN_LIBDIR to set its directory. Physics server will not build.)fi# Determine characteristics of linear algebra library namesif test -n "$ABS_LAPACK_LIB"; then# Determine the line containing the name sgeevline=`$NM $ABS_LAPACK_LIB 2>/dev/null | grep -i sgeev`# Determine capitalization AC_MSG_CHECKING(for capitalization of fortran names in linear algebra libraries) lc=`echo $sgeevline 2>/dev/null | grep sgeev` if test -n "$lc"; then SGNAME=sgeev AC_MSG_RESULT(no) else SGNAME=SGEEV AC_DEFINE(LINLIB_NMS_CAPITALIZED) AC_MSG_RESULT(yes) fi# Determine whether post underscore# No need to check for double post underscore as none of the linear# algebra routines have underscores in their names AC_MSG_CHECKING(for underscore in fortran names in linear algebra libraries) res=`echo $sgeevline 2>/dev/null | grep ${SGNAME}_` if test -n "$res"; then AC_DEFINE(LINLIB_NMS_HAVE_POST_USCORE) AC_MSG_RESULT(post) else res=`echo $sgeevline 2>/dev/null | grep _${SGNAME}` if test -n "$res"; then AC_DEFINE(LINLIB_NMS_HAVE_PRE_USCORE) AC_MSG_RESULT(pre) else AC_DEFINE(LINLIB_NMS_HAVE_NO_USCORE) AC_MSG_RESULT(none) fi fi# Determine whether -lg2c needs to be included in the build AC_MSG_CHECKING(for need to add -lg2c for linear algebra libraries) res=`$NM $ABS_LAPACK_LIB 2>/dev/null | grep " s_wsfe$"` if test -z "$res"; then# Try again for AIX res=`$NM $ABS_LAPACK_LIB 2>/dev/null | grep "\.s_wsfe$"` fi if test -n "$res"; then gccspecdir=`gcc -v 2>&1 | grep specs | sed -e "s/^.* //"` gcclibdir=`echo $gccspecdir | sed -e "s/\/specs//"` g2clib=$gcclibdir/libg2c.a LINLIB_FORT_CONV_LIBS="-L$gcclibdir -lg2c -lgcc" ABS_LINLIB_FORT_CONV_LIBS=$g2clib AC_MSG_RESULT(yes: $ABS_LINLIB_FORT_CONV_LIBS) else LINLIB_FORT_CONV_LIBS=$F77_CONV_LIBS ABS_LINLIB_FORT_CONV_LIBS=$ABS_F77_CONV_LIBS AC_MSG_RESULT(no) AC_MSG_WARN(Assuming linear algebra libraries compiled with $F77) fi AC_SUBST(LINLIB_FORT_CONV_LIBS) AC_SUBST(ABS_LINLIB_FORT_CONV_LIBS)fiAC_LANG_RESTORE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -