Changeset 1060


Ignore:
Timestamp:
Feb 8, 2008, 11:51:34 PM (13 years ago)
Author:
Jari Häkkinen
Message:

Fixes #280

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1000 r1060  
    66# Copyright (C) 2004 Jari Häkkinen
    77# Copyright (C) 2005, 2006, 2007 Jari Häkkinen, Peter Johansson
     8# Copyright (C) 2008 Jari Häkkinen
    89#
    910# This file is part of the yat library, http://trac.thep.lu.se/yat
     
    5859# generated cblas, and 3) fall back to GSL cblas implementation. If
    5960# partial ATLAS is detected the configure script fails.
    60 AC_SEARCH_LIBS(cblas_sdsdot,cblas,,
    61   AC_SEARCH_LIBS(ATL_sdsdot,atlas,
    62     AC_SEARCH_LIBS(cblas_sdsdot,cblas,[CXXFLAGS="$CXXFLAGS -m64" LDFLAGS="$LDFLAGS -m64"],
    63       AC_MSG_ERROR(partial ATLAS library detected!),-m64),
    64                             AC_SEARCH_LIBS(cblas_dswap,gslcblas),-m64),)
    65 AC_CHECK_LIB(gsl,main)
     61cblas_found="no"  # cblas_found may get values yes or no
     62# atlas_found may get values yes, no, or partial. In some cases
     63# partial atlas may be installed
     64atlas_found="no"
     65gslcblas_found="no" # gslcblas_found may get values yes or no
     66AC_SEARCH_LIBS(cblas_sdsdot,cblas,cblas_found="yes",
     67  AC_SEARCH_LIBS(ATL_sdsdot,atlas,
     68    AC_SEARCH_LIBS(cblas_sdsdot,cblas,atlas_found="yes",
     69                   atlas_found="partial",-m64),
     70      AC_SEARCH_LIBS(cblas_dswap,gslcblas,gslcblas_found="yes"),-m64),)
     71if test ${atlas_found} = "yes"; then
     72  CXXFLAGS="$CXXFLAGS -m64" LDFLAGS="$LDFLAGS -m64"
     73fi
    6674
    6775# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
    6876# Including AM_PATH_GSL macro from gsl.m4 distributed by GSL
     77gsl_found="no"
     78gsl_version="1.6"
    6979sinclude(./build_support/gsl.m4)
    70 AM_PATH_GSL(1.6,,[AC_MSG_ERROR(could not find required version of GSL)])
     80AM_PATH_GSL(${gsl_version},gsl_found="yes",gsl_version_check="no")
     81if test "$gsl_found" = "yes"; then
     82  # Needed to set -lgsl
     83  AC_CHECK_LIB(gsl,main)
     84fi
    7185
    7286# Checks for header files.
     
    109123  [quiet_nan=no])
    110124AC_MSG_RESULT($quiet_nan)
    111 if test "${quiet_nan}" = "no" ; then
    112   AC_MSG_FAILURE([
    113     Support for quiet NAN required.
    114     Yat will not work on this system!])
    115 fi
    116125# At run-time, but this has the disadvantage that yat cannot be built 
    117126# for cross-compilation
     
    124133  [quiet_nan=no])
    125134AC_MSG_RESULT($quiet_nan)
    126 if test "${quiet_nan}" = "no" ; then
    127   AC_MSG_FAILURE([
    128     Support for quiet NAN required.
    129     Yat will not work on this system!])
    130 fi
    131135
    132136# yat specific settings
     
    147151     yat/utility/Makefile])
    148152
    149 AC_OUTPUT
    150 
    151153# Only warning about missing programs (needed for docs generation)
    152154# when in debug mode
    153155if (test "$enable_debug" == "yes"); then
    154    if (test "$HAVE_DOXYGEN" != "true") ; then
    155       AC_MSG_WARN([Doxygen was not found. Yat will compile and work
    156   without doxygen.  However, in order to enable
    157   generation of documentation, please install doxygen
    158   available at http://www.doxygen.org/])
    159    fi       
    160    if (test "$HAVE_LATEX" != "true") ; then
    161       AC_MSG_WARN([latex was not found. Yat will compile and work
    162   without latex. However, supporting documentation on
    163   statistics used in yat cannot be generated without
    164   latex.])
    165    fi       
    166    if (test "$HAVE_DVIPDFM" != "true") ; then
    167       AC_MSG_WARN([dvipdfm was not found. Yat will compile and work
    168   without dvipdfm. However, pdf document on statistics
    169   used in yat cannot be generated without dvipdfm.])
    170    fi       
    171    if (test "$HAVE_LATEX2HTML" != "true") ; then
    172       AC_MSG_WARN([latex2html was not found. Yat will compile and work
    173   without Latex. However, html document on statistics
    174   used in yat cannot be generated without latex.])
    175    fi       
    176 fi
     156if (test "$HAVE_DOXYGEN" != "true") ; then
     157  AC_MSG_WARN([
     158  Doxygen was not found. Yat will compile and work without doxygen.
     159  However, in order to enable generation of documentation, please
     160  install doxygen available at http://www.doxygen.org/
     161  ])
     162fi
     163if (test "$HAVE_LATEX" != "true") ; then
     164  AC_MSG_WARN([
     165  latex was not found. Yat will compile and work without latex.
     166  However, supporting documentation on statistics used in yat
     167  cannot be generated without latex.
     168  ])
     169fi
     170if (test "$HAVE_DVIPDFM" != "true") ; then
     171  AC_MSG_WARN([
     172  dvipdfm was not found. Yat will compile and work without dvipdfm.
     173  However, pdf document on statistics used in yat cannot be
     174  generated without dvipdfm.
     175  ])
     176fi
     177if (test "$HAVE_LATEX2HTML" != "true") ; then
     178  AC_MSG_WARN([
     179  latex2html was not found. Yat will compile and work without
     180  latex. However, html document on statistics used in yat cannot
     181  be generated without latex.
     182  ])
     183fi
     184fi
     185
     186# Print failure status information about selected items, and exit if
     187# fatal errors were encountered. No output will be created if
     188# configure is halted prematurely.
     189
     190# used to trigger exit before creation of output
     191all_reqs_ok="true"
     192
     193# No support for quiet NAN is fatal -- sub-sequent compilation, or execution
     194# of created binary, will fail.
     195if test "${quiet_nan}" = "no" ; then
     196  all_reqs_ok="false"
     197  AC_MSG_WARN([
     198  Support for quiet NAN required.
     199  Yat will not work on this system!])
     200fi
     201
     202# Non-existing BLAS is fatal -- sub-sequent compilation will fail.
     203if test "${cblas_found}" = "no" -a "${atlas_found}" = "no" -a "${gslcblas_found}" = "no"; then
     204  all_reqs_ok="false"
     205  AC_MSG_WARN([
     206  cBLAS not found. The C implementation of Basic Linear Algebra
     207  Subprograms (cBLAS) library cannot be found. Please make sure
     208  cBLAS is installed.])
     209fi
     210if test "${atlas_found}" = "partial"; then
     211  all_reqs_ok="false"
     212  AC_MSG_WARN([
     213  Partial ATLAS BLAS library found. Please repair your installation.])
     214fi
     215
     216# Non-existing GSL is fatal -- sub-sequent compilation will fail.
     217if test "${gsl_found}" = "no" ; then
     218  all_reqs_ok="false"
     219  if test "${gsl_version_check}" = "no" ; then
     220  AC_MSG_WARN([
     221  GSL found but not the required version. Please install
     222  GSL version ${gsl_version} or later])
     223  else
     224  AC_MSG_WARN([
     225  GSL not found. The GNU Scientific Library (GSL) library cannot be
     226  found. Please make sure GSL is installed.])
     227  fi
     228fi
     229
     230if (test "$all_reqs_ok" = "false") ; then
     231  AC_MSG_FAILURE([
     232  Some pre-requisites were not fulfilled, aborting configure.
     233  Please consult the 'README' file for more information about what
     234  is needed to compile yat and refer to above warning messages.
     235  Needed files were NOT created.])
     236fi
     237
     238# Create output.
     239AC_OUTPUT
    177240
    178241# Some more messages.
     
    187250AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
    188251AC_MSG_NOTICE([])
     252if test "${gslcblas_found}" = "yes"; then
     253AC_MSG_NOTICE([ GSL BLAS found. This is a reference implementation only.])
     254AC_MSG_NOTICE([ Consider using hardware optimized BLAS.])
     255AC_MSG_NOTICE([ ATLAS (http://math-atlas.sourceforge.net/) provides an])
     256AC_MSG_NOTICE([ optimized BLAS library. It is supported by yat!])
     257AC_MSG_NOTICE([])
     258fi
    189259AC_MSG_NOTICE([ Now type 'make ; make check'.])
Note: See TracChangeset for help on using the changeset viewer.