root / branches / linbox-2.0.0 / configure.in

Revision 2879, 4.3 kB (checked in by pernet, 11 months ago)

:q!

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1AC_PREREQ(2.50)
2#AC_INIT(linbox/linbox.doxy)
3AC_INIT(linbox, 1.1.5,linbox-use@googlegroups.com)
4AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
5AM_CONFIG_HEADER([config.h])
6AX_PREFIX_CONFIG_H(linbox/linbox-config.h, __LINBOX)
7
8AM_MAINTAINER_MODE
9AM_DEP_TRACK
10AM_OUTPUT_DEPENDENCY_COMMANDS
11
12# Give a sane default for CFLAGS and CXXFLAGS
13# The sane thing is to define the flags differenly in tests, examples, interfaces, etc.  -bds
14#DEFAULT_CFLAGS="-O2 -Wall"
15
16CFLAGS=${CFLAGS:-$DEFAULT_CFLAGS}
17CXXFLAGS=${CXXFLAGS:-$DEFAULT_CFLAGS}
18
19AM_ACLOCAL_INCLUDE(macros)
20
21# work around to fix the backward compatibility issue of automake 1.10 with 1.9 (pb with MKDIR_P)
22AC_SUBST([MKDIR_P])
23AC_PROG_CC
24AC_PROG_CXX
25AC_STDC_HEADERS
26#AC_DISABLE_SHARED
27#AC_DISABLE_STATIC
28#AM_PROG_LIBTOOL
29# JGD 08.06.2004 : new name
30AC_PROG_LIBTOOL
31
32# Machine characteristics
33
34AC_CHECK_SIZEOF(char, 8)
35AC_CHECK_SIZEOF(short, 16)
36AC_CHECK_SIZEOF(int, 32)
37AC_CHECK_SIZEOF(long, 32)
38AC_CHECK_SIZEOF(long long, 64)
39AC_CHECK_SIZEOF(__int64, 64)
40
41# check endianness of the architecture
42AC_C_BIGENDIAN(
43  [AC_DEFINE(HAVE_BIG_ENDIAN, 1, [Define that architecture uses big endian storage])],
44  [AC_DEFINE(HAVE_LITTLE_ENDIAN, 1, [Define that architecture uses little endian storage])],
45  [])
46
47# Create some useful data types of fixed, known lengths
48
49# We hereby assume that a character is always one byte
50LINBOX_INT8="char";
51
52case $ac_cv_sizeof_char in
53  1)
54     TWO_BYTES=2;
55     FOUR_BYTES=4;
56     EIGHT_BYTES=8;
57     ;;
58  8)
59     TWO_BYTES=16;
60     FOUR_BYTES=32;
61     EIGHT_BYTES=64;
62esac
63
64case $TWO_BYTES in
65  $ac_cv_sizeof_short)
66     LINBOX_INT16="short";
67     ;;
68  $ac_cv_sizeof_int)
69     LINBOX_INT16="int";
70     ;;
71esac
72
73case $FOUR_BYTES in
74  $ac_cv_sizeof_short)
75     LINBOX_INT32="short";
76     ;;
77  $ac_cv_sizeof_int)
78     LINBOX_INT32="int";
79     ;;
80  $ac_cv_sizeof_long)
81     LINBOX_INT32="long";
82     ;;
83esac
84
85case $EIGHT_BYTES in
86  $ac_cv_sizeof_short)
87     LINBOX_INT64="short";
88     ;;
89  $ac_cv_sizeof_int)
90     LINBOX_INT64="int";
91     ;;
92  $ac_cv_sizeof_long)
93     LINBOX_INT64="long";
94     ;;
95  $ac_cv_sizeof_long_long)
96     LINBOX_INT64="long long";
97     ;;
98  $ac_cv_sizeof___int64)
99     LINBOX_INT64="__int64";
100     ;;
101esac
102
103AC_DEFINE_UNQUOTED(INT8, $LINBOX_INT8, Canonical 8-bit data type)
104AC_DEFINE_UNQUOTED(INT16, $LINBOX_INT16, Canonical 16-bit data type)
105AC_DEFINE_UNQUOTED(INT32, $LINBOX_INT32, Canonical 32-bit data type)
106AC_DEFINE_UNQUOTED(INT64, $LINBOX_INT64, Canonical 64-bit data type)
107
108# Feature checks
109LB_MISC
110LB_DRIVER
111
112AC_LANG_CPLUSPLUS
113LB_CHECK_GMP(,,[
114echo '*******************************************************************************'
115echo ' ERROR: GMP not found!'
116echo
117echo ' GMP version 3.1.1 or greater with --enable-cxx is required for this library to compile. Please'
118echo ' make sure GMP is installed and specify its location with the option'
119echo ' --with-gmp=<prefix> when running configure.'
120echo '*******************************************************************************'
121exit 1
122])
123
124LB_CHECK_NTL
125LB_CHECK_GIVARO
126LB_CHECK_SACLIB
127LB_CHECK_LIDIA
128LB_CHECK_MAPLE
129#LB_CHECK_ATLAS
130LB_CHECK_BLAS(,,[
131echo ''
132echo '*******************************************************************************'
133echo ' ERROR: BLAS not found!'
134echo
135echo ' BLAS routines are required for this library to compile. Please'
136echo ' make sure BLAS are installed and specify its location with the option'
137echo ' --with-blas=<lib> when running configure.'
138echo '*******************************************************************************'
139exit 1
140])
141LB_CHECK_EXPAT
142
143LB_OPT
144LB_DOC
145
146
147# this is bogus so far as I can tell.  -bds
148#CXXFLAGS="${GMP_CFLAGS} ${NTL_CFLAGS} ${GIVARO_CFLAGS} ${SACLIB_CFLAGS} ${CXXFLAGS}"
149#AC_SUBST(CXXFLAGS)
150
151AC_OUTPUT([
152Makefile
153linbox-config
154examples/Makefile
155examples/fields/Makefile
156examples/Readme-make
157gmp++/Makefile
158doc/Makefile
159linbox/Makefile
160linbox/algorithms/Makefile
161linbox/fflas/Makefile
162linbox/ffpack/Makefile
163linbox/blackbox/Makefile
164linbox/element/Makefile
165linbox/field/Makefile
166linbox/matrix/Makefile
167linbox/randiter/Makefile
168linbox/ring/Makefile
169linbox/solutions/Makefile
170linbox/switch/Makefile
171linbox/util/Makefile
172linbox/util/gmp++/Makefile
173linbox/util/formats/Makefile
174linbox/vector/Makefile
175tests/Makefile
176tests/data/Makefile
177interfaces/Makefile
178interfaces/driver/Makefile
179interfaces/maple/Makefile
180interfaces/kaapi/Makefile
181macros/Makefile
182])
Note: See TracBrowser for help on using the browser.