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