source: trunk/configure.ac @ 576

Last change on this file since 576 was 576, checked in by Jari Häkkinen, 15 years ago

lib changed to c++_tools

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id: configure.ac 576 2006-04-06 22:43:14Z jari $
4
5# Copyright (C) 2003 Jari Häkkinen
6# Copyright (C) 2005 Peter Johansson
7# Copyright (C) 2006 Jari Häkkinen
8#
9# This file is part of the thep c++ tools library,
10#                                http://lev.thep.lu.se/trac/c++_tools
11#
12# The c++ tools library is free software; you can redistribute it
13# and/or modify it under the terms of the GNU General Public License as
14# published by the Free Software Foundation; either version 2 of the
15# License, or (at your option) any later version.
16#
17# The c++ library is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25# 02111-1307, USA.
26#
27# Developers search for FIXME
28#
29# If you grabbed the source from CVS you should, at top-level, execute:
30# ./bootstrap
31# or maybe one should use autoreconf! FIXME: Can the 'bootstrap'
32# script be replaced with autoreconf?
33
34AC_PREREQ(2.57)
35AC_INIT([[c++_tools]],[0.1],[jari@thep.lu.se])
36AC_CONFIG_SRCDIR([c++_tools/gslapi/matrix.h])
37AC_CONFIG_AUX_DIR([autotools])
38AC_PREFIX_DEFAULT([/usr/local])
39
40AM_CONFIG_HEADER([config.h])
41AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION,$PACKAGE_BUGREPORT)
42
43# Checks for programs.
44AC_PROG_CXX
45AC_PROG_INSTALL
46#AC_PROG_RANLIB
47
48# Checks for libraries.
49
50# Checks for header files.
51AC_CHECK_HEADERS([unistd.h])
52
53# Checks for typedefs, structures, and compiler characteristics.
54AC_HEADER_STDBOOL
55AC_C_CONST
56AC_C_INLINE
57AC_TYPE_SIZE_T
58
59# Checks for library functions.
60AC_PROG_LIBTOOL
61AC_FUNC_ERROR_AT_LINE
62AC_HEADER_STDC
63AC_CHECK_FUNCS([pow sqrt])
64
65CXXFLAGS="-g -O -Wall -pedantic"
66CPPFLAGS="-DHAVE_INLINE=1"
67# Use these flags when compiling a production library
68#CXXFLAGS="-O3 -Wall -pedantic"
69#CPPFLAGS="-DNDEBUG -DGSL_RANGE_CHECK_OFF -DHAVE_INLINE=1"
70AC_SUBST([LOCAL_INCLUDES])
71
72AC_CHECK_LIB(m,main,[MATH_LIB="-lm" LIBS="-lm $LIBS"])
73AC_CHECK_LIB(atlas,ATL_ctrsv,
74  [CBLAS_LIB="-lcblas -latlas"],
75  AC_CHECK_LIB(gslcblas,cblas_sdsdot, \
76    [CBLAS_LIB="-lgslcblas" LIBS="-lgslcblas $LIBS"]))
77AC_CHECK_LIB(gsl,main,[GSL_LIB="-lgsl"])
78AC_SUBST(GSL_LIB)
79AC_SUBST(CBLAS_LIB)
80AC_SUBST(MATH_LIB)
81
82# c++_tools specific settings
83
84CPP_TOOLS_LIB="libc++_tools.la"
85CPP_TOOLS_LIB_LOCATION="c++_tools"
86CPP_TOOLS_HEADER_LOCATION="c++_tools"
87AC_SUBST(CPP_TOOLS_LIB)
88AC_SUBST(CPP_TOOLS_LIB_LOCATION)
89AC_SUBST(CPP_TOOLS_HEADER_LOCATION)
90
91AC_CONFIG_FILES([Makefile
92     c++_tools/Makefile
93     c++_tools/gslapi/Makefile
94     c++_tools/random/Makefile
95     c++_tools/utility/Makefile
96     c++_tools/statistics/Makefile
97     c++_tools/classifier/Makefile
98     doc/Makefile
99     test/Makefile])
100
101AC_OUTPUT
102
Note: See TracBrowser for help on using the repository browser.