Changeset 71 for trunk/configure.ac


Ignore:
Timestamp:
May 3, 2004, 9:09:03 AM (17 years ago)
Author:
Jari Häkkinen
Message:

Started clean up of our autotools files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r9 r71  
    1 # $Id$
     1## Process this file with autoconf to produce a configure script.
     2##
     3## $Id$
     4##
     5## Author: Jari Hakkinen, jari@thep.lu.se
     6##
     7## Developers search for FIXME
     8##
     9## If you grabbed the source from CVS you should, at top-level, execute:
     10##  ./bootstrap
     11## or maybe one should use autoreconf! FIXME: Can the 'bootstrap'
     12## script be replaced with autoreconf?
    213
    3 AC_INIT(src)
    4 AC_CONFIG_AUX_DIR(autotools)
     14AC_PREREQ(2.57)
     15AC_INIT([[thep-c++_tools]],[0.1],[jari@thep.lu.se])
     16AC_CONFIG_SRCDIR([src/matrix.h])
     17AC_CONFIG_AUX_DIR([autotools])
     18AC_PREFIX_DEFAULT([/usr/local])
    519
    6 AM_CONFIG_HEADER(config.h)
    7 
    8 AM_INIT_AUTOMAKE(c++_tools,0.1,jari@thep.lu.se)
    9 
    10 AC_PREFIX_DEFAULT(/usr/local)
     20AM_CONFIG_HEADER([config.h])
     21AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION,$PACKAGE_BUGREPORT)
    1122
    1223# Checks for programs.
     
    1526AC_PROG_RANLIB
    1627
    17 ## BEGIN COMMON DENOMINATOR of DISTRIBUTION COMPILATION CFLAG
    18 ##
    19 ## variables used to pass to CFLAG:
    20 ## gcc_cflags       standard optimization flags
    21 ## gcc_cflags_cpu   cpu detection
    22 ## gcc_cflags_arch  architecture detection
     28# Checks for libraries.
    2329
    24 ## Tests if --enable-debug, --enable-warning or --enable-purify are given
    25 AC_ARG_ENABLE(debug,
    26 [  --enable-debug          debug (-g option on compiler)])
    27 if test "${enable_debug}" = "yes" ; then
    28   CFLAGS="-g"
    29 fi
    30 AC_ARG_ENABLE(warnings,
    31 [  --enable-warnings          warnings (-Wall option on compiler)])
    32 if test "${enable_warnings}" = "yes" ; then
    33   CFLAGS="$CFLAGS -Wall"
    34 fi
    35 AC_MSG_CHECKING(for purify)
    36 if(purify -version) < /dev/null > /dev/null 2>&1; then
    37    AC_MSG_RESULT(yes)
    38    AC_ARG_ENABLE(purify,
    39    [  --enable-purify          purify ])
    40    if test "${enable_purify}" = "yes" ; then
    41      CFLAGS="-g"
    42    fi         
    43 else
    44    AC_MSG_RESULT(no)
    45 fi
     30# Checks for header files.
     31AC_CHECK_HEADERS([unistd.h])
    4632
    47 CXXFLAGS="-O3 -Wall"
     33# Checks for typedefs, structures, and compiler characteristics.
     34AC_HEADER_STDBOOL
     35AC_C_CONST
     36AC_C_INLINE
     37AC_TYPE_SIZE_T
     38
     39# Checks for library functions.
     40AC_FUNC_ERROR_AT_LINE
     41AC_HEADER_STDC
     42AC_CHECK_FUNCS([pow sqrt])
     43
     44LDFLAGS="-L/home/max/jari/local/lib"
     45
     46CXXFLAGS="-O3 -Wall -DGSL_RANGE_CHECK_OFF"
    4847AC_SUBST(CXXFLAGS)
    4948
    50 # Misc libs, these should of course be set automatically
    51 CBLAS_LIB="-lcblas -latlas"
     49AC_CHECK_LIB(m,main,[MATH_LIB="-lm" LIBS="-lm $LIBS"])
     50AC_CHECK_LIB(atlas,ATL_ctrsv,
     51  [CBLAS_LIB="-lcblas -latlas"],
     52  AC_CHECK_LIB(gslcblas,cblas_sdsdot, \
     53    [CBLAS_LIB="-lgslcblas" LIBS="-lgslcblas $LIBS"]))
     54AC_CHECK_LIB(gsl,main,[GSL_LIB="-lgsl"])
     55AC_SUBST(GSL_LIB)
    5256AC_SUBST(CBLAS_LIB)
    53 GSL_LIB="-lgsl"
    54 AC_SUBST(GSL_LIB)
    55 GSLWRAP_LIB="-lgslwrap"
    56 AC_SUBST(GSLWRAP_LIB)
    57 MATH_LIB="-lm"
    5857AC_SUBST(MATH_LIB)
    5958
     
    6766AC_SUBST(CPP_TOOLS_HEADER_LOCATION)
    6867
    69 AC_OUTPUT([
    70   Makefile
    71   doc/Makefile
    72   src/Makefile
    73   test/Makefile
    74     ])
     68AC_CONFIG_FILES([Makefile
     69     doc/Makefile
     70     src/Makefile
     71     test/Makefile])
     72
     73AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.