Changeset 71


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

Started clean up of our autotools files.

Location:
trunk
Files:
3 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
  • trunk/src/Makefile.am

    r69 r71  
    1010  stl_utility SVD.cc SVM.cc vector.cc Wead.cc
    1111
    12 INCLUDES = -I/home/max/jari/local/include -I/usr/local_bio
    13 
    14 AM_CXXFLAGS = -g
     12INCLUDES = -I/home/max/jari/local/include
  • trunk/test/Makefile.am

    r58 r71  
    77test_rnd_SOURCES = test_rnd.cc
    88test_rnd_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    9     -L/usr/local_bio/lib -L/usr/local_bio/lib/Linux_P4SSE2 \
    109    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    1110
    1211test_pca_SOURCES = test_pca.cc
    1312test_pca_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    14     -L/usr/local_bio/lib -L/usr/local_bio/lib/Linux_P4SSE2 \
    1513    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    1614
    1715test_svd_SOURCES = test_svd.cc
    1816test_svd_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    19     -L/usr/local_bio/lib -L/usr/local_bio/lib/Linux_P4SSE2 \
    2017    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    2118
    2219test_kernel_SOURCES = test_kernel.cc
    2320test_kernel_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    24     -L/usr/local_bio/lib -L/usr/local_bio/lib/Linux_P4SSE2 \
    2521    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    2622
    2723test_svm_SOURCES = test_svm.cc
    2824test_svm_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    29     -L/usr/local_bio/lib -L/usr/local_bio/lib/Linux_P4SSE2 \
    3025    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    3126
    3227test_wead_SOURCES = test_wead.cc
    3328test_wead_LDADD = -L@top_srcdir@/$(CPP_TOOLS_LIB_LOCATION) $(CPP_TOOLS_LIB) \
    34     -L/home/max/jari/local/lib -L/home/max/jari/local/lib/Linux_ATHLONSSE1 \
    3529    $(GSL_LIB) $(CBLAS_LIB) $(MATH_LIB)
    3630
    3731INCLUDES = -I@top_srcdir@/$(CPP_TOOLS_HEADER_LOCATION) \
    38      -I/usr/local_bio/include
     32     -I/home/max/jari/local/include
    3933
    40 AM_CXXFLAGS = -g
    4134AM_LDFLAGS = -g
Note: See TracChangeset for help on using the changeset viewer.