📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_INIT( src/amis.cc )AM_CONFIG_HEADER( include/amis/config.h )AM_INIT_AUTOMAKE( amis, 2.95, true )AC_DEFINE_UNQUOTED(AMIS_PACKAGE, "$PACKAGE", [Name of package])AC_DEFINE_UNQUOTED(AMIS_VERSION, "$VERSION", [Version number of package])AC_LANG_CPLUSPLUSdnl Checks for programs.AC_PROG_CXXAC_PROG_RANLIBAC_PROG_AWKAC_PROG_INSTALLAC_PROG_LN_Sdnl Checks for libraries.dnl Checks for header files.AC_CHECK_HEADERS(sys/time.h sys/resource.h unistd.h ieeefp.h sstream hash_map ext/hash_map limits pthread.h thread.h)dnl Checks for typedefs, structures, and compiler characteristics.AC_TYPE_SIZE_TAC_HEADER_TIMEdnl Checks for library functions.dnl AC_FUNC_STRTODdnl AC_CHECK_FUNCS(gettimeofday pow sqrt strtol)AC_ARG_ENABLE(debug, [ --enable-debug enable debugging (no or 0-5) [default no]],, enable_debug=no)AC_MSG_CHECKING(whether to enable debugging)if test "$enable_debug" = "no"; then AC_MSG_RESULT(no)elif test 0 -le $enable_debug -a $enable_debug -le 5; then AC_MSG_RESULT($enable_debug) AC_DEFINE_UNQUOTED(AMIS_DEBUG_LEVEL, $enable_debug, [Degree of debugging messages])else AC_MSG_RESULT($enable_debug) AC_WARN(debugging level is invalid)fiAC_ARG_ENABLE(profile, [ --enable-profile enable profiling (no or 0-5) [default no]],, enable_profile=no)AC_MSG_CHECKING(whether to enable profiling)if test "$enable_profile" = "no"; then AC_MSG_RESULT(no)elif test 0 -le $enable_profile -a $enable_profile -le 5; then if test "$ac_cv_header_sstream" = yes; then AC_MSG_RESULT($enable_profile) AC_DEFINE_UNQUOTED(AMIS_PROFILE_LEVEL, $enable_profile, [Degree of profiling level]) else AC_MSG_RESULT(no) AC_WARN(profiling is invalid without "sstream") fielse AC_MSG_RESULT(no) AC_WARN(profiling level is invalid)fiAC_ARG_ENABLE(feature-lambda, [ --enable-feature-lambda enable feature weights to be lambda [default no]],, enable_feature_lambda=no)AC_MSG_CHECKING(whether to enable feature weights to be lambda)if test "$enable_feature_lambda" = "yes"; then AC_MSG_RESULT(yes) AC_DEFINE(AMIS_FEATURE_WEIGHT_LAMBDA, 1, [Enabling feature weights to be lambda])else AC_MSG_RESULT(no) AMIS_FEATURE_WEIGHT_LAMBDA=nofiAC_ARG_ENABLE(parallel, [ --enable-parallel enable parallel processing (experimental) [default no]],, enable_parallel=no)AC_MSG_CHECKING(whether to enable parallel processing)if test "$enable_parallel" = "yes"; then AC_MSG_RESULT(yes) AC_CHECK_LIB(pthread, pthread_create) AC_CHECK_LIB(thread, thr_create) if test "$ac_cv_lib_thread_thr_create" = "yes"; then AC_DEFINE(AMIS_PARALLEL, 1, [Enabling parallel processing]) AC_DEFINE(AMIS_SOLARIS_THREAD, 1, [Enabling Solaris threads]) else if test "$ac_cv_lib_pthread_pthread_create" = "yes"; then AC_DEFINE(AMIS_PARALLEL, 1, [Enabling parallel processing]) AMIS_PARALLEL=yes else AC_WARN(parallel processing could not be enabled without pthread) AMIS_PARALLEL=no fi fielse AC_MSG_RESULT(no) AMIS_PARALLEL=nofiAC_ARG_ENABLE(long-double, [ --enable-long-double enable long double [default no]],, enable_long_double=no)AC_MSG_CHECKING(whether to use long double as Real)if test "$enable_long_double" = "yes"; then AC_MSG_RESULT(yes) AC_DEFINE(AMIS_USE_LONG_DOUBLE, 1, [Use long double as Real]) AMIS_USE_LONG_DOUBLE=yeselse AC_MSG_RESULT(no) AMIS_USE_LONG_DOUBLE=nofiAC_ARG_ENABLE(tao, [ --enable-tao Enable Algorithms using TAO (Toolkit for Advanced Optimization). To use this option, environment variables: PETSC_DIR, TAO_DIR, BOPT and PETSC_ARCH must be set appropriately at the compile time (see TAO and PETSC mamual). [default no]],, enable_tao=no)AC_MSG_CHECKING(whether to use TAO)if test "$enable_tao" = "yes"; then AC_MSG_RESULT(yes) AC_DEFINE(AMIS_USE_TAO, 1, [Use TAO]) AMIS_USE_TAO=yes # TAO CONFIGURAION PETSC_INCLUDE="-I${PETSC_DIR} -I${PETSC_DIR}/bmake/${PETSC_ARCH} -I${PETSC_DIR}/include -I${PETSC_DIR}/src/sys/src/mpiuni" PETSC_LIB_DIR="${PETSC_DIR}/lib/lib${BOPT}/${PETSC_ARCH}" TAO_LIB_DIR="${TAO_DIR}/lib/lib${BOPT}/${PETSC_ARCH}" PETSC_LIBS="-lpetsc -lpetscvec -lpetscmat -lpetscdm -lpetscsles -lpetscsnes -lpetscts -lpetscgsolver -lpetscmesh -lpetscgrid -lpetscfortran -lpetsccontrib -lmpiuni" TAO_CPPFLAGS="-I${TAO_DIR} -I${TAO_DIR}/include ${PETSC_INCLUDE}" TAO_LDFLAGS="-L${PETSC_LIB_DIR} -L${TAO_LIB_DIR}" TAO_LIBS="-ltaopetsc -ltao ${PETSC_LIBS}" CPPFLAGS="$TAO_CPPFLAGS $CPPFLAGS" LDFLAGS="$TAO_LDFLAGS $LDFLAGS" LIBS="$LIBS $TAO_LIBS"dnl AC_MSG_NOTICE([CPPFLAGS=$CPPFLAGS])dnl AC_MSG_NOTICE([LDFLAGS=$LDFLAGS])dnl AC_MSG_NOTICE([LIBS=$LIBS])else AC_MSG_RESULT(no) AMIS_USE_TAO=no fiAC_ARG_ENABLE(joint-prob, [ --enable-joint-prob enable joint probability [default no]],, enable_joint_prob=no)AC_MSG_CHECKING(whether to enable estimation of joint probability models)if test "$enable_joint_prob" = "yes"; then AC_MSG_RESULT(yes) AC_DEFINE(AMIS_JOINT_PROB, 1, [Enable estimation of joint probability models]) AMIS_JOINT_PROB=yeselse AC_MSG_RESULT(no) AMIS_JOINT_PROB=nofiAC_OUTPUT( Makefile src/Makefile include/Makefile include/amis/Makefile test/Makefile )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -