Changeset 2040


Ignore:
Timestamp:
Aug 28, 2009, 6:07:43 PM (11 years ago)
Author:
Peter
Message:

refs #558. tests for Nan and infinity now occur before libs tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.5-stable/configure.ac

    r2027 r2040  
    123123AC_CONFIG_FILES([test/documentation_test.sh],
    124124                [chmod +x test/documentation_test.sh])
    125 
    126 # Save user-defined environment settings for later restoration
    127 APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
    128 APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
    129 APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
    130 
    131 # Checks for libraries.
    132 AC_MSG_NOTICE([checking for libraries])
    133 AC_CHECK_LIBM
    134 AS_IF([test "x$LIBM" != x], [LIBS="$LIBM $LIBS"])
    135 # searching for cblas. Priority 1) find a cblas library, 2) find ATLAS
    136 # generated cblas, and 3) fall back to GSL cblas implementation. If
    137 # partial ATLAS is detected the configure script fails.
    138 cblas_found="no"  # cblas_found may get values yes or no
    139 # atlas_found may get values yes, no, or partial. In some cases
    140 # partial atlas may be installed
    141 atlas_found="no"
    142 gslcblas_found="no" # gslcblas_found may get values yes or no
    143 AC_SEARCH_LIBS(cblas_sdsdot,cblas,cblas_found="yes",
    144   AC_SEARCH_LIBS(ATL_sdsdot,atlas,
    145     AC_SEARCH_LIBS(cblas_srot,cblas,atlas_found="yes",
    146                    atlas_found="partial",-m64),
    147       AC_SEARCH_LIBS(cblas_dswap,gslcblas,gslcblas_found="yes"),-m64),)
    148 
    149 # GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
    150 # Including AX_PATH_GSL macro from gsl.m4 distributed by GSL
    151 gsl_found="no"
    152 gsl_version="1.8"
    153 AC_SUBST(gsl_version)
    154 AX_PATH_GSL([${gsl_version}],[gsl_found="yes"],[gsl_version_check="no"])
    155 if test "$gsl_found" = "yes"; then
    156    LIBS="-lgsl $LIBS"
    157    # grep words starting with '-L' in other words LDFLAGS
    158    for i in $GSL_LIBS; do
    159        if test ${i:0:2} = "-L"; then
    160            YAT_LD_ADD_FLAG([LDFLAGS], [$i])
    161        fi
    162    done
    163    YAT_CPP_ADD_FLAG([CPPFLAGS], [`$GSL_CONFIG --cflags`])
    164 fi
    165 
    166 # Boost http://www.boost.org
    167 boost_version=1.33
    168 AC_SUBST(boost_version)
    169 AX_BOOST_BASE(["$boost_version"])
    170 boost_version_check=$succeeded;
    171 YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
    172 
    173 #support for large files
    174 AC_SYS_LARGEFILE
    175 if test "$enable_largefile" = "no"; then
    176   AC_DEFINE([YAT_LFS_DISABLED], 1,
    177             [defined to 1 if large file support is disabled])
    178 fi
    179 
    180 # we use AM_* for variables that are solely needed for building yat,
    181 # i.e., they are not needed for a user of yat and are not propagated
    182 # to yat-config or yat.m4.
    183 YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-Wall -pedantic])
    184 YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DHAVE_INLINE=1])
    185 AC_ARG_ENABLE([debug],
    186   [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
    187 if test "${enable_debug}" = "yes" ; then
    188   YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DYAT_DEBUG=1])
    189   YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-g -O])
    190 else
    191   YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DGSL_RANGE_CHECK_OFF -DNDEBUG])
    192   YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-O3])
    193 fi
    194 
    195 AC_ARG_ENABLE([svn-support],
    196               [AS_HELP_STRING([--enable-svn-support],
    197                               [enable svn support - used by yat maintainer])])
    198 
    199 if test "x$enable_svn-support" = "xyes"; then
    200   svn_error_msg="svn support cannot be enabled:"
    201   AS_IF([test "x$MD5" = "xno"],
    202         [AC_MSG_ERROR([$svn_error_msg tool to create md5 file not found])])
    203 
    204   AC_CHECK_FILE([$srcdir/.svn], ,
    205                 AC_MSG_ERROR([$svn_error_msg `$srcdir' is not an svn wc.]))
    206   AC_PATH_PROG([PERL], [perl], [no])
    207   if test "x$PERL" = "xno"; then
    208     AC_MSG_ERROR([$svn_error_msg perl executable not found.])
    209   fi
    210   AC_PROG_PERL_MODULES([strict Cwd File::Path Getopt::Long Pod::Usage], ,
    211          [AC_MSG_ERROR([$svn_error_msg missing some perl module.])])
    212 fi
    213 AM_CONDITIONAL([ENABLE_SVN_SUPPORT], [test "x$enable_svn_support" = "xyes"])
    214 
    215125
    216126# check for quiet_NaN support in OS
     
    283193                  [AC_MSG_RESULT([no])] )
    284194
     195# Save user-defined environment settings for later restoration
     196APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
     197APR_SAVE_THE_ENVIRONMENT(CXXFLAGS)
     198APR_SAVE_THE_ENVIRONMENT(LDFLAGS)
     199
     200# Checks for libraries.
     201AC_MSG_NOTICE([checking for libraries])
     202AC_CHECK_LIBM
     203AS_IF([test "x$LIBM" != x], [LIBS="$LIBM $LIBS"])
     204# searching for cblas. Priority 1) find a cblas library, 2) find ATLAS
     205# generated cblas, and 3) fall back to GSL cblas implementation. If
     206# partial ATLAS is detected the configure script fails.
     207cblas_found="no"  # cblas_found may get values yes or no
     208# atlas_found may get values yes, no, or partial. In some cases
     209# partial atlas may be installed
     210atlas_found="no"
     211gslcblas_found="no" # gslcblas_found may get values yes or no
     212AC_SEARCH_LIBS(cblas_sdsdot,cblas,cblas_found="yes",
     213  AC_SEARCH_LIBS(ATL_sdsdot,atlas,
     214    AC_SEARCH_LIBS(cblas_srot,cblas,atlas_found="yes",
     215                   atlas_found="partial",-m64),
     216      AC_SEARCH_LIBS(cblas_dswap,gslcblas,gslcblas_found="yes"),-m64),)
     217
     218# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
     219# Including AX_PATH_GSL macro from gsl.m4 distributed by GSL
     220gsl_found="no"
     221gsl_version="1.8"
     222AC_SUBST(gsl_version)
     223AX_PATH_GSL([${gsl_version}],[gsl_found="yes"],[gsl_version_check="no"])
     224if test "$gsl_found" = "yes"; then
     225   LIBS="-lgsl $LIBS"
     226   # grep words starting with '-L' in other words LDFLAGS
     227   for i in $GSL_LIBS; do
     228       if test ${i:0:2} = "-L"; then
     229           YAT_LD_ADD_FLAG([LDFLAGS], [$i])
     230       fi
     231   done
     232   YAT_CPP_ADD_FLAG([CPPFLAGS], [`$GSL_CONFIG --cflags`])
     233fi
     234
     235# Boost http://www.boost.org
     236boost_version=1.33
     237AC_SUBST(boost_version)
     238AX_BOOST_BASE(["$boost_version"])
     239boost_version_check=$succeeded;
     240YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
     241
     242#support for large files
     243AC_SYS_LARGEFILE
     244if test "$enable_largefile" = "no"; then
     245  AC_DEFINE([YAT_LFS_DISABLED], 1,
     246            [defined to 1 if large file support is disabled])
     247fi
     248
     249# we use AM_* for variables that are solely needed for building yat,
     250# i.e., they are not needed for a user of yat and are not propagated
     251# to yat-config or yat.m4.
     252YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-Wall -pedantic])
     253YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DHAVE_INLINE=1])
     254AC_ARG_ENABLE([debug],
     255  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
     256if test "${enable_debug}" = "yes" ; then
     257  YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DYAT_DEBUG=1])
     258  YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-g -O])
     259else
     260  YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DGSL_RANGE_CHECK_OFF -DNDEBUG])
     261  YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-O3])
     262fi
     263
     264AC_ARG_ENABLE([svn-support],
     265              [AS_HELP_STRING([--enable-svn-support],
     266                              [enable svn support - used by yat maintainer])])
     267
     268if test "x$enable_svn-support" = "xyes"; then
     269  svn_error_msg="svn support cannot be enabled:"
     270  AS_IF([test "x$MD5" = "xno"],
     271        [AC_MSG_ERROR([$svn_error_msg tool to create md5 file not found])])
     272
     273  AC_CHECK_FILE([$srcdir/.svn], ,
     274                AC_MSG_ERROR([$svn_error_msg `$srcdir' is not an svn wc.]))
     275  AC_PATH_PROG([PERL], [perl], [no])
     276  if test "x$PERL" = "xno"; then
     277    AC_MSG_ERROR([$svn_error_msg perl executable not found.])
     278  fi
     279  AC_PROG_PERL_MODULES([strict Cwd File::Path Getopt::Long Pod::Usage], ,
     280         [AC_MSG_ERROR([$svn_error_msg missing some perl module.])])
     281fi
     282AM_CONDITIONAL([ENABLE_SVN_SUPPORT], [test "x$enable_svn_support" = "xyes"])
     283
     284
    285285# yat specific settings
    286286YAT_LIBNAME="yat"
Note: See TracChangeset for help on using the changeset viewer.