1 | ## Process this file with autoconf to produce a configure script. |
---|
2 | ## |
---|
3 | ## $Id: configure.ac 572 2006-04-06 20:20:17Z 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 | |
---|
34 | AC_PREREQ(2.57) |
---|
35 | AC_INIT([[c++_tools]],[0.1],[jari@thep.lu.se]) |
---|
36 | AC_CONFIG_SRCDIR([lib/gslapi/matrix.h]) |
---|
37 | AC_CONFIG_AUX_DIR([autotools]) |
---|
38 | AC_PREFIX_DEFAULT([/usr/local]) |
---|
39 | |
---|
40 | AM_CONFIG_HEADER([config.h]) |
---|
41 | AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION,$PACKAGE_BUGREPORT) |
---|
42 | |
---|
43 | # Checks for programs. |
---|
44 | AC_PROG_CXX |
---|
45 | AC_PROG_INSTALL |
---|
46 | #AC_PROG_RANLIB |
---|
47 | |
---|
48 | # Checks for libraries. |
---|
49 | |
---|
50 | # Checks for header files. |
---|
51 | AC_CHECK_HEADERS([unistd.h]) |
---|
52 | |
---|
53 | # Checks for typedefs, structures, and compiler characteristics. |
---|
54 | AC_HEADER_STDBOOL |
---|
55 | AC_C_CONST |
---|
56 | AC_C_INLINE |
---|
57 | AC_TYPE_SIZE_T |
---|
58 | |
---|
59 | # Checks for library functions. |
---|
60 | AC_PROG_LIBTOOL |
---|
61 | AC_FUNC_ERROR_AT_LINE |
---|
62 | AC_HEADER_STDC |
---|
63 | AC_CHECK_FUNCS([pow sqrt]) |
---|
64 | |
---|
65 | LOCAL_INCLUDES="-I/home/lev/jari/local/include" |
---|
66 | LDFLAGS="-L/home/lev/jari/local/lib" |
---|
67 | CXXFLAGS="-g -O -Wall -pedantic" |
---|
68 | CPPFLAGS="-DHAVE_INLINE=1" |
---|
69 | # Use these flags when compiling a production library |
---|
70 | #CXXFLAGS="-O3 -Wall -pedantic" |
---|
71 | #CPPFLAGS="-DNDEBUG -DGSL_RANGE_CHECK_OFF -DHAVE_INLINE=1" |
---|
72 | AC_SUBST([LOCAL_INCLUDES]) |
---|
73 | |
---|
74 | AC_CHECK_LIB(m,main,[MATH_LIB="-lm" LIBS="-lm $LIBS"]) |
---|
75 | AC_CHECK_LIB(atlas,ATL_ctrsv, |
---|
76 | [CBLAS_LIB="-lcblas -latlas"], |
---|
77 | AC_CHECK_LIB(gslcblas,cblas_sdsdot, \ |
---|
78 | [CBLAS_LIB="-lgslcblas" LIBS="-lgslcblas $LIBS"])) |
---|
79 | AC_CHECK_LIB(gsl,main,[GSL_LIB="-lgsl"]) |
---|
80 | AC_SUBST(GSL_LIB) |
---|
81 | AC_SUBST(CBLAS_LIB) |
---|
82 | AC_SUBST(MATH_LIB) |
---|
83 | |
---|
84 | # c++_tools specific settings |
---|
85 | |
---|
86 | CPP_TOOLS_LIB="libc++_tools.la" |
---|
87 | CPP_TOOLS_LIB_LOCATION="lib" |
---|
88 | CPP_TOOLS_HEADER_LOCATION="lib" |
---|
89 | AC_SUBST(CPP_TOOLS_LIB) |
---|
90 | AC_SUBST(CPP_TOOLS_LIB_LOCATION) |
---|
91 | AC_SUBST(CPP_TOOLS_HEADER_LOCATION) |
---|
92 | |
---|
93 | AC_CONFIG_FILES([Makefile |
---|
94 | doc/Makefile |
---|
95 | lib/Makefile |
---|
96 | lib/gslapi/Makefile |
---|
97 | lib/random/Makefile |
---|
98 | lib/utility/Makefile |
---|
99 | lib/statistics/Makefile |
---|
100 | lib/classifier/Makefile |
---|
101 | test/Makefile]) |
---|
102 | |
---|
103 | AC_OUTPUT |
---|
104 | |
---|