405
|
1 dnl configure.in |
|
2 dnl |
5
|
3 dnl Process this file with autoconf to produce a configure script. |
|
4 dnl |
7017
|
5 dnl Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
|
6 dnl 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton |
869
|
7 ### |
|
8 ### This file is part of Octave. |
|
9 ### |
|
10 ### Octave is free software; you can redistribute it and/or modify it |
|
11 ### under the terms of the GNU General Public License as published by the |
7016
|
12 ### Free Software Foundation; either version 3 of the License, or (at |
|
13 ### your option) any later version. |
869
|
14 ### |
|
15 ### Octave is distributed in the hope that it will be useful, but WITHOUT |
|
16 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
17 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
18 ### for more details. |
|
19 ### |
|
20 ### You should have received a copy of the GNU General Public License |
7016
|
21 ### along with Octave; see the file COPYING. If not, see |
|
22 ### <http://www.gnu.org/licenses/>. |
869
|
23 |
4587
|
24 ### Preserve CFLAGS and CXXFLAGS from the environment before doing |
|
25 ### anything else because we don't know which macros might call |
|
26 ### AC_PROG_CC or AC_PROG_CXX. |
|
27 |
|
28 EXTERN_CFLAGS="$CFLAGS" |
|
29 EXTERN_CXXFLAGS="$CXXFLAGS" |
|
30 |
3887
|
31 AC_INIT |
7054
|
32 AC_REVISION($Revision: 1.584 $) |
4531
|
33 AC_PREREQ(2.57) |
3887
|
34 AC_CONFIG_SRCDIR([src/octave.cc]) |
1146
|
35 AC_CONFIG_HEADER(config.h) |
869
|
36 |
5844
|
37 OCTAVE_HOST_TYPE |
|
38 |
3887
|
39 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
|
40 |
6090
|
41 dnl FIXME -- we should probably only generate this file if it is missing. |
|
42 ### Produce unistd.h for MSVC target, this simplifies changes in |
|
43 ### Octave source tree and avoid problems with lex-generated code. |
|
44 case "$canonical_host_type" in |
|
45 *-*-msdosmsvc) |
|
46 AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC]) |
|
47 cat << \EOF > unistd.h |
|
48 /* File generated by configure script. */ |
|
49 #include <direct.h> |
|
50 #include <io.h> |
|
51 #include <process.h> |
|
52 EOF |
|
53 CPPFLAGS="-I. $CPPFLAGS" |
|
54 ;; |
|
55 esac |
|
56 |
5098
|
57 AC_GNU_SOURCE |
|
58 |
3923
|
59 AC_AIX |
3887
|
60 AC_MINIX |
3923
|
61 AC_ISC_POSIX |
1667
|
62 |
5451
|
63 ### Path separator. |
|
64 sepchar=: |
|
65 AC_ARG_WITH(sepchar, |
5842
|
66 [AS_HELP_STRING([--with-sepchar=<char>], |
5844
|
67 [use <char> as the path separation character])]) |
5451
|
68 case $with_sepchar in |
|
69 yes | "") |
|
70 case "$canonical_host_type" in |
6090
|
71 *-*-mingw* | *-*-msdosmsvc) |
5451
|
72 sepchar=';' |
|
73 ;; |
|
74 esac |
|
75 ;; |
|
76 no) |
|
77 AC_MSG_ERROR([You are required to define a path separation character]) |
|
78 ;; |
|
79 *) |
|
80 sepchar=$with_sepchar |
|
81 ;; |
|
82 esac |
|
83 AC_SUBST(sepchar) |
|
84 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], [Define this to be the path separator for your system, as a character constant.]) |
|
85 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], [Define this to the path separator, as a string.]) |
|
86 |
2223
|
87 ### some defaults |
|
88 |
2813
|
89 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') |
|
90 OCTAVE_SET_DEFAULT(man1ext, '.1') |
|
91 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') |
3597
|
92 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') |
3029
|
93 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') |
2813
|
94 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') |
4449
|
95 OCTAVE_SET_DEFAULT(localapifcnfiledir, |
5778
|
96 '$(datadir)/octave/site/$(api_version)/m') |
3597
|
97 OCTAVE_SET_DEFAULT(localverfcnfiledir, '$(datadir)/octave/$(version)/site/m') |
3141
|
98 OCTAVE_SET_DEFAULT(octlibdir, '$(libdir)/octave-$(version)') |
3029
|
99 OCTAVE_SET_DEFAULT(archlibdir, |
3130
|
100 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') |
3029
|
101 OCTAVE_SET_DEFAULT(localarchlibdir, |
3130
|
102 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') |
5909
|
103 OCTAVE_SET_DEFAULT(localapiarchlibdir, |
|
104 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') |
3597
|
105 OCTAVE_SET_DEFAULT(localverarchlibdir, |
|
106 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') |
3029
|
107 OCTAVE_SET_DEFAULT(octfiledir, |
3130
|
108 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') |
3029
|
109 OCTAVE_SET_DEFAULT(localoctfiledir, |
3130
|
110 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') |
4449
|
111 OCTAVE_SET_DEFAULT(localapioctfiledir, |
5778
|
112 '$(libexecdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') |
3597
|
113 OCTAVE_SET_DEFAULT(localveroctfiledir, |
|
114 '$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)') |
3029
|
115 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') |
1667
|
116 |
2155
|
117 ### Make configure args available for other uses. |
|
118 |
|
119 config_opts=$ac_configure_args |
|
120 AC_SUBST(config_opts) |
|
121 |
869
|
122 ### Allow the user to force us to use f2c. |
|
123 |
832
|
124 AC_ARG_WITH(f2c, |
5844
|
125 [AS_HELP_STRING([--with-f2c], |
|
126 [use f2c even if Fortran compiler is available])], |
2813
|
127 [if test "$withval" = no; then use_f2c=false; else use_f2c=true; fi], |
1177
|
128 use_f2c=false) |
|
129 |
2813
|
130 ### Allow the user to force us to use f77. |
|
131 |
|
132 AC_ARG_WITH(f77, |
5844
|
133 [AS_HELP_STRING([--with-f77], [use f77 to compile Fortran subroutines])], |
2813
|
134 [if test "$withval" = no; then use_f77=false; else use_f77=true; fi], |
|
135 use_f77=false) |
|
136 |
|
137 ### Make sure only one of the above options for Fortran compilers was |
|
138 ### specified (multiple "no" or --without-FOO options are ok). |
|
139 |
|
140 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(f77, f2c, |
3105
|
141 [warn_f2c_and_f77="--with-f2c and --with-f77 both specified! Using f77..." |
|
142 AC_MSG_WARN($warn_f2c_and_f77) |
2813
|
143 use_f2c=false]) |
|
144 |
|
145 ### Make it possible to have Octave's array and matrix classes do bounds |
2108
|
146 ### checking on element references. This slows some operations down a |
2813
|
147 ### bit, so it is turned off by default. |
2108
|
148 |
2450
|
149 BOUNDS_CHECKING=false |
2108
|
150 AC_ARG_ENABLE(bounds-check, |
5844
|
151 [AS_HELP_STRING([--enable-bounds-check], |
|
152 [for internal array classes (default is no)])], |
3060
|
153 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) |
2108
|
154 if $BOUNDS_CHECKING; then |
3887
|
155 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) |
2108
|
156 fi |
|
157 |
5275
|
158 ### If possible, use a 64-bit integer type for array dimensions and indexing. |
|
159 |
|
160 USE_64_BIT_IDX_T=false |
|
161 OCTAVE_IDX_TYPE=int |
|
162 AC_ARG_ENABLE(64, |
5844
|
163 [AS_HELP_STRING([--enable-64], |
5857
|
164 [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])], |
5275
|
165 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], []) |
|
166 if $USE_64_BIT_IDX_T; then |
|
167 AC_CHECK_SIZEOF(void *) |
|
168 AC_CHECK_SIZEOF(int) |
|
169 AC_CHECK_SIZEOF(long) |
|
170 if test $ac_cv_sizeof_void_p -eq 8; then |
|
171 if test $ac_cv_sizeof_int -eq 8; then |
|
172 OCTAVE_IDX_TYPE=int |
|
173 elif test $ac_cv_sizeof_long -eq 8; then |
|
174 OCTAVE_IDX_TYPE=long |
5351
|
175 AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long]) |
5275
|
176 else |
5857
|
177 warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features" |
|
178 AC_MSG_WARN($warn_64_bit) |
5275
|
179 USE_64_BIT_IDX_T=false |
|
180 fi |
|
181 else |
|
182 warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features" |
|
183 AC_MSG_WARN($warn_64_bit) |
|
184 USE_64_BIT_IDX_T=false |
|
185 fi |
|
186 fi |
|
187 AC_SUBST(OCTAVE_IDX_TYPE) |
|
188 if $USE_64_BIT_IDX_T; then |
|
189 AC_DEFINE(USE_64_BIT_IDX_T, 1, [Define if using 64-bit integers for array dimensions and indexing]) |
|
190 fi |
|
191 AC_SUBST(USE_64_BIT_IDX_T) |
|
192 |
3215
|
193 ### It seems that there are some broken inline assembly functions in |
|
194 ### the GNU libc. Since I'm not sure how to test whether we are using |
|
195 ### GNU libc, just disable them for all platforms. |
|
196 |
5844
|
197 AC_MSG_NOTICE([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) |
3887
|
198 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) |
3215
|
199 |
869
|
200 ### See which C++ compiler to use (we expect to find g++). |
|
201 |
405
|
202 AC_PROG_CXX |
|
203 AC_PROG_CXXCPP |
869
|
204 |
|
205 ### Do special things for g++. |
|
206 |
2353
|
207 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ |
4368
|
208 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` |
3107
|
209 |
405
|
210 case "$gxx_version" in |
4368
|
211 1.* | 2.[[012345678]].*) |
4843
|
212 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave] |
|
213 ) |
|
214 ;; |
|
215 2.9*) |
|
216 warn_gxx_version="g++ version $gxx_version is likely to cause problems" |
|
217 AC_MSG_WARN($warn_gxx_version) |
3775
|
218 ;; |
405
|
219 esac |
869
|
220 |
1894
|
221 CXX_VERSION= |
|
222 if test -n "$gxx_version"; then |
|
223 CXX_VERSION="$gxx_version" |
|
224 fi |
|
225 AC_SUBST(CXX_VERSION) |
|
226 |
3107
|
227 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
3769
|
228 OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
5854
|
229 OCTAVE_CXX_BROKEN_REINTERPRET_CAST |
3107
|
230 |
3842
|
231 # Determine the ABI used the C++ compiler, needed by the dynamic loading |
|
232 # code. Currently supported ABIs are GNU v2, GNU v3 and Sun Workshop. |
|
233 |
|
234 OCTAVE_CXX_ABI |
|
235 |
869
|
236 ### See which C compiler to use (we expect to find gcc). |
|
237 |
5
|
238 AC_PROG_CC |
405
|
239 AC_PROG_CPP |
832
|
240 AC_PROG_GCC_TRADITIONAL |
869
|
241 |
|
242 ### Do special things for gcc. |
|
243 |
2353
|
244 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ |
3107
|
245 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
405
|
246 case "$gcc_version" in |
|
247 2.*) |
1087
|
248 if test -z "$LDFLAGS"; then |
|
249 LDFLAGS="-g" |
5844
|
250 AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS]) |
1087
|
251 fi |
405
|
252 ;; |
|
253 1.*) |
3105
|
254 warn_gcc_version="gcc version $gcc_version is likely to cause problems" |
|
255 AC_MSG_WARN($warn_gcc_version) |
405
|
256 ;; |
5
|
257 esac |
869
|
258 |
1894
|
259 CC_VERSION= |
|
260 if test -n "$gcc_version"; then |
|
261 CC_VERSION="$gcc_version" |
|
262 fi |
|
263 AC_SUBST(CC_VERSION) |
|
264 |
3775
|
265 ### The flag to create dependency varies depending on the compier. |
|
266 |
|
267 # Assume GCC. |
6087
|
268 INCLUDE_DEPS=true |
3775
|
269 DEPEND_FLAGS="-M" |
|
270 DEPEND_EXTRA_SED_PATTERN="" |
6087
|
271 if test "$GCC" = yes; then |
|
272 true |
|
273 else |
|
274 case "$canonical_host_type" in |
|
275 sparc-sun-solaris2* | i386-pc-solaris2*) |
3775
|
276 DEPEND_FLAGS="-xM1" |
|
277 DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" |
6087
|
278 ;; |
|
279 *) |
|
280 INCLUDE_DEPS=false |
|
281 ;; |
|
282 esac |
|
283 fi |
|
284 AC_SUBST(INCLUDE_DEPS) |
3775
|
285 AC_SUBST(DEPEND_FLAGS) |
|
286 AC_SUBST(DEPEND_EXTRA_SED_PATTERN) |
|
287 |
5076
|
288 ### On Intel systems with gcc, we may need to compile with -mieee-fp |
|
289 ### and -ffloat-store to get full support for IEEE floating point. |
2020
|
290 ### |
3126
|
291 ### On Alpha/OSF systems, we need -mieee. |
869
|
292 |
3126
|
293 ieee_fp_flag= |
350
|
294 case "$canonical_host_type" in |
6102
|
295 ## Keep this pattern first, so that it is preferred over the |
|
296 ## following pattern for x86. |
|
297 *-*-msdosmsvc) |
|
298 CXXFLAGS="$CXXFLAGS -EHs -MD" |
|
299 CFLAGS="$CFLAGS -MD" |
|
300 ;; |
3887
|
301 i[[3456789]]86-*-*) |
5076
|
302 if test "$GCC" = yes; then |
|
303 OCTAVE_CC_FLAG(-mieee-fp, [ |
|
304 ieee_fp_flag=-mieee-fp |
|
305 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" |
5844
|
306 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CFLAGS])]) |
3126
|
307 |
5078
|
308 ### OCTAVE_CC_FLAG(-ffloat-store, [ |
|
309 ### float_store_flag=-ffloat-store |
|
310 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" |
|
311 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) |
5076
|
312 fi |
|
313 if test "$GXX" = yes; then |
|
314 OCTAVE_CXX_FLAG(-mieee-fp, [ |
|
315 ieee_fp_flag=-mieee-fp |
|
316 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" |
5844
|
317 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CXXFLAGS])]) |
5076
|
318 |
5078
|
319 ### OCTAVE_CXX_FLAG(-ffloat-store, [ |
|
320 ### float_store_flag=-ffloat-store |
|
321 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" |
|
322 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) |
5076
|
323 fi |
324
|
324 ;; |
3127
|
325 alpha*-*-*) |
4284
|
326 if test "$GCC" = yes; then |
4812
|
327 OCTAVE_CC_FLAG(-mieee, [ |
|
328 ieee_fp_flag=-mieee |
|
329 XTRA_CFLAGS="$XTRA_CFLAGS -mieee" |
5844
|
330 AC_MSG_NOTICE([adding -mieee to XTRA_CFLAGS])]) |
5076
|
331 else |
|
332 OCTAVE_CC_FLAG(-ieee, [ |
|
333 ieee_fp_flag=-ieee |
|
334 XTRA_CFLAGS="$XTRA_CFLAGS -ieee" |
5844
|
335 AC_MSG_NOTICE([adding -ieee to XTRA_CFLAGS])]) |
5076
|
336 fi |
|
337 if test "$GXX" = yes; then |
4812
|
338 OCTAVE_CXX_FLAG(-mieee, [ |
|
339 ieee_fp_flag=-mieee |
|
340 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" |
5844
|
341 AC_MSG_NOTICE([adding -mieee to XTRA_CXXFLAGS])]) |
4284
|
342 else |
|
343 OCTAVE_CXX_FLAG(-ieee, [ |
|
344 ieee_fp_flag=-ieee |
|
345 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" |
5844
|
346 AC_MSG_NOTICE([adding -ieee to XTRA_CXXFLAGS])]) |
4284
|
347 fi |
2020
|
348 ;; |
3176
|
349 *ibm-aix4*) |
3351
|
350 OCTAVE_CC_FLAG(-mminimal-toc, [ |
|
351 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) |
3176
|
352 |
3351
|
353 OCTAVE_CXX_FLAG(-mminimal-toc, [ |
|
354 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) |
3176
|
355 ;; |
324
|
356 esac |
3126
|
357 |
|
358 AC_SUBST(XTRA_CFLAGS) |
|
359 AC_SUBST(XTRA_CXXFLAGS) |
869
|
360 |
1667
|
361 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
|
362 |
|
363 case "$canonical_host_type" in |
3127
|
364 alpha*-dec-osf1.3) |
1667
|
365 LD_STATIC_FLAG=-static |
|
366 ;; |
|
367 esac |
1679
|
368 if test -n "$LD_STATIC_FLAG"; then |
5844
|
369 AC_MSG_NOTICE([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) |
1679
|
370 fi |
|
371 AC_SUBST(LD_STATIC_FLAG) |
1667
|
372 |
3222
|
373 OCTAVE_CXX_PREPENDS_UNDERSCORE |
4094
|
374 |
|
375 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are |
|
376 ### the compilers that we use for building tools on the build system. |
4098
|
377 ### For now, we assume that the only cross compiling we can do is |
4298
|
378 ### with gcc on a Unixy system, but the dedicated hacker can override these. |
4094
|
379 |
|
380 if test "$cross_compiling" = yes; then |
|
381 BUILD_CC="gcc" |
|
382 BUILD_CFLAGS="-O2 -g" |
|
383 BUILD_CXX="g++" |
|
384 BUILD_CXXFLAGS="-O2 -g" |
4298
|
385 BUILD_LDFLAGS="" |
4098
|
386 BUILD_EXEEXT="" |
4094
|
387 else |
4298
|
388 BUILD_CC='$(CC)' |
|
389 BUILD_CFLAGS='$(CFLAGS)' |
|
390 BUILD_CXX='$(CXX)' |
|
391 BUILD_CXXFLAGS='$(CXXFLAGS)' |
|
392 BUILD_LDFLAGS='$(LDFLAGS)' |
4284
|
393 case "$canonical_host_type" in |
|
394 sparc-sun-solaris2*) |
|
395 if test "$GCC" != yes; then |
4298
|
396 ## The Sun C++ compiler never seems to complete compiling |
|
397 ## gendoc.cc unless we reduce the optimization level... |
|
398 BUILD_CXXFLAGS="-g -O1" |
4284
|
399 fi |
|
400 ;; |
|
401 esac |
4298
|
402 BUILD_EXEEXT='$(EXEEXT)' |
4094
|
403 fi |
|
404 |
|
405 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) |
|
406 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) |
|
407 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) |
|
408 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) |
4298
|
409 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) |
|
410 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) |
3222
|
411 |
3232
|
412 dnl This is bogus. We shouldn't have to explicitly add libc too! |
|
413 |
|
414 ### Look for math library. If found, this will add -lm to LIBS. |
|
415 |
|
416 case "$canonical_host_type" in |
|
417 *-*-nextstep*) |
|
418 ;; |
|
419 *-*-linux*) |
|
420 AC_CHECK_LIB(m, sin, , , -lc) |
|
421 ;; |
|
422 *) |
|
423 AC_CHECK_LIB(m, sin) |
|
424 ;; |
|
425 esac |
|
426 |
6823
|
427 ### Check for the QHull library |
|
428 AC_SUBST(QHULL_LIBS) |
|
429 AC_CHECK_HEADER(qhull/qhull_a.h, have_qhull=yes, have_qhull=no) |
|
430 if test "$have_qhull" = yes; then |
|
431 AC_CHECK_LIB(qhull, qh_qhull, have_qhull=yes, have_qhull=no) |
|
432 if test "$have_qhull" != yes; then |
|
433 AC_CHECK_QHULL_VERSION(have_qhull=yes, have_qhull=no) |
|
434 AC_DEFINE(NEED_QHULL_VERSION, 1, [Define if the QHull library needs a wh_version variable defined.]) |
|
435 fi |
|
436 fi |
|
437 if test "$have_qhull" = yes; then |
|
438 AC_DEFINE(HAVE_QHULL, 1, [Define if the QHull library is used.]) |
|
439 QHULL_LIBS="-lqhull" |
6855
|
440 TEXINFO_QHULL="@set HAVE_QHULL" |
6823
|
441 else |
|
442 warn_qhull="Qhull library not found --- This will result in loss of functionality of some geometry functions." |
|
443 AC_MSG_WARN($warn_qhull) |
|
444 fi |
|
445 |
6855
|
446 AC_SUBST(TEXINFO_QHULL) |
|
447 |
5585
|
448 ### Check for pcre/regex library. |
|
449 AC_SUBST(REGEX_LIBS) |
|
450 WITH_PCRE_CONFIG=no |
|
451 AC_CHECK_HEADER(pcre.h, WITH_PCRE=yes, WITH_PCRE=no) |
|
452 if test $WITH_PCRE = no ; then |
|
453 AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) |
|
454 if test $WITH_PCRE_CONFIG = yes ; then |
|
455 WITH_PCRE=yes |
|
456 fi |
|
457 fi |
6133
|
458 AC_CACHE_CHECK([whether pcre.h has the macros we need], |
|
459 [ac_cv_pcre_h_macros_present], |
|
460 [AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ |
|
461 #include <pcre.h> |
|
462 #if defined (PCRE_INFO_NAMECOUNT) \ |
|
463 && defined (PCRE_INFO_NAMEENTRYSIZE) \ |
|
464 && defined (PCRE_INFO_NAMETABLE) |
|
465 PCRE_HAS_MACROS_WE_NEED |
|
466 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) |
|
467 WITH_PCRE="$ac_cv_pcre_h_macros_present" |
5585
|
468 if test $WITH_PCRE = yes ; then |
|
469 AC_CHECK_LIB(pcre, pcre_compile, WITH_PCRE=yes, WITH_PCRE=no) |
|
470 if test $WITH_PCRE = yes ; then |
|
471 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) |
|
472 if test $WITH_PCRE_CONFIG = yes ; then |
|
473 REGEX_LIBS=`pcre-config --cflags --libs` |
|
474 else |
|
475 REGEX_LIBS="-lpcre" |
|
476 fi |
|
477 fi |
|
478 fi |
6133
|
479 if test $WITH_PCRE = no; then |
|
480 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." |
|
481 AC_MSG_WARN($warn_pcre) |
|
482 fi |
5585
|
483 AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ |
|
484 AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) |
|
485 if test $WITH_REGEX = yes ; then |
|
486 AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) |
5600
|
487 if test $WITH_PCRE = no ; then |
5585
|
488 AC_CHECK_FUNCS(regexec, REGEX_LIBS= , [ |
|
489 AC_CHECK_LIB(regex, regexec, REGEX_LIBS="-lregex")]) |
|
490 fi |
|
491 fi |
6133
|
492 if test $WITH_REGEX = no; then |
|
493 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." |
|
494 AC_MSG_WARN($warn_regex) |
|
495 fi |
5585
|
496 |
5270
|
497 ### Check for ZLIB library. |
3820
|
498 |
5270
|
499 WITH_ZLIB=true |
|
500 AC_ARG_WITH(zlib, |
5844
|
501 [AS_HELP_STRING([--without-zlib], [don't use zlib])], |
5270
|
502 with_zlib=$withval, with_zlib=yes) |
3820
|
503 |
5270
|
504 zlib_lib= |
|
505 if test "$with_zlib" = yes; then |
|
506 zlib_lib="z" |
|
507 elif test "$with_zlib" != no; then |
|
508 zlib_lib="$with_zlib" |
3687
|
509 fi |
|
510 |
5270
|
511 ZLIB_LIBS= |
|
512 WITH_ZLIB=false |
|
513 if test -n "$zlib_lib"; then |
5337
|
514 AC_CHECK_LIB($zlib_lib, gzclearerr, [ |
5270
|
515 AC_CHECK_HEADERS(zlib.h, [ |
|
516 WITH_ZLIB=true |
|
517 ZLIB_LIBS="-l$zlib_lib" |
|
518 LIBS="$ZLIB_LIBS $LIBS" |
|
519 AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available.])])]) |
|
520 fi |
|
521 |
|
522 if $WITH_ZLIB; then |
|
523 ### Check for HDF5 library. |
|
524 |
|
525 WITH_HDF5=true |
|
526 AC_ARG_WITH(hdf5, |
5844
|
527 [AS_HELP_STRING([--without-hdf5], [don't use HDF5])], |
5270
|
528 with_hdf5=$withval, with_hdf5=yes) |
|
529 |
|
530 hdf5_lib= |
|
531 if test "$with_hdf5" = yes; then |
|
532 hdf5_lib="hdf5" |
|
533 elif test "$with_hdf5" != no; then |
|
534 hdf5_lib="$with_hdf5" |
|
535 fi |
|
536 |
|
537 HDF5_LIBS= |
|
538 WITH_HDF5=false |
|
539 if test -n "$hdf5_lib"; then |
|
540 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ |
3820
|
541 AC_CHECK_HEADERS(hdf5.h, [ |
5270
|
542 WITH_HDF5=true |
|
543 HDF5_LIBS="-l$hdf5_lib" |
3820
|
544 LIBS="$HDF5_LIBS $LIBS" |
4696
|
545 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.]) |
|
546 AC_CHECK_LIB($hdf5_lib, H5Gget_num_objs, [ |
5270
|
547 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.])])])]) |
|
548 fi |
|
549 |
|
550 if $WITH_HDF5; then |
6276
|
551 case "$canonical_host_type" in |
|
552 *-*-msdosmsvc) |
|
553 OCTAVE_HDF5_DLL |
|
554 ;; |
|
555 esac |
5270
|
556 true |
|
557 else |
|
558 warn_hdf5="HDF5 library not found. Octave will not be able to save or load HDF5 data files." |
6133
|
559 AC_MSG_WARN($warn_hdf5) |
5270
|
560 fi |
|
561 else |
|
562 warn_zlib="ZLIB library not found. Octave will not be able to save or load compressed data files or HDF5 files." |
6133
|
563 AC_MSG_WARN($warn_zlib) |
3820
|
564 fi |
3687
|
565 |
5203
|
566 |
3827
|
567 # Checks for FFTW header and library. |
|
568 |
|
569 # subdirectories of libcruft to build if they aren't found on the system: |
|
570 FFT_DIR="fftpack" |
|
571 AC_SUBST(FFT_DIR) |
|
572 |
|
573 # Installed fftw library, if any. |
|
574 FFTW_LIBS='' |
|
575 AC_SUBST(FFTW_LIBS) |
|
576 |
|
577 AC_ARG_WITH(fftw, |
5844
|
578 [AS_HELP_STRING([--without-fftw], |
|
579 [use included fftpack instead of installed fftw])], |
3886
|
580 with_fftw=$withval, with_fftw=yes) |
3827
|
581 |
5513
|
582 if test "$with_fftw" = yes; then |
4773
|
583 have_fftw3_header=no |
|
584 with_fftw3=no |
6668
|
585 AC_CHECK_HEADER(fftw3.h, [have_fftw3_header=yes]) |
4773
|
586 if test "$have_fftw3_header" = yes; then |
5203
|
587 AC_CHECK_LIB(fftw3, fftw_plan_dft_1d, [FFTW_LIBS="-lfftw3"; with_fftw3=yes]) |
3827
|
588 fi |
|
589 fi |
|
590 |
4773
|
591 if test "$with_fftw" = yes && test "$with_fftw3" = yes; then |
3827
|
592 FFT_DIR='' |
4773
|
593 AC_DEFINE(HAVE_FFTW3, 1, [Define if the FFTW3 library is used.]) |
6133
|
594 else |
|
595 warn_fftw="FFTW library not found. Octave will use the (slower) FFTPACK library instead." |
|
596 AC_MSG_RESULT($warn_fftw) |
3827
|
597 fi |
|
598 |
5235
|
599 # Checks for GLPK header and library. |
|
600 |
|
601 AC_ARG_WITH(glpk, |
5844
|
602 [AS_HELP_STRING([--without-glpk], [don't use GLPK])], |
5235
|
603 with_glpk=$withval, with_glpk=yes) |
|
604 |
|
605 glpk_lib= |
|
606 if test "$with_glpk" = yes; then |
|
607 glpk_lib="glpk" |
|
608 elif test "$with_glpk" != no; then |
|
609 glpk_lib="$with_glpk" |
|
610 fi |
|
611 |
|
612 GLPK_LIBS= |
|
613 if test -n "$glpk_lib"; then |
6806
|
614 AC_CHECK_HEADERS([glpk/glpk.h glpk.h], [ |
|
615 AC_CHECK_LIB($glpk_lib, glp_lpx_simplex, [ |
5235
|
616 GLPK_LIBS="-l$glpk_lib" |
6806
|
617 AC_DEFINE(GLPK_PRE_4_14, 1, [Define if GLPK version is less than 4.14.])], [ |
|
618 AC_CHECK_LIB($glpk_lib, _glp_lpx_simplex, [ |
|
619 GLPK_LIBS="-l$glpk_lib"], [])]) |
|
620 |
|
621 if test -n "$GLPK_LIBS"; then |
|
622 AC_DEFINE(HAVE_GLPK, 1, [Define if GLPK is available.]) |
|
623 fi |
|
624 break]) |
5235
|
625 fi |
|
626 AC_SUBST(GLPK_LIBS) |
6806
|
627 if test -z "$GLPK_LIBS"; then |
6133
|
628 warn_glpk="GLPK library not found. The glpk function for solving linear programs will be disabled." |
|
629 fi |
5235
|
630 |
6043
|
631 # Checks for CURL header and library. |
|
632 |
|
633 AC_ARG_WITH(curl, |
|
634 [AS_HELP_STRING([--without-curl], [don't use CURL])], |
|
635 with_curl=$withval, with_curl=yes) |
|
636 |
|
637 curl_lib= |
|
638 if test "$with_curl" = yes; then |
|
639 curl_lib="curl" |
|
640 elif test "$with_curl" != no; then |
|
641 curl_lib="$with_curl" |
6335
|
642 else |
|
643 curl_missing=yes |
6043
|
644 fi |
|
645 |
|
646 CURL_LIBS= |
|
647 if test -n "$curl_lib"; then |
6056
|
648 AC_CHECK_LIB($curl_lib, curl_easy_escape, [ |
6043
|
649 AC_CHECK_HEADERS(curl/curl.h, [ |
|
650 CURL_LIBS="-l$curl_lib" |
6133
|
651 AC_DEFINE(HAVE_CURL, 1, [Define if CURL is available.])], [ |
|
652 curl_missing=yes])]) |
6043
|
653 fi |
|
654 AC_SUBST(CURL_LIBS) |
6133
|
655 if test "$curl_missing" = yes; then |
|
656 warn_curl="cURL library not found. The urlread and urlwrite functions will be disabled." |
|
657 fi |
|
658 |
6043
|
659 |
4853
|
660 OCTAVE_IEEE754_DATA_FORMAT |
4850
|
661 |
3827
|
662 # ---------------------------------------------------------------------- |
|
663 |
3012
|
664 ### We need these before trying to find libf2c. |
|
665 |
3130
|
666 OCTAVE_PROG_AR |
3012
|
667 |
|
668 AC_PROG_RANLIB |
|
669 |
2813
|
670 ### If we haven't been forced to use a particular Fortran compiler, |
|
671 ### try to find one using any one of several common Un*x Fortran |
3887
|
672 ### compiler names using the AC_PROG_F77 macro. |
1239
|
673 ### |
4816
|
674 ### The configure options --with-f77 or --with-f2c |
|
675 ### force f77 or f2c to be used. It is also possible to use |
2813
|
676 ### these options to specify the name of the compiler. For example, |
4816
|
677 ### `--with-f77=g77' says that we are using g77 as the Fortran compiler. |
1233
|
678 |
2813
|
679 if $use_f77; then |
3008
|
680 if test "$with_f77" = yes; then |
2813
|
681 F77=f77 |
|
682 else |
|
683 F77="$with_f77" |
|
684 fi |
5844
|
685 AC_MSG_NOTICE([defining F77 to be $F77]) |
1233
|
686 elif $use_f2c; then |
|
687 F77= |
2336
|
688 if test "$with_f2c" = yes; then |
1317
|
689 F2C=f2c |
1239
|
690 else |
|
691 F2C="$with_f2c" |
|
692 fi |
5844
|
693 AC_MSG_NOTICE([defining F2C to be $F2C]) |
1233
|
694 fi |
5
|
695 |
3887
|
696 if test "x$FFLAGS" = x; then |
|
697 FFLAGS="-O" # override -g -O default by AC_PROG_F77 |
|
698 fi |
|
699 |
|
700 # the F77 variable, if set, overrides AC_PROG_F77 automatically |
|
701 AC_PROG_F77 |
|
702 |
1239
|
703 have_fortran_compiler=false |
|
704 have_f2c=false |
5
|
705 |
6102
|
706 F77_TOLOWER=true |
|
707 F77_APPEND_UNDERSCORE=true |
|
708 F77_APPEND_EXTRA_UNDERSCORE=true |
2813
|
709 if $use_f2c; then |
1239
|
710 have_f2c=true |
|
711 else |
|
712 if test -n "$F77"; then |
3887
|
713 AC_F77_LIBRARY_LDFLAGS |
|
714 AC_F77_DUMMY_MAIN |
|
715 AC_F77_WRAPPERS |
6102
|
716 case "$ac_cv_f77_mangling" in |
|
717 "upper case") F77_TOLOWER=false ;; |
|
718 esac |
|
719 case "$ac_cv_f77_mangling" in |
|
720 "no underscore") F77_APPEND_UNDERSCORE=false ;; |
|
721 esac |
|
722 case "$ac_cv_f77_mangling" in |
|
723 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=false ;; |
|
724 esac |
|
725 |
3887
|
726 case "$canonical_host_type" in |
5076
|
727 i[[3456789]]86-*-*) |
|
728 if test "$ac_cv_f77_compiler_gnu" = yes; then |
|
729 OCTAVE_F77_FLAG(-mieee-fp) |
5078
|
730 ### OCTAVE_F77_FLAG(-ffloat-store) |
5076
|
731 fi |
|
732 ;; |
3887
|
733 alpha*-*-*) |
|
734 if test "$ac_cv_f77_compiler_gnu" = yes; then |
5076
|
735 OCTAVE_F77_FLAG(-mieee) |
3887
|
736 else |
5076
|
737 OCTAVE_F77_FLAG(-ieee) |
|
738 OCTAVE_F77_FLAG(-fpe1) |
3887
|
739 fi |
|
740 ;; |
|
741 powerpc-apple-machten*) |
|
742 FFLAGS= |
|
743 ;; |
|
744 esac |
|
745 if test -n "$FFLAGS"; then |
5844
|
746 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS]) |
1239
|
747 fi |
|
748 have_fortran_compiler=true |
1233
|
749 else |
1239
|
750 AC_CHECK_PROG(F2C, f2c, f2c, []) |
3897
|
751 AC_ARG_VAR(F2C, [Fortran to C translator command]) |
|
752 AC_ARG_VAR(F2CFLAGS, [Fortran to C translator flags]) |
1239
|
753 if test -n "$F2C"; then |
|
754 have_f2c=true |
5
|
755 fi |
|
756 fi |
|
757 fi |
6102
|
758 AC_SUBST(F77_TOLOWER) |
|
759 AC_SUBST(F77_APPEND_UNDERSCORE) |
|
760 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE) |
869
|
761 |
2762
|
762 f77_rules_frag=/dev/null |
1239
|
763 if $have_fortran_compiler; then |
2762
|
764 f77_rules_frag=Makefrag.f77 |
1679
|
765 cat << \EOF > $f77_rules_frag |
1668
|
766 |
1753
|
767 %.c : %.f |
1668
|
768 |
1791
|
769 %.o : %.f |
3615
|
770 $(FC) -c $(ALL_FFLAGS) -o $@ $< |
1668
|
771 |
1984
|
772 pic/%.o : %.f |
|
773 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ |
|
774 |
1668
|
775 EOF |
1239
|
776 elif $have_f2c; then |
3887
|
777 AC_DEFINE(HAVE_F2C, 1, [Define if we are using f2c.]) |
2562
|
778 |
5775
|
779 ### FIXME -- these shouldn't be fixed names, eh? |
2562
|
780 |
|
781 oct_conflib=libconflib.a |
|
782 oct_obj_ext=o |
|
783 |
4417
|
784 CONFLIB_ARG= |
2562
|
785 if AC_TRY_EVAL(ac_compile); then |
3887
|
786 $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AS_MESSAGE_LOG_FD() |
2562
|
787 if test -n "$RANLIB"; then |
3887
|
788 $RANLIB $oct_conflib 1>&AS_MESSAGE_LOG_FD() |
5
|
789 fi |
4417
|
790 CONFLIB_ARG="-L. -lconflib" |
5
|
791 fi |
2562
|
792 rm -f conftest* |
6089
|
793 case "$canonical_host_type" in |
|
794 *-*-msdosmsvc) |
|
795 CONFLIB_ARG="-MD" |
|
796 ;; |
|
797 esac |
7054
|
798 XLIBS="$LIBS" |
|
799 LIBS="-lf2c $LIBS $CONFLIB_ARG" |
|
800 AC_LINK_IFELSE([AC_LANG_CALL([int MAIN__ () { return 1; }], [f_open])], |
|
801 [F2CLIBS=-lf2c], [F2CLIBS=]) |
|
802 LIBS="$XLIBS" |
2562
|
803 rm -f $oct_conflib |
|
804 |
7054
|
805 if test -z "$F2CLIBS"; then |
|
806 AC_CHECK_LIB(F77, d_sin, F2CLIBS=-lF77, FLIBS=) |
|
807 if test -n "$F2CLIBS"; then |
|
808 AC_CHECK_LIB(I77, f_rew, F2CLIBS="$F2CLIBS -lI77", F2CLIBS=, -lF77) |
2562
|
809 fi |
|
810 fi |
|
811 |
7054
|
812 if test -z "$F2CLIBS"; then |
3105
|
813 warn_f2c_no_lib="I found f2c but not libf2c.a, or libF77.a and libI77.a" |
|
814 AC_MSG_WARN($warn_f2c_no_lib) |
5
|
815 fi |
2633
|
816 f77_rules_frag=Makefrag.f77 |
1679
|
817 cat << \EOF > $f77_rules_frag |
1668
|
818 |
1824
|
819 %.c : %.f |
3847
|
820 $(F2C) $(F2CFLAGS) < $< > $(@F) |
1668
|
821 |
1753
|
822 %.o : %.f |
1668
|
823 |
|
824 EOF |
5
|
825 else |
832
|
826 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
|
827 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) |
1664
|
828 AC_MSG_ERROR([See the file INSTALL for more information.]) |
5
|
829 fi |
869
|
830 |
6137
|
831 XTRA_CRUFT_SH_LDFLAGS= |
6102
|
832 case "$canonical_host_type" in |
|
833 *-*-msdosmsvc) |
|
834 FLIBS="$FLIBS -lkernel32" |
6137
|
835 XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def" |
6102
|
836 ;; |
|
837 esac |
6137
|
838 AC_SUBST(XTRA_CRUFT_SH_LDFLAGS) |
6102
|
839 |
1163
|
840 FC=$F77 |
|
841 AC_SUBST(FC) |
1679
|
842 AC_SUBST_FILE(f77_rules_frag) |
869
|
843 |
5498
|
844 OCTAVE_F77_FLAG(-ffloat-store, [ |
|
845 AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store]) |
|
846 F77_FLOAT_STORE_FLAG=-ffloat-store |
|
847 AC_SUBST(F77_FLOAT_STORE_FLAG) |
|
848 ]) |
|
849 |
3820
|
850 ### Checks for BLAS and LAPACK libraries: |
3887
|
851 # (Build subdirectories of libcruft if they aren't found on the system.) |
3820
|
852 |
3887
|
853 sinclude(acx_blas.m4) |
|
854 sinclude(acx_lapack.m4) |
|
855 ACX_BLAS([], [BLAS_DIR="blas"]) |
|
856 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) |
3690
|
857 AC_SUBST(BLAS_DIR) |
|
858 AC_SUBST(LAPACK_DIR) |
|
859 |
7052
|
860 dnl I see no clean way to do the following check with autoconf macros, |
|
861 dnl hence the big mess. |
|
862 |
|
863 AC_MSG_CHECKING([BLAS library calling convention compatibility]) |
7054
|
864 cat << EOF > conftest.f |
7052
|
865 program foo |
7054
|
866 double complex zdotu, zx(10), zy(10), retval |
7052
|
867 integer n, incx, incy |
|
868 n = 10 |
|
869 incx = 1 |
|
870 incy = 1 |
|
871 do 10 i = 1, n |
7054
|
872 zx(i) = dcmplx (i, 0) |
|
873 zy(i) = dcmplx (0, i) |
7052
|
874 10 continue |
|
875 retval = zdotu (n, zx, incx, zy, incy) |
|
876 if (retval .eq. dcmplx (0, 385)) then |
|
877 print *, 'succeeded' |
|
878 else |
|
879 print *, 'failed' |
|
880 print *, retval |
|
881 endif |
|
882 end |
|
883 EOF |
|
884 XLIBS="$LIBS" |
|
885 if $have_fortran_compiler; then |
7054
|
886 LIBS="$BLAS_LIBS $FLIBS $LIBS" |
7052
|
887 AC_LANG_PUSH(Fortran 77) |
7054
|
888 (eval "$ac_compile"; eval "$ac_link") 2>conftest.er1 |
7052
|
889 AC_LANG_POP(Fortran 77) |
|
890 elif $have_f2c; then |
7054
|
891 LIBS="$BLAS_LIBS $F2CLIBS $LIBS" |
7052
|
892 AC_LANG_PUSH(C) |
7054
|
893 octave_xlate="$F2C $F2CFLAGS < conftest.f > conftest.c" |
|
894 (eval "$octave_xlate") |
|
895 (eval "$ac_compile"; eval "$ac_link") 2>conftest.er1 |
7052
|
896 AC_LANG_POP(C) |
|
897 fi |
|
898 LIBS="$XLIBS" |
7054
|
899 case "`./conftest$ac_exeext`" in |
|
900 *succeeded*) |
7052
|
901 AC_MSG_RESULT(yes) |
|
902 ;; |
|
903 *) |
|
904 AC_MSG_RESULT(no) |
|
905 AC_MSG_WARN([Your BLAS library was apparently compiled with a Fortran]) |
|
906 AC_MSG_WARN([compiler that uses a different calling convention from]) |
|
907 AC_MSG_WARN([the one used by the selected compiler, $F77.]) |
|
908 AC_MSG_ERROR([You must correct this problem before building Octave.]) |
|
909 ;; |
|
910 esac |
|
911 |
5451
|
912 # Check for AMD library |
|
913 AMD_LIBS= |
|
914 AC_SUBST(AMD_LIBS) |
|
915 AC_CHECK_LIB(amd, amd_postorder, [AMD_LIBS="-lamd"; with_amd=yes],[with_amd=no]) |
|
916 |
6024
|
917 # Check for CAMD library |
|
918 CAMD_LIBS= |
|
919 AC_SUBST(CAMD_LIBS) |
|
920 AC_CHECK_LIB(camd, camd_postorder, [CAMD_LIBS="-lcamd"; with_camd=yes],[with_camd=no]) |
|
921 |
5226
|
922 # Check for UMFPACK library. |
|
923 |
|
924 UMFPACK_LIBS= |
|
925 AC_SUBST(UMFPACK_LIBS) |
|
926 |
|
927 AC_ARG_WITH(umfpack, |
5844
|
928 [AS_HELP_STRING([--without-umfpack], |
|
929 [don't use UMFPACK, disable some sparse functionality])], |
5226
|
930 with_umfpack=$withval, with_umfpack=yes) |
|
931 |
5703
|
932 warn_umfpack="UMFPACK not found. This will result in some lack of functionality for sparse matrices." |
5513
|
933 if test "$with_umfpack" = yes && test "$with_amd" = yes; then |
5226
|
934 with_umfpack=no |
6232
|
935 AC_CHECK_HEADERS([suitesparse/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], [ |
5512
|
936 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ |
|
937 UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [ |
|
938 ## Invalidate the cache. |
|
939 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant |
|
940 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ |
|
941 UMFPACK_LIBS="-lumfpack"; with_umfpack=yes], [ |
|
942 |
5226
|
943 ## Invalidate the cache. |
|
944 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant |
|
945 AC_CHECK_LIB(umfpack, umfpack_zi_get_determinant, [ |
5512
|
946 UMFPACK_LIBS="-lumfpack -lcblas"; with_umfpack=yes], [], $AMD_LIBS -lcblas $BLAS_LIBS)], $AMD_LIBS $BLAS_LIBS $FLIBS)], $AMD_LIBS) |
5451
|
947 |
5226
|
948 if test "$with_umfpack" = yes; then |
5451
|
949 AC_DEFINE(HAVE_UMFPACK, 1, [Define if the UMFPACK library is used.]) |
5505
|
950 OLD_LIBS=$LIBS |
|
951 LIBS="$LIBS $UMFPACK_LIBS $AMD_LIBS $BLAS_LIBS $FLIBS" |
|
952 OCTAVE_UMFPACK_SEPERATE_SPLIT |
|
953 LIBS=$OLD_LIBS |
5648
|
954 TEXINFO_UMFPACK="@set HAVE_UMFPACK" |
5513
|
955 warn_umfpack= |
5512
|
956 fi |
5513
|
957 break]) |
|
958 fi |
6133
|
959 if test -n "$warn_umfpack"; then |
|
960 AC_MSG_WARN($warn_umfpack) |
|
961 fi |
5513
|
962 |
5648
|
963 AC_SUBST(TEXINFO_UMFPACK) |
5226
|
964 |
5451
|
965 COLAMD_LIBS= |
|
966 AC_SUBST(COLAMD_LIBS) |
|
967 |
|
968 AC_ARG_WITH(colamd, |
5844
|
969 [AS_HELP_STRING([--without-colamd], |
|
970 [don't use COLAMD, disable some sparse functionality])], |
5451
|
971 with_colamd=$withval, with_colamd=yes) |
|
972 |
5703
|
973 warn_colamd="COLAMD not found. This will result in some lack of functionality for sparse matrices." |
5513
|
974 if test "$with_colamd" = yes; then |
5451
|
975 with_colamd=no |
6232
|
976 AC_CHECK_HEADERS([suitesparse/colamd.h ufsparse/colamd.h colamd/colamd.h colamd.h], [ |
5451
|
977 AC_CHECK_LIB(colamd, colamd, [COLAMD_LIBS="-lcolamd"; with_colamd=yes]) |
|
978 if test "$with_colamd" = yes; then |
|
979 AC_DEFINE(HAVE_COLAMD, 1, [Define if the COLAMD library is used.]) |
5648
|
980 TEXINFO_COLAMD="@set HAVE_COLAMD" |
5513
|
981 warn_colamd= |
5512
|
982 fi |
5513
|
983 break]) |
5451
|
984 fi |
6133
|
985 if test -n "$warn_colamd"; then |
|
986 AC_MSG_WARN($warn_colamd) |
|
987 fi |
5451
|
988 |
5648
|
989 AC_SUBST(TEXINFO_COLAMD) |
5513
|
990 |
5451
|
991 CCOLAMD_LIBS= |
|
992 AC_SUBST(CCOLAMD_LIBS) |
|
993 |
|
994 AC_ARG_WITH(ccolamd, |
5844
|
995 [AS_HELP_STRING([--without-ccolamd], |
|
996 [don't use CCOLAMD, disable some sparse functionality])], |
5451
|
997 with_ccolamd=$withval, with_ccolamd=yes) |
|
998 |
5703
|
999 warn_ccolamd="CCOLAMD not found. This will result in some lack of functionality for sparse matrices." |
5513
|
1000 if test "$with_ccolamd" = yes; then |
5451
|
1001 with_ccolamd=no |
6232
|
1002 AC_CHECK_HEADERS([suitesparse/ccolamd.h ufsparse/ccolamd.h ccolamd/ccolamd.h ccolamd.h], [ |
5451
|
1003 AC_CHECK_LIB(ccolamd, ccolamd, [CCOLAMD_LIBS="-lccolamd"; with_ccolamd=yes]) |
|
1004 if test "$with_ccolamd" = yes; then |
|
1005 AC_DEFINE(HAVE_CCOLAMD, 1, [Define if the CCOLAMD library is used.]) |
5513
|
1006 warn_ccolamd= |
5512
|
1007 fi |
5513
|
1008 break]) |
5451
|
1009 fi |
6133
|
1010 if test -n "$warn_ccolamd"; then |
|
1011 AC_MSG_WARN($warn_ccolamd) |
|
1012 fi |
5451
|
1013 |
|
1014 CHOLMOD_LIBS= |
|
1015 AC_SUBST(CHOLMOD_LIBS) |
|
1016 |
|
1017 AC_ARG_WITH(cholmod, |
5844
|
1018 [AS_HELP_STRING([--without-cholmod], |
|
1019 [don't use CHOLMOD, disable some sparse functionality])], |
5451
|
1020 with_cholmod=$withval, with_cholmod=yes) |
|
1021 |
5703
|
1022 warn_cholmod="CHOLMOD not found. This will result in some lack of functionality for sparse matrices." |
5513
|
1023 if test "$with_cholmod" = yes && test "$with_colamd" = yes && |
|
1024 test "$with_ccolamd" = yes && test "$with_amd" = yes; then |
5451
|
1025 with_cholmod=no |
6232
|
1026 AC_CHECK_HEADERS([suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], [ |
7036
|
1027 AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod"; |
|
1028 with_cholmod=yes], [ |
|
1029 AC_CHECK_LIB(cholmod, cholmod_start, [CHOLMOD_LIBS="-lcholmod -cblas"; |
|
1030 with_cholmod=yes], [], |
|
1031 $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS)], |
|
1032 $CAMD_LIBS $AMD_LIBS $COLAMD_LIBS $CCOLAMD_LIBS $BLAS_LIBS $FLIBS) |
5451
|
1033 |
|
1034 if test "$with_cholmod" = yes; then |
|
1035 AC_DEFINE(HAVE_CHOLMOD, 1, [Define if the CHOLMOD library is used.]) |
5648
|
1036 TEXINFO_CHOLMOD="@set HAVE_CHOLMOD" |
5513
|
1037 warn_cholmod= |
5512
|
1038 fi |
5513
|
1039 break]) |
6133
|
1040 fi |
|
1041 if test -n "$warn_cholmod"; then |
|
1042 AC_MSG_WARN($warn_cholmod) |
|
1043 fi |
5226
|
1044 |
5648
|
1045 AC_SUBST(TEXINFO_CHOLMOD) |
5513
|
1046 |
5610
|
1047 CXSPARSE_LIBS= |
|
1048 AC_SUBST(CXSPARSE_LIBS) |
|
1049 |
|
1050 AC_ARG_WITH(cxsparse, |
5844
|
1051 [AS_HELP_STRING([--without-cxsparse], |
|
1052 [don't use CXSparse, disable some sparse functionality])], |
5610
|
1053 with_cxsparse=$withval, with_cxsparse=yes) |
|
1054 |
5703
|
1055 warn_cxsparse="CXSparse not found. This will result in some lack of functionality for sparse matrices." |
5610
|
1056 if test "$with_cxsparse" = yes; then |
|
1057 with_cxsparse=no |
6719
|
1058 AC_LANG_PUSH(C++) |
6232
|
1059 AC_CHECK_HEADERS([suitesparse/cs.h ufsparse/cs.h cxsparse/cs.h cs.h], [ |
5648
|
1060 AC_CHECK_LIB(cxsparse, cs_di_sqr, [CXSPARSE_LIBS="-lcxsparse"; with_cxsparse=yes]) |
5610
|
1061 if test "$with_cxsparse" = yes; then |
|
1062 AC_DEFINE(HAVE_CXSPARSE, 1, [Define if the CXSparse library is used.]) |
|
1063 warn_cxsparse= |
|
1064 fi |
|
1065 break]) |
6719
|
1066 AC_LANG_POP(C++) |
5610
|
1067 fi |
6133
|
1068 if test -n "$warn_cxsparse"; then |
|
1069 AC_MSG_WARN($warn_cxsparse) |
|
1070 fi |
5610
|
1071 |
4110
|
1072 ### Handle shared library options. |
2813
|
1073 |
3034
|
1074 ### Enable creation of static libraries. |
|
1075 |
|
1076 AC_ARG_ENABLE(static, |
5844
|
1077 [AS_HELP_STRING([--enable-static], [create static libraries])], |
3034
|
1078 [if test "$enableval" = no; then STATIC_LIBS=false; |
|
1079 else STATIC_LIBS=true; fi], |
5221
|
1080 STATIC_LIBS=false) |
3034
|
1081 AC_SUBST(STATIC_LIBS) |
|
1082 |
2813
|
1083 ### Enable creation of shared libraries. Currently only works with |
|
1084 ### gcc on some systems. |
|
1085 |
|
1086 AC_ARG_ENABLE(shared, |
5844
|
1087 [AS_HELP_STRING([--enable-shared], |
|
1088 [create shared libraries (not all systems)])], |
2813
|
1089 [if test "$enableval" = no; then SHARED_LIBS=false; |
|
1090 else SHARED_LIBS=true; fi], |
5221
|
1091 SHARED_LIBS=true) |
2813
|
1092 AC_SUBST(SHARED_LIBS) |
|
1093 |
4128
|
1094 ### Enable dynamic linking. --enable-shared implies this, so |
|
1095 ### --enable-dl is only need if you are only building static libraries |
|
1096 ### and want to try dynamic linking too (works on some systems, for |
|
1097 ### example, OS X and Windows). |
|
1098 |
|
1099 AC_ARG_ENABLE(dl, |
5844
|
1100 [AS_HELP_STRING([--enable-dl], |
|
1101 [create shared libraries (not all systems)])], |
4128
|
1102 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; |
|
1103 else ENABLE_DYNAMIC_LINKING=true; fi], |
5221
|
1104 ENABLE_DYNAMIC_LINKING=true) |
4128
|
1105 |
3034
|
1106 if $STATIC_LIBS || $SHARED_LIBS; then |
|
1107 true |
|
1108 else |
|
1109 AC_MSG_ERROR([You can't disable building static AND shared libraries!]) |
|
1110 fi |
|
1111 |
2813
|
1112 AC_ARG_ENABLE(rpath, |
5844
|
1113 [AS_HELP_STRING([--enable-rpath], |
|
1114 [override the default link options for rpath; e.g., --enable-rpath='-rpath $(octlibdir)'])], |
4353
|
1115 [ if test "$enableval" = no; then use_rpath=false; |
|
1116 else |
|
1117 use_rpath=true |
|
1118 if test "$enableval" = yes; then true; |
|
1119 else enable_rpath_arg="$enableval"; fi |
4439
|
1120 fi], [use_rpath=true]) |
2813
|
1121 |
|
1122 DLFCN_DIR= |
|
1123 CPICFLAG=-fPIC |
|
1124 CXXPICFLAG=-fPIC |
|
1125 FPICFLAG=-fPIC |
|
1126 SHLEXT=so |
4190
|
1127 SHLLIB='$(SHLEXT)' |
4102
|
1128 SHLBIN= |
4138
|
1129 SHLEXT_VER='$(SHLEXT).$(version)' |
|
1130 SHLLIB_VER='$(SHLLIB).$(version)' |
|
1131 SHLBIN_VER='$(SHLBIN).$(version)' |
4126
|
1132 SHLLINKEXT= |
6051
|
1133 LIBPRE=lib |
4323
|
1134 SH_LD='$(CXX)' |
2813
|
1135 SH_LDFLAGS=-shared |
4759
|
1136 DL_LD='$(SH_LD)' |
|
1137 DL_LDFLAGS='$(SH_LDFLAGS)' |
|
1138 MKOCTFILE_DL_LDFLAGS='$(DL_LDFLAGS)' |
3036
|
1139 SONAME_FLAGS= |
2813
|
1140 RLD_FLAG= |
4199
|
1141 NO_OCT_FILE_STRIP=false |
4323
|
1142 TEMPLATE_AR='$(AR)' |
3775
|
1143 TEMPLATE_ARFLAGS="$ARFLAGS" |
6137
|
1144 CRUFT_DLL_DEFS= |
|
1145 OCTAVE_DLL_DEFS= |
|
1146 OCTINTERP_DLL_DEFS= |
4104
|
1147 library_path_var=LD_LIBRARY_PATH |
2813
|
1148 case "$canonical_host_type" in |
6668
|
1149 *-*-386bsd* | *-*-netbsd*) |
2813
|
1150 SH_LD=ld |
|
1151 SH_LDFLAGS=-Bshareable |
|
1152 ;; |
6668
|
1153 *-*-openbsd*) |
|
1154 SH_LD='$(CXX)' |
|
1155 SH_LDFLAGS='-shared -fPIC' |
|
1156 ;; |
4323
|
1157 *-*-freebsd*) |
|
1158 SH_LD='$(CC)' |
5508
|
1159 SH_LDFLAGS="-shared -Wl,-x" |
|
1160 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' |
4323
|
1161 ;; |
3127
|
1162 alpha*-dec-osf*) |
2813
|
1163 CPICFLAG= |
|
1164 CXXPICFLAG= |
|
1165 FPICFLAG= |
4283
|
1166 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'" |
|
1167 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' |
2813
|
1168 ;; |
3956
|
1169 *-*-darwin*) |
4759
|
1170 DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $(LDFLAGS)' |
6682
|
1171 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $$BINDIR/octave-$$OCTAVE_VERSION$$EXEEXT' |
4759
|
1172 SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)' |
4157
|
1173 CXXPICFLAG= |
|
1174 CPICFLAG= |
|
1175 FPICFLAG= |
4759
|
1176 SHLEXT=dylib |
|
1177 SHLLIB='$(SHLEXT)' |
|
1178 SHLEXT_VER='$(version).$(SHLEXT)' |
|
1179 SHLLIB_VER='$(version).$(SHLLIB)' |
4199
|
1180 NO_OCT_FILE_STRIP=true |
4786
|
1181 SONAME_FLAGS='-install_name $(octlibdir)/$@' |
4759
|
1182 library_path_var=DYLD_LIBRARY_PATH |
3956
|
1183 ;; |
4105
|
1184 *-*-cygwin* | *-*-mingw*) |
5451
|
1185 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc" |
4102
|
1186 CXXPICFLAG= |
|
1187 CPICFLAG= |
|
1188 FPICFLAG= |
|
1189 SHLEXT=dll |
|
1190 SHLLIB=dll.a |
|
1191 SHLBIN=dll |
5414
|
1192 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base" |
4102
|
1193 SHLLINKEXT=.dll |
|
1194 SONAME_FLAGS='-Wl,--out-implib=$@.a' |
4104
|
1195 library_path_var=PATH |
4102
|
1196 ;; |
6089
|
1197 *-*-msdosmsvc) |
6794
|
1198 DL_LDFLAGS="-shared" |
6051
|
1199 CPICFLAG= |
|
1200 CXXPICFLAG= |
|
1201 FPICFLAG= |
|
1202 SHLEXT=dll |
|
1203 SHLLIB=lib |
|
1204 SHLBIN=dll |
|
1205 LIBPRE= |
6794
|
1206 SH_LDFLAGS="-shared" |
|
1207 if test -n "`echo $CFLAGS | grep -e '-g'`" -o -n "`echo $CXXFLAGS | grep -e '-g'`"; then |
|
1208 DL_LDFLAGS="$DL_LDFLAGS -g" |
|
1209 SH_LDFLAGS="$SH_LDFLAGS -g" |
|
1210 fi |
6255
|
1211 NO_OCT_FILE_STRIP=true |
6100
|
1212 library_path_var=PATH |
6718
|
1213 NO_OCT_FILE_STRIP=true |
6087
|
1214 ## Extra compilation flags. |
6137
|
1215 CRUFT_DLL_DEFS="-DCRUFT_DLL" |
|
1216 OCTAVE_DLL_DEFS="-DOCTAVE_DLL" |
|
1217 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL" |
6051
|
1218 ;; |
3740
|
1219 *-*-linux* | *-*-gnu*) |
4906
|
1220 MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic" |
4283
|
1221 SONAME_FLAGS='-Wl,-soname -Wl,$@' |
|
1222 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' |
2813
|
1223 ;; |
3887
|
1224 i[[3456]]86-*-sco3.2v5*) |
4283
|
1225 SONAME_FLAGS='-Wl,-h -Wl,$@' |
3705
|
1226 RLD_FLAG= |
3160
|
1227 SH_LDFLAGS=-G |
|
1228 ;; |
2813
|
1229 rs6000-ibm-aix* | powerpc-ibm-aix*) |
|
1230 CPICFLAG= |
|
1231 CXXPICFLAG= |
|
1232 FPICFLAG= |
|
1233 DLFCN_DIR=dlfcn |
|
1234 ;; |
|
1235 hppa*-hp-hpux*) |
3887
|
1236 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
1237 FPICFLAG=-fPIC |
|
1238 else |
|
1239 FPICFLAG=+Z |
|
1240 fi |
|
1241 SHLEXT=sl |
|
1242 SH_LDFLAGS="-shared -fPIC" |
4283
|
1243 RLD_FLAG='-Wl,+b -Wl,$(octlibdir)' |
2813
|
1244 ;; |
|
1245 *-sgi-*) |
|
1246 CPICFLAG= |
|
1247 CXXPICFLAG= |
|
1248 FPICFLAG= |
4353
|
1249 RLD_FLAG='-rpath $(octlibdir)' |
2813
|
1250 ;; |
|
1251 sparc-sun-sunos4*) |
3887
|
1252 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
1253 FPICFLAG=-fPIC |
|
1254 else |
|
1255 FPICFLAG=-PIC |
|
1256 fi |
3059
|
1257 SH_LD=ld |
|
1258 SH_LDFLAGS="-assert nodefinitions" |
3162
|
1259 RLD_FLAG='-L$(octlibdir)' |
2813
|
1260 ;; |
3606
|
1261 sparc-sun-solaris2* | i386-pc-solaris2*) |
3887
|
1262 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
1263 FPICFLAG=-fPIC |
|
1264 else |
3775
|
1265 FPICFLAG=-KPIC |
|
1266 fi |
|
1267 if test "$GCC" = yes; then |
|
1268 CPICFLAG=-fPIC |
|
1269 else |
|
1270 CPICFLAG=-KPIC |
2813
|
1271 fi |
3775
|
1272 if test "$GXX" = yes; then |
|
1273 CXXPICFLAG=-fPIC |
|
1274 SH_LDFLAGS=-shared |
|
1275 else |
|
1276 CXXPICFLAG=-KPIC |
|
1277 SH_LDFLAGS=-G |
|
1278 fi |
|
1279 RLD_FLAG='-R $(octlibdir)' |
6087
|
1280 ## Template closures in archive libraries need a different mechanism. |
3820
|
1281 if test "$GXX" = yes; then |
3775
|
1282 true |
|
1283 else |
4323
|
1284 TEMPLATE_AR='$(CXX)' |
3775
|
1285 TEMPLATE_ARFLAGS="-xar -o" |
|
1286 fi |
2813
|
1287 ;; |
|
1288 esac |
|
1289 |
|
1290 if $use_rpath; then |
4353
|
1291 if test -n "$enable_rpath_arg"; then |
|
1292 RLD_FLAG="$enable_rpath_arg" |
|
1293 fi |
2813
|
1294 else |
4353
|
1295 RLD_FLAG="" |
2813
|
1296 fi |
|
1297 |
5844
|
1298 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG]) |
|
1299 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG]) |
|
1300 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG]) |
|
1301 AC_MSG_NOTICE([defining SHLEXT to be $SHLEXT]) |
|
1302 AC_MSG_NOTICE([defining SHLLIB to be $SHLLIB]) |
|
1303 AC_MSG_NOTICE([defining SHLBIN to be $SHLBIN]) |
|
1304 AC_MSG_NOTICE([defining SHLEXT_VER to be $SHLEXT_VER]) |
|
1305 AC_MSG_NOTICE([defining SHLLIB_VER to be $SHLLIB_VER]) |
|
1306 AC_MSG_NOTICE([defining SHLBIN_VER to be $SHLBIN_VER]) |
|
1307 AC_MSG_NOTICE([defining SHLLINKEXT to be $SHLLINKEXT]) |
6051
|
1308 AC_MSG_NOTICE([defining LIBPRE to be $LIBPRE]) |
5844
|
1309 AC_MSG_NOTICE([defining DLFCN_DIR to be $DLFCN_DIR]) |
|
1310 AC_MSG_NOTICE([defining SH_LD to be $SH_LD]) |
|
1311 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS]) |
|
1312 AC_MSG_NOTICE([defining DL_LD to be $DL_LD]) |
|
1313 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS]) |
|
1314 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS]) |
|
1315 AC_MSG_NOTICE([defining SONAME_FLAGS to be $SONAME_FLAGS]) |
|
1316 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) |
|
1317 AC_MSG_NOTICE([defining RLD_FLAG to be $RLD_FLAG]) |
|
1318 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR]) |
|
1319 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) |
6137
|
1320 AC_MSG_NOTICE([defining CRUFT_DLL_DEFS to be $CRUFT_DLL_DEFS]) |
|
1321 AC_MSG_NOTICE([defining OCTAVE_DLL_DEFS to be $OCTAVE_DLL_DEFS]) |
|
1322 AC_MSG_NOTICE([defining OCTINTERP_DLL_DEFS to be $OCTINTERP_DLL_DEFS]) |
5844
|
1323 AC_MSG_NOTICE([defining library_path_var to be $library_path_var]) |
2813
|
1324 AC_SUBST(FPICFLAG) |
|
1325 AC_SUBST(CPICFLAG) |
|
1326 AC_SUBST(CXXPICFLAG) |
|
1327 AC_SUBST(SHLEXT) |
4102
|
1328 AC_SUBST(SHLLIB) |
|
1329 AC_SUBST(SHLBIN) |
4126
|
1330 AC_SUBST(SHLEXT_VER) |
|
1331 AC_SUBST(SHLLIB_VER) |
|
1332 AC_SUBST(SHLBIN_VER) |
|
1333 AC_SUBST(SHLLINKEXT) |
6051
|
1334 AC_SUBST(LIBPRE) |
2813
|
1335 AC_SUBST(DLFCN_DIR) |
|
1336 AC_SUBST(SH_LD) |
|
1337 AC_SUBST(SH_LDFLAGS) |
4759
|
1338 AC_SUBST(DL_LD) |
|
1339 AC_SUBST(DL_LDFLAGS) |
|
1340 AC_SUBST(MKOCTFILE_DL_LDFLAGS) |
3036
|
1341 AC_SUBST(SONAME_FLAGS) |
4199
|
1342 AC_SUBST(NO_OCT_FILE_STRIP) |
2813
|
1343 AC_SUBST(RLD_FLAG) |
3775
|
1344 AC_SUBST(TEMPLATE_AR) |
|
1345 AC_SUBST(TEMPLATE_ARFLAGS) |
6141
|
1346 AC_SUBST(CRUFT_DLL_DEFS) |
|
1347 AC_SUBST(OCTAVE_DLL_DEFS) |
|
1348 AC_SUBST(OCTINTERP_DLL_DEFS) |
4104
|
1349 AC_SUBST(library_path_var) |
4102
|
1350 |
2813
|
1351 ### special checks for odd OS specific things. |
|
1352 ### |
|
1353 ### I am told that on some SCO systems, the only place to find some |
|
1354 ### functions like gethostname and gettimeofday is in libsocket. |
|
1355 |
3887
|
1356 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)]) |
|
1357 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) |
2813
|
1358 |
4388
|
1359 case "$canonical_host_type" in |
6704
|
1360 *-*-cygwin*) |
4388
|
1361 AC_CHECK_LIB(wsock32, gethostname) |
5451
|
1362 LIBS="$LIBS -lwsock32" |
4388
|
1363 ;; |
6704
|
1364 *-*-msdosmsvc* | *-*-mingw*) |
6091
|
1365 LIBS="$LIBS -lws2_32 -lkernel32" |
|
1366 ;; |
4388
|
1367 esac |
|
1368 |
4353
|
1369 ### Type stuff. |
|
1370 |
|
1371 AC_TYPE_MODE_T |
|
1372 AC_TYPE_OFF_T |
|
1373 AC_TYPE_PID_T |
|
1374 AC_TYPE_SIZE_T |
|
1375 AC_TYPE_UID_T |
|
1376 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) |
|
1377 AC_CHECK_TYPES([long long int, unsigned long long int]) |
|
1378 AC_CHECK_TYPES([sigset_t, sig_atomic_t], , , [#include <signal.h>]) |
|
1379 |
2813
|
1380 ### How big are ints and how are they oriented? These could probably |
|
1381 ### be eliminated in favor of run-time checks. |
|
1382 |
3888
|
1383 AC_CHECK_SIZEOF(short) |
|
1384 AC_CHECK_SIZEOF(int) |
|
1385 AC_CHECK_SIZEOF(long) |
|
1386 AC_CHECK_SIZEOF(long long) |
2813
|
1387 |
|
1388 ### Does the C compiler handle alloca() and const correctly? |
|
1389 |
4602
|
1390 AC_FUNC_ALLOCA |
2813
|
1391 AC_C_CONST |
|
1392 |
|
1393 ### See if we should define NPOS. |
|
1394 |
|
1395 OCTAVE_STRING_NPOS |
|
1396 |
4360
|
1397 ### See if we should use placement delete. |
|
1398 |
|
1399 OCTAVE_PLACEMENT_DELETE |
|
1400 |
4366
|
1401 ### See if we can auto allocate variable sized arrays. |
|
1402 |
|
1403 OCTAVE_DYNAMIC_AUTO_ARRAYS |
|
1404 |
869
|
1405 ### Checks for header files. |
|
1406 |
832
|
1407 AC_HEADER_STDC |
|
1408 AC_HEADER_DIRENT |
1377
|
1409 AC_HEADER_TIME |
|
1410 AC_HEADER_SYS_WAIT |
2097
|
1411 |
4051
|
1412 ### C headers |
|
1413 |
4067
|
1414 AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ |
5990
|
1415 floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ |
5828
|
1416 ncurses.h poll.h pwd.h stdint.h stdlib.h string.h sys/ioctl.h \ |
3308
|
1417 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ |
6694
|
1418 sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ |
|
1419 unistd.h utime.h varargs.h) |
3887
|
1420 |
4051
|
1421 ### C++ headers |
|
1422 |
|
1423 AC_LANG_PUSH(C++) |
|
1424 AC_CHECK_HEADERS(sstream) |
|
1425 AC_LANG_POP(C++) |
|
1426 |
3887
|
1427 have_termios_h=no |
|
1428 AC_CHECK_HEADERS($TERMIOS_H, have_termios_h=yes) |
|
1429 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no) |
|
1430 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no) |
5451
|
1431 AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no) |
|
1432 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no) |
4067
|
1433 AC_CHECK_HEADERS(conio.h, have_conio_h=yes, have_conio_h=no) |
3249
|
1434 |
3225
|
1435 ### I'm told that termios.h is broken on NeXT systems. |
|
1436 |
|
1437 case "$canonical_host_type" in |
|
1438 *-*-nextstep*) |
3887
|
1439 if test "$have_termios_h" = yes; then |
3249
|
1440 AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) |
3887
|
1441 have_termios_h=no |
3249
|
1442 fi |
3225
|
1443 ;; |
|
1444 esac |
|
1445 |
3887
|
1446 if test "$have_termios_h" = yes \ |
|
1447 || test "$have_termio_h" = yes \ |
|
1448 || test "$have_sgtty_h" = yes; then |
832
|
1449 true |
|
1450 else |
4064
|
1451 AC_MSG_WARN([I couldn't find termios.h, termio.h, or sgtty.h!]) |
832
|
1452 fi |
869
|
1453 |
5451
|
1454 LIBGLOB= |
|
1455 AC_SUBST(LIBGLOB) |
|
1456 if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then |
|
1457 AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, [ |
|
1458 AC_CHECK_LIB(glob, fnmatch, [have_fnmatch=yes; LIBGLOB=-lglob], |
|
1459 have_fnmatch=no)]) |
|
1460 AC_CHECK_FUNCS(glob, have_glob=yes, [ |
|
1461 AC_CHECK_LIB(glob, glob, [have_glob=yes; LIBGLOB=-lglob], |
|
1462 have_glob=no)]) |
|
1463 |
|
1464 if test "$have_fnmatch" != yes || test "$have_glob" != yes; then |
|
1465 AC_MSG_ERROR([You are required to have fnmatch and glob]) |
|
1466 fi |
|
1467 else |
|
1468 AC_MSG_ERROR([You are required to have fnmatch.h and glob.h]) |
|
1469 fi |
|
1470 |
1788
|
1471 ### Checks for functions and variables. |
869
|
1472 |
6694
|
1473 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name chmod \ |
5138
|
1474 dup2 endgrent endpwent execvp fcntl fork getcwd getegid geteuid \ |
|
1475 getgid getgrent getgrgid getgrnam getpgrp getpid getppid getpwent \ |
6969
|
1476 getpwuid gettimeofday getuid getwd _kbhit kill lgamma link localtime_r \ |
5138
|
1477 lstat memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise \ |
6271
|
1478 readlink realpath rename resolvepath rindex rmdir round select setgrent \ |
5990
|
1479 setlocale setpwent setvbuf sigaction siglongjmp sigpending sigprocmask \ |
6829
|
1480 sigsuspend snprintf stat strcasecmp strdup strerror stricmp \ |
6969
|
1481 strncasecmp strnicmp strptime strsignal symlink tempnam tgamma umask \ |
6694
|
1482 uname unlink usleep utime vfprintf vsprintf vsnprintf waitpid \ |
6829
|
1483 _chmod _snprintf x_utime _utime32) |
1300
|
1484 |
6094
|
1485 case "$canonical_host_type" in |
|
1486 *-*-msdosmsvc) |
|
1487 ## The %T format specifier for strftime is reportedly broken, |
|
1488 ## so use our version. We could use an actual configure test |
|
1489 ## for this. |
|
1490 ;; |
|
1491 *) |
|
1492 AC_CHECK_FUNCS(strftime) |
|
1493 ;; |
|
1494 esac |
|
1495 |
1708
|
1496 OCTAVE_SMART_PUTENV |
|
1497 |
6103
|
1498 case "$canonical_host_type" in |
6704
|
1499 *-*-msdosmsvc | *-*-mingw*) |
6103
|
1500 AC_MSG_CHECKING([for required _WIN32_WINNT]) |
|
1501 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ |
|
1502 #include <windows.h> |
|
1503 #if _WIN32_WINNT < 0x0403 |
|
1504 #error "Wrong version" |
|
1505 #endif]], []), |
|
1506 AC_MSG_RESULT([none]), [ |
|
1507 AC_DEFINE(_WIN32_WINNT, 0x0403, [Define to 0x0403 to access InitializeCriticalSectionAndSpinCount]) |
|
1508 AC_MSG_RESULT([0x0403])]) |
|
1509 AC_MSG_CHECKING([whether _USE_MATH_DEFINES needs to be defined]) |
|
1510 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <math.h>]], |
|
1511 [[int x = M_LN2;]]), |
|
1512 AC_MSG_RESULT([no]), [ |
|
1513 AC_DEFINE(_USE_MATH_DEFINES, 1, [Define if your system needs it to define math constants like M_LN2]) |
|
1514 AC_MSG_RESULT([yes])]) |
|
1515 ;; |
|
1516 esac |
|
1517 |
4110
|
1518 ### Dynamic linking is now enabled only if we are building shared |
|
1519 ### libs and some API for dynamic linking is detected. |
|
1520 |
3705
|
1521 LD_CXX='$(CXX)' |
2064
|
1522 LIBDLFCN= |
|
1523 DLFCN_INCFLAGS= |
3232
|
1524 RDYNAMIC_FLAG= |
4110
|
1525 DL_API_MSG="" |
|
1526 dlopen_api=false |
|
1527 shl_load_api=false |
|
1528 loadlibrary_api=false |
4163
|
1529 dyld_api=false |
4110
|
1530 |
4163
|
1531 if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then |
|
1532 |
6087
|
1533 ## Check for dyld first since OS X can have a non-standard libdl |
4110
|
1534 |
5599
|
1535 AC_CHECK_HEADER(mach-o/dyld.h) |
5717
|
1536 if test "$ac_cv_header_mach_o_dyld_h" = yes; then |
4163
|
1537 dyld_api=true |
|
1538 else |
4189
|
1539 AC_CHECK_LIB(dld, shl_load) |
|
1540 AC_CHECK_FUNCS(shl_load shl_findsym) |
4201
|
1541 if test "$ac_cv_func_shl_load" = yes \ |
|
1542 && test "$ac_cv_func_shl_findsym" = yes; then |
4189
|
1543 shl_load_api=true |
4110
|
1544 else |
4189
|
1545 AC_CHECK_LIB(wsock32, LoadLibrary) |
|
1546 AC_CHECK_FUNCS(LoadLibrary) |
4201
|
1547 if test "$ac_cv_func_loadlibrary" = yes; then |
4189
|
1548 loadlibrary_api=true |
2063
|
1549 else |
4189
|
1550 AC_CHECK_LIB(dl, dlopen) |
|
1551 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) |
4201
|
1552 if test "$ac_cv_func_dlclose" = yes \ |
|
1553 && test "$ac_cv_func_dlerror" = yes \ |
|
1554 && test "$ac_cv_func_dlopen" = yes \ |
|
1555 && test "$ac_cv_func_dlsym" = yes; then |
4189
|
1556 dlopen_api=true |
|
1557 else |
4163
|
1558 case "$canonical_host_type" in |
|
1559 rs6000-ibm-aix* | powerpc-ibm-aix*) |
|
1560 LIBDLFCN="-ldlfcn -ll -lld" |
|
1561 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' |
|
1562 dlopen_api=true |
|
1563 ;; |
|
1564 i[[3456]]86-*-sco3.2v5*) |
|
1565 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' |
|
1566 dlopen_api=true |
|
1567 ;; |
|
1568 esac |
|
1569 fi |
2063
|
1570 fi |
4110
|
1571 fi |
|
1572 fi |
|
1573 |
5451
|
1574 ## autoconf test for LoadLibrary appears broken. Bypass for cygwin/mingw |
6286
|
1575 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then |
|
1576 true |
|
1577 else |
5451
|
1578 case "$canonical_host_type" in |
6091
|
1579 *-*-cygwin* | *-*-mingw* | *-*-msdosmsvc) |
5451
|
1580 loadlibrary_api=true; |
|
1581 ;; |
|
1582 esac |
|
1583 fi |
|
1584 |
4110
|
1585 if $dlopen_api; then |
|
1586 DL_API_MSG="(dlopen)" |
|
1587 AC_DEFINE(HAVE_DLOPEN_API, 1, [Define if your system has dlopen, dlsym, dlerror, and dlclose for dynamic linking]) |
3958
|
1588 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) |
4110
|
1589 elif $shl_load_api; then |
|
1590 DL_API_MSG="(shl_load)" |
|
1591 AC_DEFINE(HAVE_SHL_LOAD_API, 1, [Define if your system has shl_load and shl_findsym for dynamic linking]) |
|
1592 elif $loadlibrary_api; then |
|
1593 DL_API_MSG="(LoadLibrary)" |
|
1594 AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) |
4163
|
1595 elif $dyld_api; then |
|
1596 DL_API_MSG="(dyld)" |
|
1597 AC_DEFINE(HAVE_DYLD_API, 1, [Define if your system has dyld for dynamic linking]) |
4110
|
1598 fi |
|
1599 |
4163
|
1600 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then |
4128
|
1601 ENABLE_DYNAMIC_LINKING=true |
|
1602 AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) |
1978
|
1603 fi |
4163
|
1604 fi |
|
1605 |
|
1606 if $SHARED_LIBS; then |
|
1607 LIBOCTINTERP=-loctinterp$SHLLINKEXT |
|
1608 LIBOCTAVE=-loctave$SHLLINKEXT |
|
1609 LIBCRUFT=-lcruft$SHLLINKEXT |
1978
|
1610 else |
4110
|
1611 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' |
|
1612 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' |
|
1613 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' |
1664
|
1614 fi |
4163
|
1615 |
4110
|
1616 AC_SUBST(LD_CXX) |
2064
|
1617 AC_SUBST(LIBDLFCN) |
|
1618 AC_SUBST(DLFCN_INCFLAGS) |
3232
|
1619 AC_SUBST(RDYNAMIC_FLAG) |
4128
|
1620 AC_SUBST(ENABLE_DYNAMIC_LINKING) |
4110
|
1621 AC_SUBST(LIBOCTINTERP) |
|
1622 AC_SUBST(LIBOCTAVE) |
|
1623 AC_SUBST(LIBCRUFT) |
1901
|
1624 |
1300
|
1625 ### There is more than one possible prototype for gettimeofday. See |
2782
|
1626 ### which one (if any) appears in sys/time.h. These tests are from |
|
1627 ### Emacs 19. |
1300
|
1628 |
2782
|
1629 AC_MSG_CHECKING(for struct timeval) |
5844
|
1630 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
2782
|
1631 #include <sys/time.h> |
|
1632 #include <time.h> |
|
1633 #else |
|
1634 #ifdef HAVE_SYS_TIME_H |
|
1635 #include <sys/time.h> |
|
1636 #else |
|
1637 #include <time.h> |
|
1638 #endif |
5844
|
1639 #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], |
2782
|
1640 [AC_MSG_RESULT(yes) |
|
1641 HAVE_TIMEVAL=yes |
3887
|
1642 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], |
2782
|
1643 [AC_MSG_RESULT(no) |
|
1644 HAVE_TIMEVAL=no]) |
|
1645 |
|
1646 if test "x$HAVE_TIMEVAL" = xyes; then |
|
1647 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments) |
5842
|
1648 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME |
2782
|
1649 #include <sys/time.h> |
|
1650 #include <time.h> |
|
1651 #else |
|
1652 #ifdef HAVE_SYS_TIME_H |
|
1653 #include <sys/time.h> |
|
1654 #else |
|
1655 #include <time.h> |
|
1656 #endif |
5842
|
1657 #endif]], [[struct timeval time; |
|
1658 struct timezone dummy; |
|
1659 gettimeofday (&time, &dummy);]])], |
|
1660 [AC_MSG_RESULT(no)], |
2782
|
1661 [AC_MSG_RESULT(yes) |
5842
|
1662 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, |
|
1663 [Define if your system has a single-arg prototype for gettimeofday.])]) |
2782
|
1664 fi |
869
|
1665 |
832
|
1666 dnl Would like to get rid of this cruft, and just have |
|
1667 dnl |
|
1668 dnl AC_CHECK_FUNCS(finite isnan isinf) |
|
1669 dnl |
|
1670 dnl instead, but that used to fail on some systems... |
369
|
1671 dnl |
832
|
1672 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf |
|
1673 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that |
369
|
1674 dnl fails, we try again by including math.h and invoking the function |
|
1675 dnl with an argument. |
869
|
1676 |
2508
|
1677 ### I am told that Inf and NaN don't work on m68k HP sytems, and that |
|
1678 ### on SCO systems, isnan and isinf don't work, but they can be |
|
1679 ### replaced by something that does. |
956
|
1680 |
|
1681 case "$canonical_host_type" in |
1384
|
1682 m68k-hp-hpux*) |
956
|
1683 ;; |
2508
|
1684 *-*-sco*) |
5844
|
1685 AC_MSG_NOTICE([defining SCO to be 1]) |
3887
|
1686 AC_DEFINE(SCO, 1, [Define if using an SCO system.]) |
5844
|
1687 AC_MSG_NOTICE([forcing HAVE_ISINF for SCO]) |
3887
|
1688 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) |
5844
|
1689 AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO]) |
3887
|
1690 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) |
2508
|
1691 ;; |
956
|
1692 *) |
4349
|
1693 AC_CHECK_FUNCS(finite isnan isinf copysign signbit) |
6061
|
1694 AC_CHECK_FUNCS(_finite _isnan _copysign) |
5098
|
1695 AC_CHECK_DECLS(signbit, , , [#include <math.h>]) |
956
|
1696 ;; |
|
1697 esac |
|
1698 |
1076
|
1699 ### Check for nonstandard but common math functions that we need. |
|
1700 |
5913
|
1701 AC_CHECK_FUNCS(acosh asinh atanh erf erfc exp2 log2) |
3130
|
1702 |
869
|
1703 ### Checks for OS specific cruft. |
|
1704 |
3887
|
1705 AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) |
|
1706 |
405
|
1707 AC_STRUCT_TM |
1186
|
1708 AC_STRUCT_TIMEZONE |
1388
|
1709 AC_FUNC_CLOSEDIR_VOID |
1225
|
1710 |
3892
|
1711 AC_CHECK_MEMBERS(struct group.gr_passwd) |
2548
|
1712 |
4067
|
1713 # mkdir takes a single argument on some systems. |
|
1714 OCTAVE_MKDIR_TAKES_ONE_ARG |
|
1715 |
3887
|
1716 octave_found_termlib=no |
2592
|
1717 for termlib in ncurses curses termcap terminfo termlib; do |
2034
|
1718 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
405
|
1719 case "${TERMLIBS}" in |
|
1720 *-l${termlib}*) |
3822
|
1721 LIBS="$TERMLIBS $LIBS" |
4102
|
1722 AC_SUBST(TERMLIBS) |
3887
|
1723 octave_found_termlib=yes |
405
|
1724 break |
|
1725 ;; |
|
1726 esac |
|
1727 done |
869
|
1728 |
3887
|
1729 if test "$octave_found_termlib" = no; then |
|
1730 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\ |
|
1731 r -ltermlib!" |
3105
|
1732 AC_MSG_WARN($warn_termlibs) |
2488
|
1733 fi |
|
1734 |
3822
|
1735 OCTAVE_ENABLE_READLINE |
|
1736 |
832
|
1737 AC_MSG_CHECKING([for struct exception in math.h]) |
5842
|
1738 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], |
|
1739 [[struct exception *x; x->type; x->name;]])], |
|
1740 [AC_MSG_RESULT(yes) |
|
1741 AC_DEFINE(EXCEPTION_IN_MATH, 1, |
|
1742 [Define if your math.h declares struct exception for matherr().])], |
|
1743 [AC_MSG_RESULT(no)]) |
869
|
1744 |
|
1745 ### Signal stuff. |
|
1746 |
834
|
1747 AC_TYPE_SIGNAL |
5844
|
1748 AC_CHECK_DECLS([sys_siglist], [], [], |
|
1749 [#include <signal.h> |
|
1750 /* NetBSD declares sys_siglist in unistd.h. */ |
|
1751 #if HAVE_UNISTD_H |
|
1752 # include <unistd.h> |
|
1753 #endif |
|
1754 ]) |
2470
|
1755 OCTAVE_SIGNAL_CHECK |
|
1756 OCTAVE_REINSTALL_SIGHANDLERS |
6098
|
1757 if test "$ac_cv_type_signal" = "void"; then |
|
1758 AC_DEFINE(RETSIGTYPE_IS_VOID, 1, [Define if this if RETSIGTYPE is defined to be void. Needed because preprocessor comparisons to void fail on some systems.]) |
|
1759 fi |
869
|
1760 |
2633
|
1761 ### A system dependent kluge or two. |
|
1762 |
2035
|
1763 AC_CHECK_FUNCS(getrusage times) |
2427
|
1764 case "$canonical_host_type" in |
3971
|
1765 *-*-cygwin*) |
3887
|
1766 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) |
2427
|
1767 ;; |
|
1768 esac |
|
1769 |
2762
|
1770 bsd_gcc_kluge_targets_frag=/dev/null |
2633
|
1771 case "$canonical_host_type" in |
|
1772 *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) |
|
1773 bsd_gcc_kluge_targets_frag=Makefrag.bsd |
|
1774 cat << \EOF > $bsd_gcc_kluge_targets_frag |
|
1775 |
|
1776 lex.o: lex.cc |
|
1777 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1778 |
|
1779 pt-plot.o: pt-plot.cc |
|
1780 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1781 |
|
1782 symtab.o: symtab.cc |
|
1783 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1784 |
|
1785 toplev.o: toplev.cc |
|
1786 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1787 |
|
1788 unwind-prot.o: unwind-prot.cc |
|
1789 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1790 |
|
1791 EOF |
|
1792 ;; |
|
1793 esac |
|
1794 AC_SUBST_FILE(bsd_gcc_kluge_targets_frag) |
|
1795 |
869
|
1796 ### Checks for other programs used for building, testing, installing, |
|
1797 ### and running Octave. |
|
1798 |
4544
|
1799 AC_PROG_AWK |
4084
|
1800 OCTAVE_PROG_SED |
5465
|
1801 OCTAVE_PROG_PERL |
5496
|
1802 OCTAVE_PROG_PYTHON |
4084
|
1803 |
3729
|
1804 OCTAVE_PROG_FLEX |
|
1805 OCTAVE_PROG_BISON |
869
|
1806 |
1722
|
1807 AC_PROG_LN_S |
|
1808 |
3222
|
1809 OCTAVE_PROG_NM |
869
|
1810 |
405
|
1811 AC_PROG_INSTALL |
2642
|
1812 INSTALL_SCRIPT='${INSTALL}' |
|
1813 AC_SUBST(INSTALL_SCRIPT) |
869
|
1814 |
5468
|
1815 OCTAVE_PROG_DESKTOP_FILE_INSTALL |
|
1816 |
3130
|
1817 OCTAVE_PROG_GNUPLOT |
|
1818 OCTAVE_PROG_PAGER |
3673
|
1819 OCTAVE_PROG_GPERF |
3130
|
1820 |
5934
|
1821 OCTAVE_PROG_GHOSTSCRIPT |
|
1822 OCTAVE_PROG_MAKEINFO |
|
1823 OCTAVE_PROG_TEXI2DVI |
|
1824 OCTAVE_PROG_TEXI2PDF |
|
1825 |
2032
|
1826 ### Even though we include config.h, we need to have the preprocessor |
|
1827 ### defines available in a variable for the octave-bug script. Use |
|
1828 ### UGLY_DEFS for that. |
|
1829 |
|
1830 AC_OUTPUT_MAKE_DEFS |
3956
|
1831 |
6957
|
1832 ### We have to insert extra levels of backslash quoting here so that |
|
1833 ### the right thing ends up in oct-conf.h. |
6959
|
1834 UGLY_DEFS=`echo $DEFS | $SED 's,\\",\\\\\\\\\\\\\\\\\\",g'` |
5844
|
1835 AC_MSG_NOTICE([defining UGLY_DEFS to be $UGLY_DEFS]) |
2032
|
1836 AC_SUBST(UGLY_DEFS) |
|
1837 |
4645
|
1838 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're |
4587
|
1839 ### done feature testing. |
869
|
1840 |
3131
|
1841 if test -z "$EXTERN_CFLAGS"; then |
4626
|
1842 OCTAVE_CC_FLAG(-Wall, [ |
|
1843 WARN_CFLAGS="$WARN_CFLAGS -Wall"; |
|
1844 AC_MSG_RESULT([adding -Wall to WARN_CFLAGS])]) |
4645
|
1845 OCTAVE_CC_FLAG(-W, [ |
|
1846 WARN_CFLAGS="$WARN_CFLAGS -W"; |
|
1847 AC_MSG_RESULT([adding -W to WARN_CFLAGS])]) |
4626
|
1848 OCTAVE_CC_FLAG(-Wshadow, [ |
|
1849 WARN_CFLAGS="$WARN_CFLAGS -Wshadow"; |
|
1850 AC_MSG_RESULT([adding -Wshadow to WARN_CFLAGS])]) |
405
|
1851 fi |
3131
|
1852 |
|
1853 if test -z "$EXTERN_CXXFLAGS"; then |
4626
|
1854 OCTAVE_CXX_FLAG(-Wall, [ |
|
1855 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"; |
|
1856 AC_MSG_RESULT([adding -Wall to WARN_CXXFLAGS])]) |
4645
|
1857 OCTAVE_CXX_FLAG(-W, [ |
|
1858 WARN_CXXFLAGS="$WARN_CXXFLAGS -W"; |
|
1859 AC_MSG_RESULT([adding -W to WARN_CXXFLAGS])]) |
4626
|
1860 OCTAVE_CXX_FLAG(-Wshadow, [ |
|
1861 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow"; |
|
1862 AC_MSG_RESULT([adding -Wshadow to WARN_CXXFLAGS])]) |
5759
|
1863 OCTAVE_CXX_FLAG(-Wold-style-cast, [ |
|
1864 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wold-style-cast"; |
|
1865 AC_MSG_RESULT([adding -Wold-style-cast to WARN_CXXFLAGS])]) |
405
|
1866 fi |
869
|
1867 |
4971
|
1868 GCC_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wmissing-prototypes \ |
|
1869 -Wpointer-arith -Wstrict-prototypes -Wwrite-strings" |
2813
|
1870 |
5194
|
1871 GXX_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wpointer-arith \ |
|
1872 -Wwrite-strings -Weffc++ -Wenum-clash" |
2813
|
1873 |
|
1874 AC_ARG_ENABLE(picky-flags, |
5844
|
1875 [AS_HELP_STRING([--enable-picky-flags], |
|
1876 [add extra warning options to CFLAGS, CXXFLAGS, FFLAGS])], |
3131
|
1877 [if test "$enableval" = no; then |
|
1878 true |
2813
|
1879 elif test "$enableval" = yes; then |
3131
|
1880 if test -z "$EXTERN_CFLAGS"; then |
|
1881 for flag in $GCC_PICKY_FLAGS; do |
4626
|
1882 OCTAVE_CC_FLAG($flag, [ |
|
1883 WARN_CFLAGS="$WARN_CFLAGS $flag"; |
|
1884 AC_MSG_RESULT([adding $flag to WARN_CFLAGS])]) |
3131
|
1885 done |
2813
|
1886 fi |
3131
|
1887 if test -z "$EXTERN_CXXFLAGS"; then |
|
1888 for flag in $GXX_PICKY_FLAGS; do |
4626
|
1889 OCTAVE_CXX_FLAG($flag, [ |
|
1890 WARN_CXXFLAGS="$WARN_CXXFLAGS $flag"; |
|
1891 AC_MSG_RESULT([adding $flag to WARN_CXXFLAGS])]) |
3131
|
1892 done |
2813
|
1893 fi |
|
1894 fi], []) |
|
1895 |
4626
|
1896 AC_SUBST(WARN_CFLAGS) |
|
1897 AC_SUBST(WARN_CXXFLAGS) |
|
1898 |
1146
|
1899 ### Run configure in subdirectories. |
|
1900 |
1304
|
1901 export CC |
|
1902 export CXX |
|
1903 export F77 |
|
1904 |
4378
|
1905 AC_CONFIG_SUBDIRS(scripts) |
3887
|
1906 |
3923
|
1907 ### Some things to add to the bottom of config.h. |
|
1908 |
|
1909 AH_BOTTOM([ |
|
1910 #if defined (__GNUC__) |
5389
|
1911 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) |
3923
|
1912 #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__)) |
|
1913 #define GCC_ATTR_UNUSED __attribute__ ((__unused__)) |
|
1914 #else |
5389
|
1915 #define GCC_ATTR_DEPRECATED |
3923
|
1916 #define GCC_ATTR_NORETURN |
|
1917 #define GCC_ATTR_UNUSED |
|
1918 #endif |
|
1919 |
|
1920 #define X_CAST(T, E) (T) (E) |
|
1921 |
5854
|
1922 #if defined (CXX_BROKEN_REINTERPRET_CAST) |
|
1923 #define FCN_PTR_CAST(T, E) (T) (E) |
|
1924 #else |
|
1925 #define FCN_PTR_CAST(T, E) reinterpret_cast<T> (E) |
|
1926 #endif |
|
1927 |
3923
|
1928 #if defined(HAVE_F2C) && !defined(F77_FUNC) |
|
1929 # define F77_FUNC(x,X) x ## _ |
|
1930 # define F77_FUNC_(x,X) x ## __ |
|
1931 #endif |
|
1932 |
|
1933 #if !defined(HAVE_DEV_T) |
4064
|
1934 typedef short dev_t; |
3923
|
1935 #endif |
|
1936 |
|
1937 #if !defined(HAVE_INO_T) |
4064
|
1938 typedef unsigned long ino_t; |
3923
|
1939 #endif |
|
1940 |
|
1941 #if !defined(HAVE_NLINK_T) |
4064
|
1942 typedef short nlink_t; |
3923
|
1943 #endif |
|
1944 |
|
1945 #if !defined(HAVE_SIGSET_T) |
4064
|
1946 typedef int sigset_t; |
3923
|
1947 #endif |
4101
|
1948 |
4180
|
1949 #if !defined(HAVE_SIG_ATOMIC_T) |
|
1950 typedef int sig_atomic_t; |
|
1951 #endif |
|
1952 |
6122
|
1953 #if defined (_MSC_VER) |
|
1954 #define __WIN32__ |
6276
|
1955 #define WIN32 |
6122
|
1956 /* missing parameters in macros */ |
|
1957 #pragma warning (disable: 4003) |
|
1958 /* missing implementations in template instantiation */ |
|
1959 #pragma warning (disable: 4996) |
|
1960 /* deprecated function names (FIXME?) */ |
|
1961 #pragma warning (disable: 4661) |
|
1962 #endif |
|
1963 |
4377
|
1964 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
4101
|
1965 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 |
6049
|
1966 #elif defined (__CYGWIN__) |
4377
|
1967 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 |
|
1968 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 |
6049
|
1969 #else |
|
1970 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 |
4101
|
1971 #endif |
|
1972 |
|
1973 /* Define if we expect to have <windows.h>, Sleep, etc. */ |
4102
|
1974 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
4101
|
1975 #define OCTAVE_USE_WINDOWS_API 1 |
|
1976 #endif |
4153
|
1977 |
4180
|
1978 /* sigsetjmp is a macro, not a function. */ |
|
1979 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) |
|
1980 #define OCTAVE_HAVE_SIG_JUMP |
|
1981 #endif |
4249
|
1982 |
4726
|
1983 /* Always use vector<T>, since we sometimes allocate large chunks |
|
1984 of memory and that can cause trouble due to stack size limits. |
|
1985 |
|
1986 Note that using auto_ptr is not appropriate because it uses delete, |
|
1987 not delete[] and we need the latter to properly handle arrays |
|
1988 allocated with new[size]. |
|
1989 |
5174
|
1990 Use < T > instead of <T> to avoid problems if T is a template type |
|
1991 (say, foo<int>) and the preprocessor fails to insert a space and |
|
1992 generates <foo<int>>. |
|
1993 |
4366
|
1994 #if defined (HAVE_DYNAMIC_AUTO_ARRAYS) |
5174
|
1995 |
4249
|
1996 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ |
|
1997 T buf[size] |
5174
|
1998 |
|
1999 #else |
|
2000 |
|
2001 */ |
|
2002 |
4249
|
2003 #define OCTAVE_LOCAL_BUFFER(T, buf, size) \ |
5174
|
2004 std::vector< T > buf ## _vector (size); \ |
6149
|
2005 T *buf = ((size) > 0 ? &(buf ## _vector[0]) : 0) |
5174
|
2006 |
4382
|
2007 /* #endif */ |
4278
|
2008 |
|
2009 #if defined (__DECCXX) |
|
2010 #define __USE_STD_IOSTREAM |
|
2011 #endif |
4552
|
2012 |
|
2013 #if defined (_UNICOS) |
|
2014 #define F77_USES_CRAY_CALLING_CONVENTION |
|
2015 #endif |
|
2016 |
|
2017 #if 0 |
|
2018 #define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION |
|
2019 #endif |
5275
|
2020 |
5297
|
2021 #ifdef USE_64_BIT_IDX_T |
|
2022 #define SIZEOF_OCTAVE_IDX_TYPE 8 |
|
2023 #else |
|
2024 #define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT |
|
2025 #endif |
|
2026 |
6121
|
2027 #include "oct-dlldefs.h" |
5275
|
2028 #include "oct-types.h" |
3923
|
2029 ]) |
|
2030 |
869
|
2031 ### Do the substitutions in all the Makefiles. |
|
2032 |
5451
|
2033 AC_CONFIG_FILES([Makefile octMakefile Makeconf test/Makefile \ |
6001
|
2034 dlfcn/Makefile doc/Makefile doc/faq/Makefile doc/interpreter/Makefile |
5648
|
2035 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \ |
|
2036 examples/Makefile liboctave/Makefile liboctave/oct-types.h \ |
6686
|
2037 src/Makefile src/mxarray.h libcruft/Makefile libcruft/Makerules \ |
5275
|
2038 libcruft/amos/Makefile libcruft/blas/Makefile \ |
|
2039 libcruft/daspk/Makefile libcruft/dasrt/Makefile |
|
2040 libcruft/dassl/Makefile libcruft/fftpack/Makefile \ |
|
2041 libcruft/lapack/Makefile libcruft/minpack/Makefile \ |
|
2042 libcruft/misc/Makefile libcruft/odepack/Makefile \ |
4329
|
2043 libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile \ |
|
2044 libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile \ |
|
2045 libcruft/slatec-err/Makefile libcruft/villad/Makefile \ |
3887
|
2046 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) |
|
2047 AC_OUTPUT |
1225
|
2048 |
3887
|
2049 AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]]) |
3176
|
2050 |
1225
|
2051 ### Print a summary so that important information isn't missed. |
|
2052 |
|
2053 if test -z "$F77"; then |
|
2054 FORT="$F2C $F2CFLAGS" |
|
2055 else |
2610
|
2056 FORT="$F77 $FFLAGS" |
1225
|
2057 fi |
|
2058 |
7054
|
2059 if $have_fortran_compiler; then |
|
2060 true |
|
2061 elif $have_f2c; then |
|
2062 FLIBS="$F2CLIBS" |
|
2063 fi |
|
2064 |
5844
|
2065 AC_MSG_NOTICE([ |
1225
|
2066 |
|
2067 Octave is now configured for $canonical_host_type |
|
2068 |
1664
|
2069 Source directory: $srcdir |
|
2070 Installation prefix: $prefix |
4626
|
2071 C compiler: $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS |
|
2072 C++ compiler: $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS |
1664
|
2073 Fortran compiler: $FORT |
|
2074 Fortran libraries: $FLIBS |
3820
|
2075 BLAS libraries: $BLAS_LIBS |
3827
|
2076 FFTW libraries: $FFTW_LIBS |
5235
|
2077 GLPK libraries: $GLPK_LIBS |
5203
|
2078 UMFPACK libraries: $UMFPACK_LIBS |
6024
|
2079 AMD libraries: $AMD_LIBS |
|
2080 CAMD libraries: $CAMD_LIBS |
5451
|
2081 COLAMD libraries: $COLAMD_LIBS |
|
2082 CCOLAMD libraries: $CCOLAMD_LIBS |
|
2083 CHOLMOD libraries: $CHOLMOD_LIBS |
5610
|
2084 CXSPARSE libraries: $CXSPARSE_LIBS |
3820
|
2085 HDF5 libraries: $HDF5_LIBS |
6043
|
2086 CURL libraries: $CURL_LIBS |
6024
|
2087 REGEX libraries: $REGEX_LIBS |
6829
|
2088 QHULL libraries: $QHULL_LIBS |
3822
|
2089 LIBS: $LIBS |
1664
|
2090 Default pager: $DEFAULT_PAGER |
|
2091 gnuplot: $GNUPLOT_BINARY |
|
2092 |
4110
|
2093 Do internal array bounds checking: $BOUNDS_CHECKING |
|
2094 Build static libraries: $STATIC_LIBS |
|
2095 Build shared libraries: $SHARED_LIBS |
4128
|
2096 Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG |
4110
|
2097 Include support for GNU readline: $USE_READLINE |
5275
|
2098 64-bit array dims and indexing: $USE_64_BIT_IDX_T |
1225
|
2099 ]) |
3105
|
2100 |
|
2101 warn_msg_printed=false |
|
2102 |
4469
|
2103 if $ENABLE_DYNAMIC_LINKING; then |
|
2104 if $SHARED_LIBS; then |
|
2105 true |
|
2106 else |
|
2107 AC_MSG_WARN([You used --enable-dl but not --enable-shared.]) |
|
2108 AC_MSG_WARN([Are you sure that is what you want to do?]) |
|
2109 warn_msg_printed=true |
|
2110 fi |
|
2111 fi |
|
2112 |
3105
|
2113 if test -n "$warn_f2c_and_f77"; then |
|
2114 AC_MSG_WARN($warn_f2c_and_f77) |
|
2115 warn_msg_printed=true |
|
2116 fi |
|
2117 |
|
2118 if test -n "$gxx_only"; then |
|
2119 AC_MSG_WARN($gxx_only) |
|
2120 warn_msg_printed=true |
|
2121 fi |
|
2122 |
|
2123 if test -n "$warn_gcc_version"; then |
|
2124 AC_MSG_WARN($warn_gcc_version) |
|
2125 warn_msg_printed=true |
|
2126 fi |
|
2127 |
|
2128 if test -n "$warn_gcc_only"; then |
|
2129 AC_MSG_WARN($warn_gcc_only) |
|
2130 warn_msg_printed=true |
|
2131 fi |
|
2132 |
|
2133 if test -n "$warn_f2c_no_lib"; then |
|
2134 AC_MSG_WARN($warn_f2c_no_lib) |
|
2135 warn_msg_printed=true |
|
2136 fi |
|
2137 |
3825
|
2138 if test -n "$warn_readline"; then |
|
2139 AC_MSG_WARN($warn_readline) |
|
2140 warn_msg_printed=true |
|
2141 fi |
|
2142 |
3105
|
2143 if test -n "$warn_termlibs"; then |
|
2144 AC_MSG_WARN($warn_termlibs) |
|
2145 warn_msg_printed=true |
|
2146 fi |
|
2147 |
3673
|
2148 if test -n "$warn_gperf"; then |
|
2149 AC_MSG_WARN($warn_gperf) |
|
2150 warn_msg_printed=true |
|
2151 fi |
|
2152 |
3105
|
2153 if test -n "$warn_flex"; then |
|
2154 AC_MSG_WARN($warn_flex) |
|
2155 warn_msg_printed=true |
|
2156 fi |
|
2157 |
|
2158 if test -n "$warn_bison"; then |
|
2159 AC_MSG_WARN($warn_bison) |
|
2160 warn_msg_printed=true |
|
2161 fi |
|
2162 |
|
2163 if test -n "$warn_less"; then |
|
2164 AC_MSG_WARN($warn_less) |
|
2165 warn_msg_printed=true |
|
2166 fi |
|
2167 |
5203
|
2168 if test -n "$warn_umfpack"; then |
|
2169 AC_MSG_WARN($warn_umfpack) |
|
2170 warn_msg_printed=true |
|
2171 fi |
|
2172 |
5451
|
2173 if test -n "$warn_colamd"; then |
|
2174 AC_MSG_WARN($warn_colamd) |
|
2175 warn_msg_printed=true |
|
2176 fi |
|
2177 |
|
2178 if test -n "$warn_ccolamd"; then |
|
2179 AC_MSG_WARN($warn_ccolamd) |
|
2180 warn_msg_printed=true |
|
2181 fi |
|
2182 |
|
2183 if test -n "$warn_cholmod"; then |
|
2184 AC_MSG_WARN($warn_cholmod) |
|
2185 warn_msg_printed=true |
|
2186 fi |
|
2187 |
5703
|
2188 if test -n "$warn_cxsparse"; then |
|
2189 AC_MSG_WARN($warn_cxsparse) |
|
2190 warn_msg_printed=true |
|
2191 fi |
|
2192 |
6335
|
2193 if test -n "$warn_curl"; then |
|
2194 AC_MSG_WARN($warn_curl) |
|
2195 warn_msg_printed=true |
|
2196 fi |
|
2197 |
6133
|
2198 if test -n "$warn_fftw"; then |
|
2199 AC_MSG_WARN($warn_fftw) |
|
2200 warn_msg_printed=true |
|
2201 fi |
|
2202 |
|
2203 if test -n "$warn_glpk"; then |
|
2204 AC_MSG_WARN($warn_glpk) |
|
2205 warn_msg_printed=true |
|
2206 fi |
|
2207 |
5203
|
2208 if test -n "$warn_hdf5"; then |
|
2209 AC_MSG_WARN($warn_hdf5) |
|
2210 warn_msg_printed=true |
|
2211 fi |
|
2212 |
6133
|
2213 if test -n "$warn_regex"; then |
|
2214 AC_MSG_WARN($warn_regex) |
|
2215 warn_msg_printed=true |
|
2216 fi |
|
2217 |
6025
|
2218 if test -n "$warn_pcre"; then |
|
2219 AC_MSG_WARN($warn_pcre) |
|
2220 warn_msg_printed=true |
|
2221 fi |
|
2222 |
6829
|
2223 if test -n "$warn_qhull"; then |
|
2224 AC_MSG_WARN($warn_qhull) |
|
2225 warn_msg_printed=true |
|
2226 fi |
|
2227 |
5270
|
2228 if test -n "$warn_zlib"; then |
|
2229 AC_MSG_WARN($warn_zlib) |
|
2230 warn_msg_printed=true |
|
2231 fi |
|
2232 |
5934
|
2233 if test -n "$warn_ghostscript"; then |
|
2234 AC_MSG_WARN($warn_ghostscript) |
|
2235 warn_msg_printed=true |
|
2236 fi |
|
2237 |
|
2238 if test -n "$warn_makeinfo"; then |
|
2239 AC_MSG_WARN($warn_makeinfo) |
|
2240 warn_msg_printed=true |
|
2241 fi |
|
2242 |
|
2243 if test -n "$warn_texi2dvi"; then |
|
2244 AC_MSG_WARN($warn_texi2dvi) |
|
2245 warn_msg_printed=true |
|
2246 fi |
|
2247 |
|
2248 if test -n "$warn_texi2pdf"; then |
|
2249 AC_MSG_WARN($warn_texi2pdf) |
|
2250 warn_msg_printed=true |
|
2251 fi |
|
2252 |
5275
|
2253 if test -n "$warn_64_bit"; then |
|
2254 AC_MSG_WARN($warn_64_bit) |
|
2255 warn_msg_printed=true |
|
2256 fi |
|
2257 |
3105
|
2258 if test -n "$warn_gnuplot"; then |
|
2259 |
|
2260 ## If you change this text, be sure to also change the corresponding |
|
2261 ## set of warnings above. |
|
2262 |
6161
|
2263 AC_MSG_WARN([]) |
3105
|
2264 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
|
2265 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) |
|
2266 AC_MSG_WARN([plotting commands without it.]) |
|
2267 AC_MSG_WARN([]) |
|
2268 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) |
|
2269 AC_MSG_WARN([tell Octave where to find it by typing the command]) |
|
2270 AC_MSG_WARN([]) |
|
2271 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) |
|
2272 AC_MSG_WARN([]) |
|
2273 AC_MSG_WARN([at the Octave prompt.]) |
6161
|
2274 AC_MSG_WARN([]) |
3105
|
2275 warn_msg_printed=true |
|
2276 fi |
|
2277 |
5857
|
2278 if $USE_64_BIT_IDX_T; then |
6161
|
2279 AC_MSG_WARN([]) |
5857
|
2280 AC_MSG_WARN([You used the EXPERIMENTAL --enable-64 option.]) |
|
2281 AC_MSG_WARN([Are you sure that is what you want to do?]) |
|
2282 AC_MSG_WARN([]) |
|
2283 AC_MSG_WARN([You must ensure that the Fortran compiler generates]) |
|
2284 AC_MSG_WARN([code with 8 byte signed INTEGER values, and that your]) |
|
2285 AC_MSG_WARN([BLAS and LAPACK libraries are compiled to use 8 byte]) |
|
2286 AC_MSG_WARN([signed integers for array indexing.]) |
6161
|
2287 AC_MSG_WARN([]) |
5857
|
2288 warn_msg_printed=true |
3105
|
2289 fi |
|
2290 |
6191
|
2291 if $warn_msg_printed; then |
6161
|
2292 AC_MSG_NOTICE([ |
|
2293 |
|
2294 NOTE: libraries may be skipped if a library is not found OR |
|
2295 if the library on your system is missing required features. |
|
2296 ]) |
|
2297 fi |
|
2298 |
3105
|
2299 ### End of configure. |