⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 General Hidden Markov Model Library 一个通用的隐马尔科夫模型的C代码库
💻 IN
字号:
dnl  author       : Achim Gaedke, Peter Pipenbacherdnl  filename     : /zpr/bspk/src/hmm/ghmm/configure.indnl  created      : DATE: 2001-04-04dnl  $Id: configure.in 1839 2007-05-24 11:43:03Z grunau $dnl __copyright__dnl Process this file with autoconf to produce a configure script.AC_INIT(ghmm, 0.8)AC_CONFIG_SRCDIR(ghmm/smodel.c)AM_INIT_AUTOMAKEAM_CONFIG_HEADER(config.h)# info from http://www.cl.cam.ac.uk/texinfodoc/libtool_6.html#SEC33##current #    The most recent interface number that this library implements. #revision #    The implementation number of the current interface. #age The difference between the newest and oldest interfaces that this #    library implements. In other words, the library implements all the #    interface numbers in the range from number current - age to current. ##If two libraries have identical current and age numbers, then the dynamic #linker chooses the library with the greater revision number. ##Here are a set of rules to help you update your library version information: ##  1. Start with version information of `0:0:0' for each libtool library. #  2. Update the version information only immediately before a public release #     of your software. More frequent updates are unnecessary, and only#     guarantee that the current interface number gets larger faster. #  3. If the library source code has changed at all since the last update, #     then increment revision (`c:r:a' becomes `c:r+1:a'). #  4. If any interfaces have been added, removed, or changed since the last #     update, increment current, and set revision to 0. #  5. If any interfaces have been added since the last public release, then #     increment age. #  6. If any interfaces have been removed since the last public release, then #     set age to 0. GHMM_VERSION_CURRENT=1GHMM_VERSION_REVISION=0GHMM_VERSION_AGE=0GHMM_VERSION=$GHMM_VERSION_CURRENT.$GHMM_VERSION_REVISION.$GHMM_VERSION_AGEAC_SUBST(GHMM_VERSION_CURRENT)AC_SUBST(GHMM_VERSION_REVISION)AC_SUBST(GHMM_VERSION_AGE)AM_INIT_AUTOMAKE(ghmm,$GHMM_VERSION)dnl implicit in AM_INIT_AUTOMAKE...dnl AC_PROG_MAKE_SETdnl load CFLAGS from cacheif test -z "$CFLAGS"; then  AC_CACHE_CHECK(for CFLAGS, ac_cv_cflags,[ac_cv_cflags="-O2"]);  CFLAGS="$ac_cv_cflags"else  ac_cv_cflags="$CFLAGS"; fidnl Checks for programs.AC_PROG_CCAC_PROG_RANLIBAM_PROG_LIBTOOLAC_PROG_AWKAC_PATH_PROG(RM,rm)AC_PATH_PROG(DOCXX,doc++)AC_PATH_PROG(LATEX,latex)AC_PATH_PROG(DVIPS,dvips)AC_PATH_PROG(PKGCONFIG,pkg-config)AC_PATH_PROG(EXPECT_FOR_DEJAGNU,expect)AC_PATH_PROG(RUNTEST_FOR_DEJAGNU,runtest)dnl obsolete features can be switched on or offAC_ARG_ENABLE(obsolete,              AC_HELP_STRING([--disable-obsolete],                             [disable default enabled obsolete features]),              if test "x$enable_obsolete" != "xno" ; then                  AC_DEFINE([GHMM_OBSOLETE], [], [include obsolete features])                  AC_MSG_NOTICE(obsolete features enabled)              else                  AC_MSG_NOTICE(obsolete features disabled)              fi,              AC_DEFINE([GHMM_OBSOLETE], [], [include obsolete features])              AC_MSG_NOTICE(obsolete features enabled))dnl experimental things can be switched on or offAC_ARG_ENABLE(experimental,              AC_HELP_STRING([--enable-experimental],                             [enable experimental features [[default=no]]]),              if test "x$enable_experimental" != "xno" ; then                  AC_DEFINE([__EXPERIMENTAL__], [$enable_experimental], [include experimental features])                  AC_MSG_NOTICE(experimental features enabled)              fi,              AC_MSG_NOTICE(experimental features disabled))dnl unsupported features can be switched on or offAC_ARG_ENABLE(unsupported,              AC_HELP_STRING([--enable-unsupported],                             [enable unsupported features [[default=no]]]),              if test "x$enable_unsupported" != "xno" ; then                  AC_DEFINE([GHMM_UNSUPPORTED], [], [include unsupported features])                  AC_MSG_NOTICE(unsupported features enabled)              fi,              AC_MSG_NOTICE(unsupported features disabled))dnl following tests with CAC_LANG_Cdnl aborts on failurednl Checks for libraries.AC_CHECK_LIB(pthread, pthread_join)dnl Checks for header files.AC_HEADER_STDCdnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_SIZE_TAC_HEADER_TIMEAC_STRUCT_TMdnl Checks for libm functionsAC_CHECK_LIB(m, sqrt)AC_CHECK_LIB(m, exp)AC_CHECK_LIB(m, pow)dnl AC_CHECK_FUNCS(tmpnam mkstemp)dnl AC_CHECK_FUNCS(gettimeofday)dnl check GSL functions and use it instead of ghmm interpolation algorithmsAC_ARG_ENABLE(gsl,  AC_HELP_STRING([--enable-gsl], [enable gsl library [[default=no]]]),  [ if test "x$enable_gsl" != "xno" ; then      AC_DEFINE(DO_WITH_GSL,1,[use GSL functions instead of ghmm equivalents])      dnl these macros are from acinclude.m4! (modified gsl.m4)      AM_PATH_GSL(0.7,,AC_MSG_ERROR("GSL Version 0.7 or higher required."))      LIBS="$LIBS $GSL_LIBS"      CFLAGS="$CFLAGS $GSL_CFLAGS"      CXXFLAGS="$CXXFLAGS $GSL_CFLAGS"      dnl checking for gsl_inteval      AC_MSG_CHECKING([for gsl_inteval])      AC_TRY_COMPILE([#include <gsl/gsl_roots.h>],        [          gsl_interval x;        ],        AC_MSG_RESULT(yes)        AC_DEFINE(HAVE_GSL_INTERVAL,1,[struct gsl_interval exists]),        AC_MSG_RESULT(no)      )      dnl checking which root solver alloc function is used      AC_MSG_CHECKING([whether gsl_root_fsolver_alloc takes one argument])      AC_TRY_COMPILE([#include <gsl/gsl_roots.h>],        [          gsl_root_fsolver* s;          s = gsl_root_fsolver_alloc (gsl_root_fsolver_bisection);        ],        AC_MSG_RESULT(yes)        AC_DEFINE(GSL_ROOT_FSLOVER_ALLOC_WITH_ONE_ARG,1,[root solver allocation takes only one argument]),        AC_MSG_RESULT(no)      )      dnl checking for gsl_histogram_set_ranges_uniform      AC_MSG_CHECKING([for gsl_histogram_set_ranges_uniform])      AC_TRY_LINK([#include <gsl/gsl_histogram.h>],        [          gsl_histogram* h;          (void)gsl_histogram_set_ranges_uniform(h,-10.0,10.0);        ],        AC_MSG_RESULT(yes)        AC_DEFINE(GSL_HISTOGRAM_SET_RANGES_UNIFORM,1,[gsl_histogram_set_ranges_uniform is defined]),        AC_MSG_RESULT(no)      )    fi  ],  [    AC_MSG_NOTICE("not using gsl")    AC_CHECK_LIB(m, cos)  ])dnl select random number generatorAC_ARG_WITH(rng,            [  --with-rng=XXX          selects random number generator ("mt" (default), "bsd" or "gsl")],            [ if test "x$with_rng" = "xbsd"; then                AC_DEFINE([GHMM_RNG_BSD], [], [use system RNG (bsd style)])                AC_MSG_NOTICE(using BSD random number generator)                AC_CHECK_LIB(bsd, random)              else                if test "x$with_rng" = "xgsl"; then                  if test -n "$enable_gsl" && test "x$enable_gsl" != "xno"; then                    AC_DEFINE([GHMM_RNG_GSL], [], [use GSL RNG])                    AC_MSG_NOTICE(using GSL random number generator)                  else                    AC_MSG_ERROR(the gsl random number generator is only usable then gsl is enabled)                  fi                else                  if test "x$with_rng" = "xmt"; then                    AC_DEFINE([GHMM_RNG_MERSENNE_TWISTER], [], [use internal Mersenne-Twiser RNG])                    AC_MSG_NOTICE(using internal Mersenne-Twister random number generator)                  else                    AC_MSG_ERROR(not a valid random number generator)                  fi                fi              fi],            [ AC_DEFINE([GHMM_RNG_MERSENNE_TWISTER], [], [use internal Mersenne-Twiser RNG])])dnl libxml2 checksecho -n "checking libxml2 version... "if $PKGCONFIG --atleast-version=2.6 libxml-2.0; then        echo "... ok"else        echo `$PKGCONFIG --modversion libxml-2.0`        AC_MSG_ERROR(Failed: please install at least libxml-2.6.0)fiLIBXML2_CFLAGS=`$PKGCONFIG --cflags libxml-2.0`LIBXML2_LIBS=`$PKGCONFIG --libs libxml-2.0`LIBS="$LIBS $LIBXML2_LIBS"CFLAGS="$CFLAGS $LIBXML2_CFLAGS"dnl final configurationSUBDIRS="ghmm tools tests doc"dnl optional c++ useAC_ARG_ENABLE(ghmmXX,              AC_HELP_STRING([--enable-ghmmXX],                             [enable unsupported C++ wrapper ghmm++ [[default=no]]]),              [ if  test "x$enable_ghmmXX" != "xno" ; then                  dnl load CXXFLAGS from cache                  if test -z "$CXXFLAGS"; then                    AC_CACHE_CHECK(for CXXFLAGS, ac_cv_cxxflags,[ac_cv_cxxflags="-O2"]);                    CXXFLAGS="$ac_cv_cxxflags"                  else                    ac_cv_cxxflags="$CXXFLAGS";                   fi                  dnl activate C++ language                  AC_PROG_CPP                  AC_PROG_CXX                  AC_PROG_CXXCPP                   AC_LANG_CPLUSPLUS                  AC_CXX_HAVE_STL                  AC_CXX_NAMESPACES                  AC_CHECK_HEADERS(cstdio cstdlib cstring cerrno cmath cstdarg)                  AC_LANG_CPLUSPLUS                  XMLIO_CONFIG=""                  AC_ARG_WITH(xmlio,                    [  --with-xmlio=DIR        with xmlio library available at the given prefix],                    [ if test "x$with_xmlio" != "xno" ; then                        AC_PATH_PROG(XMLIO_CONFIG,xmlio-config,,"$with_xmlio/bin:$PATH")                      fi                    ],                    [                      AC_PATH_PROG(XMLIO_CONFIG,xmlio-config)                    ]                  )                  if test -z "$XMLIO_CONFIG" ; then                    AC_MSG_ERROR("for ghmm++ support xmlio is needed")                  else                    XMLIO_PREFIX=`$XMLIO_CONFIG --prefix`                    XMLIO_INCLUDES=`$XMLIO_CONFIG --cppflags`                    XMLIO_LIBS=`$XMLIO_CONFIG --libs`                    AC_SUBST(XMLIO_PREFIX)                    AC_SUBST(XMLIO_INCLUDES)                    AC_SUBST(XMLIO_LIBS)                  fi                  if test "$ac_cv_cxx_have_stl" = yes && test -n "$XMLIO_CONFIG" ; then                    SUBDIRS="$SUBDIRS ghmm++"                    AC_OUTPUT(ghmm++/Makefile \	                      ghmm++/examples/Makefile)                  fi                fi              ])dnl python wrapper can be switched on or offAC_ARG_ENABLE(python,              AC_HELP_STRING([--disable-python],                             [disable build and installation of the python bindings]),              if test "x$enable_python" != "xno" ; then                 SUBDIRS="$SUBDIRS ghmmwrapper HMMEd"              fi,              dnl default enabled              SUBDIRS="$SUBDIRS ghmmwrapper HMMEd")dnl finishedAC_SUBST(SUBDIRS)AC_OUTPUT(Makefile \          doc/Makefile \          ghmm/Makefile \          tools/Makefile \          tests/Makefile \          tests/data/Makefile \          doc/docu.dxx \          tools/ghmm-config \          ghmmwrapper/Makefile \          HMMEd/Makefile \          VisualC/Makefile \          VisualC/coin_toss_test/Makefile \          VisualC/coin_toss_test_pp/Makefile \          VisualC/ghmm/Makefile \          VisualC/ghmmpp/Makefile)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -