Autoconf macros
These macros test for particular system featutres that rheolef uses. These tests print the messages telling the user which feature they are looking for and what they find. They cache their results for future configure runs. Some of these macros set some shell variable, defines some output variables for the `config.h' header, or performs Makefile macros subsitutions. See autoconf documentation for how to use such variables.
Follows a list of particular check required for a successfull installation.
RHEO_CHECK_GINAC
Check to see if GiNaC library exists. If so, set the shell variable rheo_have_ginac to "yes", defines HAVE_GINAC and substitues INCLUDES_GINAC and LADD_GINAC for adding in CFLAGS and LIBS, respectively, If not, set the shell variable rheo_have_ginac to "no".
RHEO_CHECK_CLN
Check to see if library -lcln exists. If so, set the shell variable rheo_have_cln to "yes", defines HAVE_CLN and substitues INCLUDES_CLN and LADD_CLN for adding in CFLAGS and LIBS, respectively, If not, set the shell variable no "no". Includes and libraries path are searched from a given shell variable rheo_dir_cln. This shell variable could be set for instance by an appropriate --with-cln=value_dir_cln option. The default value is /usr/local/math.
RHEO_CHECK_SPOOLES_2_0
Check to see if spooles library has old version 2.0 since FrontMtx_factorInpMtx profile has changed in version 2.2. If so, defines HAVE_SPOOLES_2_0. This macro is called by RHEO_CHECK_SPOOLES.
RHEO_CHECK_TAUCS
Check to see if taucs library and headers exists. If so, set the shell variable "rheo_have_taucs" to "yes", defines HAVE_TAUCS and substitues INCLUDES_TAUCS and LADD_TAUCS for adding in CXXFLAGS and LIBS, respectively, If not, set the shell variable to "no". Includes and libraries options are given shell variable $rheo_ldadd_taucs and $rheo_incdir_taucs. These shell variables could be set for instance by appropriates "--with-taucs-ldadd="'rheo_ldadd_taucs' and "--with-taucs-includes="'rheo_incdir_taucs' options.
RHEO_CHECK_BOOST_UBLAS
Check to see if boost headers exists. If so, set the shell variable "rheo_have_boost" to "yes", defines HAVE_BOOST and substitues INCLUDES_BOOST for adding in CXXFLAGS, and LDADD_BOOST for adding in LIBS. If not, set the shell variable to "no". Includes options are given in the shell variables $rheo_incdir_boost and $rheo_libdir_boost. These shell variables could be set for instance by appropriates "--with-boost-includes="'rheo_incdir_boost' and "--with-boost-libdir="'rheo_libdir_boost' options.
RHEO_CHECK_ZLIB
Check to see if zlib library and headers exists. If so, set the shell variable "rheo_have_zlib" to "yes", defines HAVE_ZLIB and substitues INCLUDES_ZLIB and LADD_ZLIB for adding in CXXFLAGS and LIBS, respectively, If not, set the shell variable to "no". Includes and libraries path are searched from given shell variable $rheo_dir_zlib/lib and $rheo_incdir_zlib. Default value for $rheo_incdir_zlib is $rheo_dir_zlib/include. These shell variables could be set for instance by appropriates "--with-zlib="'dir_zlib' and "--with-zlib-includes="'incdir_zlib' options.
RHEO_CHECK_SPOOLES
Check to see if spooles library and headers exists. If so, set the shell variable "rheo_have_spooles" to "yes", defines HAVE_SPOOLES and substitues INCLUDES_SPOOLES and LADD_SPOOLES for adding in CXXFLAGS and LIBS, respectively, If not, set the shell variable to "no". Includes and libraries path are searched from given shell variable "rheo_libdir_spooles" and "rheo_incdir_spooles". These shell variables could be set for instance by appropriates "--with-spooles="'libdir_spooles' and "--with-spooles-includes="'incdir_spooles' options.
RHEO_CHECK_UMFPACK
Check to see if umfpack library and headers exists. If so, set the shell variable "rheo_have_umfpack" to "yes", defines HAVE_UMFPACK and substitues INCLUDES_UMFPACK and LADD_UMFPACK for adding in CXXFLAGS and LIBS, respectively, If not, set the shell variable to "no". Includes and libraries path are searched from given shell variable "rheo_libdir_umfpack" and "rheo_incdir_umfpack". These shell variables could be set for instance by appropriates "--with-umfpack="'libdir_umfpack' and "--with-umfpack-includes="'incdir_umfpack' options.
RHEO_CHECK_MALLOC_DBG
Check to see if malloc debug library -lmalloc_dbg and corresponding header <malloc_dbg.h> exists. If so, set the shell variable rheo_have_malloc_dbg to "yes", defines HAVE_MALLOC_DBG, add -Idir_malloc_dbg/include to CFLAGS, add dir_malloc_dbg/lib/libmalloc_dbg.a to LIBS. Here, dir_malloc_dbg is the directory such that dir_malloc_dbg/bin appears in PATH and the command dir_malloc_dbg/bin/malloc_dbg exists. If not, set the variable to "no". Set also LIBS_MALLOC_DBG to these flags.
RHEO_CHECK_DMALLOC
Check whether the dmalloc package exists and set the corresponding shell value "rheo_have_dmalloc" and HAVE_DMALLOC (in Makefile.am and config.h) accordingly, create LDADD_DMALLOC and LDADD_DMALLOCXX Makefile.am variables.
RHEO_CHECK_NAMESPACE
Check whether the namespace feature is supported by the C++ compiler. value. So, try to compile the following code:
namespace computers { struct keyboard { int getkey() const { return 0; } }; } namespace music { struct keyboard { void playNote(int note); }; } namespace music { void keyboard::playNote(int note) { } } using namespace computers; int main() { keyboard x; int z = x.getkey(); music::keyboard y; y.playNote(z); return 0; }
If it compile, set the corresponding shell variable "rheo_have_namespace" to "yes" and defines HAVE_NAMESPACE. If not, set the variable no "no".
RHEO_CHECK_STD_NAMESPACE
Some compilers (e.g. GNU C++ 2.7.2) does not support the full namespace feature. Nevertheless, they support the "std:" namespace for the C++ library. is supported by the C++ compiler. The following code is submitted to the compiler:
#include<vector.h> extern "C" void exit(int); int main() { std::vector<int> x(3); return 0; }
If it compile, set the corresponding shell variable "rheo_have_std_namespace" to "yes" and defines HAVE_STD_NAMESPACE. If not, set the variable no "no".
RHEO_PROG_GNU_MAKE
Find command make and check whether make is GNU make. If so, set the corresponding shell variable "rheo_prog_gnu_make" to "yes" and substitues no_print_directory_option to "--no-print-directory". If not, set the shell variable no "no".
RHEO_CHECK_ISTREAM_RDBUF
RHEO_CHECK_IOS_BP
Check to see if "iostream::rdbuf(void*)" function exists, that set the "ios" buffer of a stream. Despite this function is standard, numerous compilers does not furnish it. a common implementation is to set directly the buffer variable. For instance, the CRAY C++ compiler implements this variable as "ios::bp". These two functions set the shell variables "rheo_have_istream_rdbuf" and "rheo_have_ios_bp" and define HAVE_ISTREAM_RDBUF and HAVE_IOS_BP respectively.
RHEO_CHECK_IOS_SETSTATE
Check to see if "ios::setstate(long)" function exists, that set the "ios" state variable of a stream. Despite this function is standard, numerous compilers does not furnish it. a common implementation is to set directly the buffer variable. For instance, the CRAY C++ compiler does not implements it. This function set the shell variables "rheo_have_ios_setstate" and define HAVE_IOS_SETSTATE.
RHEO_CHECK_FILEBUF_INT
RHEO_CHECK_FILEBUF_FILE
RHEO_CHECK_FILEBUF_FILE_MODE
Check wheter "filebuf::filebuf(int fileno)", "filebuf::filebuf(FILE* fd)" exist, or "filebuf::filebuf(FILE* fd, ios::openmode)" exist, respectively. If so, set the corresponding shell variable "rheo_have_filebuf_int" (resp. "rheo_have_filebuf_file") to "yes" and defines HAVE_FILEBUF_INT, (resp. HAVE_FILEBUF_FILE). If not, set the variable no "no". Notes that there is no standardisation of this function in the "c++" library. Nevertheless, this fonctionality is usefull to open a pipe stream class, as "pstream(3)".
RHEO_CHECK_GETTIMEOFDAY
Check whether the "gettimeofday(timeval*, timezone*)" function exists and set the corresponding shell value "rheo_have_gettimeofday" and define HAVE_GETTIMEOFDAY accordingly.
RHEO_CHECK_WIERDGETTIMEOFDAY
This is for Solaris, where they decided to change the CALLING SEQUENCE OF gettimeofday! Check whether the "gettimeofday(timeval*)" function exists and set the corresponding shell value "rheo_have_wierdgettimeofday" and define HAVE_WIERDGETTIMEOFDAY accordingly.
RHEO_CHECK_BSDGETTIMEOFDAY
For BSD systems, check whether the "BSDgettimeofday(timeval*, timezone*)" function exists and set the corresponding shell value "rheo_have_bsdgettimeofday" and define HAVE_BSDGETTIMEOFDAY accordingly.
RHEO_CHECK_AMICCLK
Check whether the clock "amicclk()" function exists and set the corresponding shell value "rheo_have_amicclk" and define HAVE_AMICCLK accordingly.
RHEO_CHECK_TEMPLATE_FULL_SPECIALIZATION
Check whether the template specialization syntax "template<>" is supported by the compiler value. So, try to compile, run and check the return value for the following code:
template<class T> struct toto { int tutu() const { return 1; } }; template<> struct toto<float> { int tutu() const { return 0; } }; main() { toto<float> x; return x.tutu(); }
If so, set the corresponding shell variable "rheo_have_template_full_specialization" to "yes" and defines HAVE_TEMPLATE_FULL_SPECIALIZATION. If not, set the variable no "no".
RHEO_CHECK_ISNAN_DOUBLE
RHEO_CHECK_ISINF_DOUBLE
RHEO_CHECK_FINITE_DOUBLE
RHEO_CHECK_INFINITY
RHEO_CHECK_ABS_DOUBLE
RHEO_CHECK_SQR_DOUBLE
Check whether the funtions
bool isnan(double); bool isinf(double); bool finite(double); double infinity(); double abs(); double sqr();
are supported by the compiler, respectively. If so, set the corresponding shell variable "rheo_have_xxx" to "yes" and defines HAVE_XXX. If not, set the variable no "no".
RHEO_CHECK_FLEX
Check to see if the "flex" command and the corresponding header "FlexLexer.h" are available. If so, set the shell variable "rheo_have_flex" to "yes" and substitues FLEX to "flex" and FLEXLEXER_H to the full path for FlexLexer.h If not, set the shell variable no "no".
RHEO_PROG_CC_INTEL
Check wheter we are using INTEL C++ compiler. If so, set the shell variable "ac_cv_prog_icc" to "yes" and define HAVE_INTEL_CXX. If not, set the shell variable no "no". The shell variable is also exported for sub-shells, such as ltconfig from libtool.
RHEO_RECOGNIZE_CXX
Check wheter we are able to recognize the C++ compiler. Tested compilers:
The GNU C++ compiler that defines: __GNUC__ (egcs-1.1.1) The INTEL C++ compiler that defines: __ICC (ICPC-12)
If so, substitue RECOGNIZED_CXX to a specific compiler's rule file, e.g, {}"$top_srcdir/config/gnu_cxx.mk", for a subsequent Makefile include. If not, substitue to "/dev/null". Substitutes also EXTRA_LDFLAGS. Raw cc is the C compiler associated to the C++ one. By this way C and C++ files are handled with a .c suffix. Special C files that requiere the cc compiler, such as "alloca.c" use some specific makefile rule.
usage example:
AC_PROG_CC(gcc cc icc cl) AC_PROG_CXX(c++ g++ cxx icpc KCC CC CC cc++ xlC aCC) RHEO_RECOGNIZE_CXX
RHEO_GXX2011_PRE
Check for the "-std=c++0x" support for g++. Requires a recent version of the GNU C++ compiler (>= 4.5).
RHEO_GXX2011
Check for the "-std=c++11" support for g++. Requires a recent version of the GNU C++ compiler (>= 4.7).
RHEO_OPTIMIZE_CXX
Set some optimization flags associated to the recognized C++ compiler and platform.
RHEO_CHECK_LATEX_HYPEREF
Check whether the hyperref LaTeX package exists and set the corresponding shell value "rheo_have_latex_hyperref" and HAVE_LATEX_HYPEREF (for Makefiles) accordingly.
RHEO_CHECK_MPI
Check for the "mpirun" command, the corresponding header "mpi.h" and library "-lmpi" are available. If so, set the shell variable "rheo_have_mpi" to "yes", and substitues MPIRUN to "mpirun" and RUN to "mpirun -np 2", INCLUDES_MPI and LDADD_MPI. If not, set the shell variable no "no".
RHEO_CHECK_PARMETIS
Check for the "parmetis" and "metis" libraries. Defines HAVE_PARMETIS and substitues INCLUDES_PARMETIS and LDADD_PARMETIS. Requires the MPI library.
RHEO_CHECK_SCOTCH
Check for the "scotch" distributed mesh partitioner libraries. Defines HAVE_SCOTCH and substitues INCLUDES_SCOTCH and LDADD_SCOTCH. Requires the MPI library.
RHEO_CHECK_BOOST
Check for the "boost" library. Defines HAVE_BOOST and substitues LDADD_BOOST and INCLUDES_BOOST.
RHEO_CHECK_BLAS
Check for the "blas" basic linear algebra subroutines library. Defines HAVE_BLAS and substitues LDADD_BLAS and INCLUDES_BLAS.
RHEO_CHECK_SCALAPACK
Check for the "scalapack" basic linear algebra subroutines library. Defines HAVE_SCALAPACK and substitues LDADD_SCALAPACK and INCLUDES_SCALAPACK.
RHEO_CHECK_TRILINOS
Check for the "trilinos" distributed preconditioner libraries. Defines HAVE_TRILINOS and substitues INCLUDES_TRILINOS and LDADD_TRILINOS. Requires the MPI and SCOTCH libraries.
RHEO_CHECK_PASTIX
Check for the "pastix" sequential or distributed direct solver libraries, depending on the "rheo_use_distributed" shell variable. Defines HAVE_PASTIX and substitues INCLUDES_PASTIX and LDADD_PASTIX.
RHEO_CHECK_MUMPS
Check for the "mumps" distributed direct solver libraries. Defines HAVE_MUMPS and substitues INCLUDES_MUMPS and LDADD_MUMPS. Requires the MPI and SCOTCH libraries.
RHEO_CHECK_STD_INITIALIER_LIST
Some compilers (e.g. GNU C++ 4.4.x) does not support the std::initializer_list feature. Set the corresponding shell variable "rheo_have_std_initializer_list" to "yes" and defines HAVE_STD_INITIALIZER_LIST. If not, set the variable no "no".
RHEO_CHECK_CGAL
Check for the "cgal" computational geometry library. Defines HAVE_CGAL and substitues INCLUDES_CGAL and LDADD_CGAL.
RHEO_DEBIAN_FIX_LIBTOOL
Fix rpath libtool issue for debian packaging. See also http://wiki.debian.org/RpathIssue