Mercurial > octave-nkf
comparison configure.ac @ 9645:4531741e5236
configure tweaks
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 15 Sep 2009 13:48:39 -0400 |
parents | configure.in@16907d1153d1 |
children | 11844593875a |
comparison
equal
deleted
inserted
replaced
9644:080e11f1b0c1 | 9645:4531741e5236 |
---|---|
1 dnl configure.in | |
2 dnl | |
3 dnl Process this file with autoconf to produce a configure script. | |
4 dnl | |
5 dnl Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
6 dnl 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, | |
7 dnl 2009 John W. Eaton | |
8 ### | |
9 ### This file is part of Octave. | |
10 ### | |
11 ### Octave is free software; you can redistribute it and/or modify it | |
12 ### under the terms of the GNU General Public License as published by the | |
13 ### Free Software Foundation; either version 3 of the License, or (at | |
14 ### your option) any later version. | |
15 ### | |
16 ### Octave is distributed in the hope that it will be useful, but WITHOUT | |
17 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
18 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
19 ### for more details. | |
20 ### | |
21 ### You should have received a copy of the GNU General Public License | |
22 ### along with Octave; see the file COPYING. If not, see | |
23 ### <http://www.gnu.org/licenses/>. | |
24 | |
25 ### Preserve CFLAGS and CXXFLAGS from the environment before doing | |
26 ### anything else because we don't know which macros might call | |
27 ### AC_PROG_CC or AC_PROG_CXX. | |
28 | |
29 EXTERN_CFLAGS="$CFLAGS" | |
30 EXTERN_CXXFLAGS="$CXXFLAGS" | |
31 | |
32 AC_INIT | |
33 AC_REVISION($Revision: 1.603 $) | |
34 AC_PREREQ(2.60) | |
35 AC_CONFIG_SRCDIR([src/octave.cc]) | |
36 AC_CONFIG_HEADER(config.h) | |
37 | |
38 OCTAVE_HOST_TYPE | |
39 | |
40 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) | |
41 | |
42 dnl FIXME -- we should probably only generate this file if it is missing. | |
43 ### Produce unistd.h for MSVC target, this simplifies changes in | |
44 ### Octave source tree and avoid problems with lex-generated code. | |
45 case "$canonical_host_type" in | |
46 *-*-msdosmsvc) | |
47 AC_MSG_NOTICE([Generating replacement for <unistd.h> for MSVC]) | |
48 cat << \EOF > unistd.h | |
49 /* File generated by configure script. */ | |
50 #include <direct.h> | |
51 #include <io.h> | |
52 #include <process.h> | |
53 EOF | |
54 CPPFLAGS="-I. $CPPFLAGS" | |
55 ;; | |
56 esac | |
57 | |
58 AC_USE_SYSTEM_EXTENSIONS | |
59 | |
60 ### Path separator. | |
61 sepchar=: | |
62 AC_ARG_WITH(sepchar, | |
63 [AS_HELP_STRING([--with-sepchar=<char>], | |
64 [use <char> as the path separation character])]) | |
65 case $with_sepchar in | |
66 yes | "") | |
67 case "$canonical_host_type" in | |
68 *-*-mingw* | *-*-msdosmsvc) | |
69 sepchar=';' | |
70 ;; | |
71 esac | |
72 ;; | |
73 no) | |
74 AC_MSG_ERROR([You are required to define a path separation character]) | |
75 ;; | |
76 *) | |
77 sepchar=$with_sepchar | |
78 ;; | |
79 esac | |
80 AC_SUBST(sepchar) | |
81 AC_DEFINE_UNQUOTED(SEPCHAR, ['$sepchar'], [Define this to be the path separator for your system, as a character constant.]) | |
82 AC_DEFINE_UNQUOTED(SEPCHAR_STR, ["$sepchar"], [Define this to the path separator, as a string.]) | |
83 | |
84 ### some defaults | |
85 | |
86 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') | |
87 OCTAVE_SET_DEFAULT(man1ext, '.1') | |
88 OCTAVE_SET_DEFAULT(doc_cache_file, '$(octetcdir)/doc-cache') | |
89 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') | |
90 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') | |
91 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') | |
92 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') | |
93 OCTAVE_SET_DEFAULT(localapifcnfiledir, | |
94 '$(datadir)/octave/site/$(api_version)/m') | |
95 OCTAVE_SET_DEFAULT(localverfcnfiledir, '$(datadir)/octave/$(version)/site/m') | |
96 OCTAVE_SET_DEFAULT(octetcdir, '$(datadir)/octave/$(version)/etc') | |
97 OCTAVE_SET_DEFAULT(octlibdir, '$(libdir)/octave-$(version)') | |
98 OCTAVE_SET_DEFAULT(archlibdir, | |
99 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') | |
100 OCTAVE_SET_DEFAULT(localarchlibdir, | |
101 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') | |
102 OCTAVE_SET_DEFAULT(localapiarchlibdir, | |
103 '$(libexecdir)/octave/$(api_version)/site/exec/$(canonical_host_type)') | |
104 OCTAVE_SET_DEFAULT(localverarchlibdir, | |
105 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') | |
106 OCTAVE_SET_DEFAULT(octfiledir, | |
107 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') | |
108 OCTAVE_SET_DEFAULT(localoctfiledir, | |
109 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') | |
110 OCTAVE_SET_DEFAULT(localapioctfiledir, | |
111 '$(libexecdir)/octave/site/oct/$(api_version)/$(canonical_host_type)') | |
112 OCTAVE_SET_DEFAULT(localveroctfiledir, | |
113 '$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)') | |
114 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') | |
115 | |
116 ### Find pkg-config executable (sets $PKG_CONFIG) | |
117 | |
118 PKG_PROG_PKG_CONFIG | |
119 | |
120 ### Make configure args available for other uses. | |
121 | |
122 config_opts=$ac_configure_args | |
123 AC_SUBST(config_opts) | |
124 | |
125 ### Make it possible to have Octave's array and matrix classes do bounds | |
126 ### checking on element references. This slows some operations down a | |
127 ### bit, so it is turned off by default. | |
128 | |
129 BOUNDS_CHECKING=false | |
130 AC_ARG_ENABLE(bounds-check, | |
131 [AS_HELP_STRING([--enable-bounds-check], | |
132 [bounds checking for indexing in internal array classes (default is no)])], | |
133 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) | |
134 if $BOUNDS_CHECKING; then | |
135 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) | |
136 fi | |
137 | |
138 ### If possible, use a 64-bit integer type for array dimensions and indexing. | |
139 | |
140 USE_64_BIT_IDX_T=false | |
141 OCTAVE_IDX_TYPE=int | |
142 AC_ARG_ENABLE(64, | |
143 [AS_HELP_STRING([--enable-64], | |
144 [(EXPERIMENTAL) use 64-bit integers for array dimensions and indexing])], | |
145 [if test "$enableval" = yes; then USE_64_BIT_IDX_T=true; fi], []) | |
146 if $USE_64_BIT_IDX_T; then | |
147 AC_CHECK_SIZEOF(void *) | |
148 AC_CHECK_SIZEOF(int) | |
149 AC_CHECK_SIZEOF(long) | |
150 if test $ac_cv_sizeof_void_p -eq 8; then | |
151 if test $ac_cv_sizeof_int -eq 8; then | |
152 OCTAVE_IDX_TYPE=int | |
153 elif test $ac_cv_sizeof_long -eq 8; then | |
154 OCTAVE_IDX_TYPE=long | |
155 AC_DEFINE(IDX_TYPE_LONG, 1, [Define to 1 if octave index type is long]) | |
156 else | |
157 warn_64_bit="no suitable type found for octave_idx_type so disabling 64-bit features" | |
158 AC_MSG_WARN($warn_64_bit) | |
159 USE_64_BIT_IDX_T=false | |
160 fi | |
161 else | |
162 warn_64_bit="pointers are not 64-bits wide so disabling 64-bit features" | |
163 AC_MSG_WARN($warn_64_bit) | |
164 USE_64_BIT_IDX_T=false | |
165 fi | |
166 fi | |
167 AC_SUBST(OCTAVE_IDX_TYPE) | |
168 if $USE_64_BIT_IDX_T; then | |
169 AC_DEFINE(USE_64_BIT_IDX_T, 1, [Define if using 64-bit integers for array dimensions and indexing]) | |
170 fi | |
171 AC_SUBST(USE_64_BIT_IDX_T) | |
172 | |
173 ### It seems that there are some broken inline assembly functions in | |
174 ### the GNU libc. Since I'm not sure how to test whether we are using | |
175 ### GNU libc, just disable them for all platforms. | |
176 | |
177 AC_MSG_NOTICE([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) | |
178 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) | |
179 | |
180 ### See which C++ compiler to use (we expect to find g++). | |
181 | |
182 AC_PROG_CXX | |
183 AC_PROG_CXXCPP | |
184 | |
185 ### Do special things for g++. | |
186 | |
187 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ | |
188 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//' -e 's/ .*//'` | |
189 | |
190 case "$gxx_version" in | |
191 1.* | 2.[[0123456789]].* | 3.[[01234]].*) | |
192 AC_MSG_ERROR([g++ version $gxx_version will probably fail to compile Octave] | |
193 ) | |
194 ;; | |
195 esac | |
196 | |
197 CXX_VERSION= | |
198 if test -n "$gxx_version"; then | |
199 CXX_VERSION="$gxx_version" | |
200 fi | |
201 AC_SUBST(CXX_VERSION) | |
202 | |
203 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL | |
204 OCTAVE_CXX_ISO_COMPLIANT_LIBRARY | |
205 OCTAVE_CXX_BROKEN_REINTERPRET_CAST | |
206 | |
207 ### See which C compiler to use (we expect to find gcc). | |
208 | |
209 AC_PROG_CC | |
210 AC_PROG_CPP | |
211 AC_PROG_GCC_TRADITIONAL | |
212 | |
213 ### Do special things for gcc. | |
214 | |
215 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ | |
216 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` | |
217 case "$gcc_version" in | |
218 2.*) | |
219 if test -z "$LDFLAGS"; then | |
220 LDFLAGS="-g" | |
221 AC_MSG_NOTICE([defining LDFLAGS to be $LDFLAGS]) | |
222 fi | |
223 ;; | |
224 1.*) | |
225 warn_gcc_version="gcc version $gcc_version is likely to cause problems" | |
226 AC_MSG_WARN($warn_gcc_version) | |
227 ;; | |
228 esac | |
229 | |
230 CC_VERSION= | |
231 if test -n "$gcc_version"; then | |
232 CC_VERSION="$gcc_version" | |
233 fi | |
234 AC_SUBST(CC_VERSION) | |
235 | |
236 ### The flag to create dependency varies depending on the compier. | |
237 | |
238 # Assume GCC. | |
239 INCLUDE_DEPS=true | |
240 DEPEND_FLAGS="-M" | |
241 DEPEND_EXTRA_SED_PATTERN="" | |
242 if test "$GCC" = yes; then | |
243 true | |
244 else | |
245 case "$canonical_host_type" in | |
246 sparc-sun-solaris2* | i386-pc-solaris2*) | |
247 DEPEND_FLAGS="-xM1" | |
248 DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" | |
249 ;; | |
250 *-*-msdosmsvc) | |
251 ;; | |
252 *) | |
253 INCLUDE_DEPS=false | |
254 ;; | |
255 esac | |
256 fi | |
257 AC_SUBST(INCLUDE_DEPS) | |
258 AC_SUBST(DEPEND_FLAGS) | |
259 AC_SUBST(DEPEND_EXTRA_SED_PATTERN) | |
260 | |
261 ACX_PTHREAD | |
262 | |
263 AC_PATH_X | |
264 if test "$have_x"; then | |
265 AC_DEFINE(HAVE_X_WINDOWS, 1, [Define if you have X11]) | |
266 | |
267 if test "$x_includes" != "NONE"; then | |
268 X11_INCFLAGS="$x_includes" | |
269 fi | |
270 AC_SUBST(X11_INCFLAGS) | |
271 | |
272 if test -z $x_libraries; then | |
273 AC_CHECK_LIB(X11, XrmInitialize, [X11_LIBS=-lX11], [X11_LIBS=]) | |
274 elif test $x_libraries != "NONE"; then | |
275 AC_CHECK_LIB(X11, XrmInitialize, | |
276 [X11_LIBS="-L$x_libraries -lX11"], [X11_LIBS=], "-L$x_libraries") | |
277 fi | |
278 AC_SUBST(X11_LIBS) | |
279 fi | |
280 | |
281 ### On MacOSX system the Carbon framework is used to determine ScreenSize | |
282 OCTAVE_HAVE_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>], [CGMainDisplayID ()], | |
283 [have_framework_carbon="yes"], [have_framework_carbon="no"]) | |
284 if test $have_framework_carbon = "yes"; then | |
285 AC_DEFINE(HAVE_FRAMEWORK_CARBON, 1, [Define if framework CARBON is available.]) | |
286 CARBON_LIBS="-Wl,-framework -Wl,Carbon" | |
287 AC_MSG_NOTICE([adding -Wl,-framework -Wl,Carbon to CARBON_LIBS]) | |
288 AC_SUBST(CARBON_LIBS) | |
289 fi | |
290 | |
291 ### When compiling math for x87, problems may arise in some code comparing | |
292 ### floating-point intermediate results. | |
293 ### Generally, it helps to store the result in a local volatile variable, | |
294 ### but it also degrades performance. | |
295 ### Thus, we provide a FLOAT_TRUNCATE macro that may be defined to "volatile" | |
296 ### when compiling for x87 target, or left empty for modern SSE math, that | |
297 ### doesn't suffer from this problem at all. | |
298 AC_ARG_ENABLE(float-truncate, | |
299 [AS_HELP_STRING([--enable-float-truncate], | |
300 [enables truncating intermediate FP results.])], | |
301 [if test "$enableval" = yes; then ac_float_truncate=volatile; | |
302 else ac_float_truncate=; fi], | |
303 ac_float_truncate=) | |
304 | |
305 AC_DEFINE_UNQUOTED(FLOAT_TRUNCATE, $ac_float_truncate, | |
306 [Define to volatile if you need truncating intermediate FP results]) | |
307 | |
308 ### On Intel systems with gcc, we may need to compile with -mieee-fp | |
309 ### and -ffloat-store to get full support for IEEE floating point. | |
310 ### | |
311 ### On Alpha/OSF systems, we need -mieee. | |
312 | |
313 ieee_fp_flag= | |
314 case "$canonical_host_type" in | |
315 ## Keep this pattern first, so that it is preferred over the | |
316 ## following pattern for x86. | |
317 *-*-msdosmsvc) | |
318 CXXFLAGS="$CXXFLAGS -EHs -MD" | |
319 CFLAGS="$CFLAGS -MD" | |
320 ;; | |
321 i[[3456789]]86-*-*) | |
322 if test "$GCC" = yes; then | |
323 OCTAVE_CC_FLAG(-mieee-fp, [ | |
324 ieee_fp_flag=-mieee-fp | |
325 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" | |
326 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CFLAGS])]) | |
327 | |
328 ### OCTAVE_CC_FLAG(-ffloat-store, [ | |
329 ### float_store_flag=-ffloat-store | |
330 ### XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" | |
331 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) | |
332 fi | |
333 if test "$GXX" = yes; then | |
334 OCTAVE_CXX_FLAG(-mieee-fp, [ | |
335 ieee_fp_flag=-mieee-fp | |
336 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" | |
337 AC_MSG_NOTICE([adding -mieee-fp to XTRA_CXXFLAGS])]) | |
338 | |
339 ### OCTAVE_CXX_FLAG(-ffloat-store, [ | |
340 ### float_store_flag=-ffloat-store | |
341 ### XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" | |
342 ### AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) | |
343 fi | |
344 ;; | |
345 alpha*-*-*) | |
346 if test "$GCC" = yes; then | |
347 OCTAVE_CC_FLAG(-mieee, [ | |
348 ieee_fp_flag=-mieee | |
349 XTRA_CFLAGS="$XTRA_CFLAGS -mieee" | |
350 AC_MSG_NOTICE([adding -mieee to XTRA_CFLAGS])]) | |
351 else | |
352 OCTAVE_CC_FLAG(-ieee, [ | |
353 ieee_fp_flag=-ieee | |
354 XTRA_CFLAGS="$XTRA_CFLAGS -ieee" | |
355 AC_MSG_NOTICE([adding -ieee to XTRA_CFLAGS])]) | |
356 fi | |
357 if test "$GXX" = yes; then | |
358 OCTAVE_CXX_FLAG(-mieee, [ | |
359 ieee_fp_flag=-mieee | |
360 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" | |
361 AC_MSG_NOTICE([adding -mieee to XTRA_CXXFLAGS])]) | |
362 else | |
363 OCTAVE_CXX_FLAG(-ieee, [ | |
364 ieee_fp_flag=-ieee | |
365 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" | |
366 AC_MSG_NOTICE([adding -ieee to XTRA_CXXFLAGS])]) | |
367 fi | |
368 ;; | |
369 *ibm-aix4*) | |
370 OCTAVE_CC_FLAG(-mminimal-toc, [ | |
371 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) | |
372 | |
373 OCTAVE_CXX_FLAG(-mminimal-toc, [ | |
374 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) | |
375 ;; | |
376 esac | |
377 | |
378 AC_SUBST(XTRA_CFLAGS) | |
379 AC_SUBST(XTRA_CXXFLAGS) | |
380 | |
381 ### Use -static if compiling on Alpha OSF/1 1.3 systems. | |
382 | |
383 case "$canonical_host_type" in | |
384 alpha*-dec-osf1.3) | |
385 LD_STATIC_FLAG=-static | |
386 ;; | |
387 esac | |
388 if test -n "$LD_STATIC_FLAG"; then | |
389 AC_MSG_NOTICE([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) | |
390 fi | |
391 AC_SUBST(LD_STATIC_FLAG) | |
392 | |
393 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are | |
394 ### the compilers that we use for building tools on the build system. | |
395 ### For now, we assume that the only cross compiling we can do is | |
396 ### with gcc on a Unixy system, but the dedicated hacker can override these. | |
397 | |
398 if test "$cross_compiling" = yes; then | |
399 BUILD_CC="gcc" | |
400 BUILD_CFLAGS="-O2 -g" | |
401 BUILD_CXX="g++" | |
402 BUILD_CXXFLAGS="-O2 -g" | |
403 BUILD_LDFLAGS="" | |
404 BUILD_EXEEXT="" | |
405 else | |
406 BUILD_CC='$(CC)' | |
407 BUILD_CFLAGS='$(CFLAGS)' | |
408 BUILD_CXX='$(CXX)' | |
409 BUILD_CXXFLAGS='$(CXXFLAGS)' | |
410 BUILD_LDFLAGS='$(LDFLAGS)' | |
411 case "$canonical_host_type" in | |
412 sparc-sun-solaris2*) | |
413 if test "$GCC" != yes; then | |
414 ## The Sun C++ compiler never seems to complete compiling | |
415 ## gendoc.cc unless we reduce the optimization level... | |
416 BUILD_CXXFLAGS="-g -O1" | |
417 fi | |
418 ;; | |
419 esac | |
420 BUILD_EXEEXT='$(EXEEXT)' | |
421 fi | |
422 | |
423 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) | |
424 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) | |
425 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) | |
426 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) | |
427 AC_ARG_VAR(BUILD_LDFLAGS, [build system C++ compiler link flags (used if cross compiling)]) | |
428 AC_ARG_VAR(BUILD_EXEEXT, [build system executable extension (used if cross compiling)]) | |
429 | |
430 dnl This is bogus. We shouldn't have to explicitly add libc too! | |
431 dnl Keep this check before the check for the Fortran compiler, | |
432 dnl in case -lm is needed to compile Fortran programs. | |
433 | |
434 ### Look for math library. If found, this will add -lm to LIBS. | |
435 | |
436 case "$canonical_host_type" in | |
437 *-*-nextstep*) | |
438 ;; | |
439 *-*-linux*) | |
440 AC_CHECK_LIB(m, sin, , , -lc) | |
441 ;; | |
442 *) | |
443 AC_CHECK_LIB(m, sin) | |
444 ;; | |
445 esac | |
446 | |
447 ## Default FFLAGS is -O. | |
448 if test "x$FFLAGS" = x; then | |
449 FFLAGS="-O" | |
450 fi | |
451 | |
452 ## the F77 variable, if set, overrides AC_PROG_F77 automatically | |
453 AC_PROG_F77 | |
454 AC_F77_LIBRARY_LDFLAGS | |
455 AC_F77_DUMMY_MAIN | |
456 AC_F77_WRAPPERS | |
457 | |
458 F77_TOLOWER=true | |
459 F77_APPEND_UNDERSCORE=true | |
460 F77_APPEND_EXTRA_UNDERSCORE=true | |
461 | |
462 case "$ac_cv_f77_mangling" in | |
463 "upper case") F77_TOLOWER=false ;; | |
464 esac | |
465 case "$ac_cv_f77_mangling" in | |
466 "no underscore") F77_APPEND_UNDERSCORE=false ;; | |
467 esac | |
468 case "$ac_cv_f77_mangling" in | |
469 "no extra underscore") F77_APPEND_EXTRA_UNDERSCORE=false ;; | |
470 esac | |
471 | |
472 case "$canonical_host_type" in | |
473 i[[3456789]]86-*-*) | |
474 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
475 OCTAVE_F77_FLAG(-mieee-fp) | |
476 ### OCTAVE_F77_FLAG(-ffloat-store) | |
477 fi | |
478 ;; | |
479 alpha*-*-*) | |
480 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
481 OCTAVE_F77_FLAG(-mieee) | |
482 else | |
483 OCTAVE_F77_FLAG(-ieee) | |
484 OCTAVE_F77_FLAG(-fpe1) | |
485 fi | |
486 ;; | |
487 powerpc-apple-machten*) | |
488 FFLAGS= | |
489 ;; | |
490 esac | |
491 | |
492 if test -n "$FFLAGS"; then | |
493 AC_MSG_NOTICE([defining FFLAGS to be $FFLAGS]) | |
494 fi | |
495 | |
496 AC_SUBST(F77_TOLOWER) | |
497 AC_SUBST(F77_APPEND_UNDERSCORE) | |
498 AC_SUBST(F77_APPEND_EXTRA_UNDERSCORE) | |
499 | |
500 if test -z "$F77"; then | |
501 AC_MSG_ERROR([in order to build octave, you must have a compatible Fortran compiler or wrapper script for f2c that functions as a Fortran compiler installed and in your path. See the file INSTALL for more information.]) | |
502 fi | |
503 | |
504 OCTAVE_CHECK_FORTRAN_INTEGER_SIZE | |
505 if test "x$octave_cv_fortran_integer_size" = xno; then | |
506 if $USE_64_BIT_IDX_T; then | |
507 case "$F77" in | |
508 gfortran) | |
509 case "$FFLAGS" in | |
510 *-fdefault-integer-8*) | |
511 ;; | |
512 *) | |
513 AC_MSG_NOTICE([adding -fdefault-integer-8 to FFLAGS]) | |
514 FFLAGS="-fdefault-integer-8 $FFLAGS" | |
515 ## Invalidate the cache and try again. | |
516 $as_unset octave_cv_fortran_integer_size | |
517 ;; | |
518 esac | |
519 ;; | |
520 esac | |
521 if test -z "$octave_cv_fortran_integer_size"; then | |
522 OCTAVE_CHECK_FORTRAN_INTEGER_SIZE | |
523 fi | |
524 if test "x$octave_cv_fortran_integer_size" = xno; then | |
525 AC_MSG_ERROR([in order to build octave with 64-bit indexing support your Fortran compiler must have a default integer size of 8 bytes. See the file INSTALL for more information.]) | |
526 fi | |
527 else | |
528 AC_MSG_ERROR([your Fortran compiler must have default integers that are the same size as octave_idx_type ($OCTAVE_IDX_TYPE). See the file INSTALL for more information.]) | |
529 fi | |
530 fi | |
531 | |
532 FC=$F77 | |
533 AC_SUBST(FC) | |
534 | |
535 OCTAVE_F77_FLAG(-ffloat-store, [ | |
536 AC_MSG_RESULT([setting F77_FLOAT_STORE_FLAG to -ffloat-store]) | |
537 F77_FLOAT_STORE_FLAG=-ffloat-store | |
538 AC_SUBST(F77_FLOAT_STORE_FLAG) | |
539 ]) | |
540 | |
541 OCTAVE_IEEE754_DATA_FORMAT | |
542 | |
543 ### Check for the QHull library | |
544 | |
545 OCTAVE_CHECK_LIBRARY(qhull, QHull, | |
546 [Qhull library not found -- this will result in loss of functionality of some geometry functions.], | |
547 [qhull/qhull_a.h], [qh_qhull], [], [], | |
548 [warn_qhull= | |
549 OCTAVE_CHECK_QHULL_VERSION | |
550 OCTAVE_CHECK_QHULL_OK([TEXINFO_QHULL="@set HAVE_QHULL" | |
551 AC_DEFINE(HAVE_QHULL, 1, [Define if QHull is available.])], [ | |
552 warn_qhull="Qhull library found, but seems not to work properly -- this will result in loss of functionality of some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) | |
553 | |
554 ### Check for pcre/regex library. | |
555 | |
556 ## check for pcre-config, and if so, set CPPFLAGS appropriately | |
557 AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) | |
558 if test $WITH_PCRE_CONFIG = yes ; then | |
559 CPPFLAGS="$CPPFLAGS $(pcre-config --cflags)" | |
560 fi | |
561 | |
562 ## NB: no need to do separate check for pcre.h header -- checking macros is good enough | |
563 AC_CACHE_CHECK([whether pcre.h defines the macros we need], [ac_cv_pcre_h_macros_present], [ | |
564 AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ | |
565 #include <pcre.h> | |
566 #if defined (PCRE_INFO_NAMECOUNT) \ | |
567 && defined (PCRE_INFO_NAMEENTRYSIZE) \ | |
568 && defined (PCRE_INFO_NAMETABLE) | |
569 PCRE_HAS_MACROS_WE_NEED | |
570 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) | |
571 WITH_PCRE="$ac_cv_pcre_h_macros_present" | |
572 | |
573 REGEX_LIBS= | |
574 | |
575 using_pcre=no | |
576 using_regex=no | |
577 | |
578 if test "$WITH_PCRE" = yes; then | |
579 if test "$WITH_PCRE_CONFIG" = yes; then | |
580 REGEX_LIBS=$(pcre-config --libs) | |
581 else | |
582 REGEX_LIBS=-lpcre | |
583 fi | |
584 save_LIBS="$LIBS" | |
585 LIBS="$REGEX_LIBS $LIBS" | |
586 AC_CHECK_FUNCS(pcre_compile, [using_pcre=yes | |
587 AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE library is available.])], [ | |
588 REGEX_LIBS= | |
589 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." | |
590 AC_MSG_WARN($warn_pcre)]) | |
591 LIBS="$save_LIBS" | |
592 else | |
593 warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." | |
594 AC_MSG_WARN($warn_pcre) | |
595 fi | |
596 | |
597 AC_CHECK_FUNCS(regexec, [using_regex=yes], [ | |
598 AC_CHECK_LIB(regex, regexec, [using_regex=yes | |
599 REGEX_LIBS="-lregex $REGEX_LIBS"], [ | |
600 warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." | |
601 AC_MSG_WARN($warn_regex)])]) | |
602 | |
603 if test "$using_regex" = yes; then | |
604 AC_DEFINE(HAVE_REGEX, 1, [Define if regex library is available.]) | |
605 fi | |
606 | |
607 AC_SUBST(REGEX_LIBS) | |
608 | |
609 ### Check for ZLIB library. | |
610 | |
611 OCTAVE_CHECK_LIBRARY(z, ZLIB, | |
612 [ZLIB library not found. Octave will not be able to save or load compressed data files or HDF5 files.], | |
613 [zlib.h], [gzclearerr]) | |
614 | |
615 ### Check for HDF5 library. | |
616 | |
617 save_CPPFLAGS="$CPPFLAGS" | |
618 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" | |
619 save_LIBS="$LIBS" | |
620 LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" | |
621 OCTAVE_CHECK_LIBRARY(hdf5, HDF5, | |
622 [HDF5 library not found. Octave will not be able to save or load HDF5 data files.], | |
623 [hdf5.h], [H5Gget_num_objs], [], [], | |
624 [warn_hdf5= | |
625 OCTAVE_HDF5_HAS_REQUIRED_API | |
626 if test $octave_hdf5_ok = yes; then | |
627 TEXINFO_HDF5="@set HAVE_HDF5" | |
628 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.]) | |
629 AC_DEFINE(HAVE_H5GGET_NUM_OBJS, 1, [Define if HDF5 has H5Gget_num_objs.]) | |
630 case "$canonical_host_type" in | |
631 *-*-msdosmsvc) | |
632 OCTAVE_HDF5_DLL | |
633 ;; | |
634 esac | |
635 fi]) | |
636 CPPFLAGS="$save_CPPFLAGS" | |
637 LIBS="$save_LIBS" | |
638 | |
639 | |
640 # Subdirectory of libcruft to build if fftw is not found: | |
641 | |
642 FFT_DIR="fftpack" | |
643 AC_SUBST(FFT_DIR) | |
644 | |
645 # Checks for FFTW header and library. | |
646 | |
647 OCTAVE_CHECK_LIBRARY(fftw3, FFTW3, | |
648 [FFTW3 library not found. The slower FFTPACK library will be used instead.], | |
649 [fftw3.h], [fftw_plan_dft_1d]) | |
650 | |
651 OCTAVE_CHECK_LIBRARY(fftw3f, FFTW3F, | |
652 [FFTW3F library not found. The slower FFTPACK library will be used instead.], | |
653 [fftw3.h], [fftwf_plan_dft_1d]) | |
654 | |
655 if test -n "$FFTW3_LIBS" && test -n "$FFTW3F_LIBS"; then | |
656 FFT_DIR= | |
657 fi | |
658 | |
659 # Checks for GLPK header and library. | |
660 | |
661 save_CPPFLAGS="$CPPFLAGS" | |
662 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" | |
663 save_LIBS="$LIBS" | |
664 LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" | |
665 OCTAVE_CHECK_LIBRARY(glpk, GLPK, | |
666 [GLPK library not found. The glpk function for solving linear programs will be disabled.], | |
667 [glpk/glpk.h glpk.h], [_glp_lpx_simplex]) | |
668 LIBS="$save_LIBS" | |
669 CPPFLAGS="$save_CPPFLAGS" | |
670 | |
671 # Checks for CURL header and library. | |
672 | |
673 save_CPPFLAGS="$CPPFLAGS" | |
674 CPPFLAGS="$Z_CPPFLAGS $CPPFLAGS" | |
675 save_LIBS="$LIBS" | |
676 LIBS="$Z_LDFLAGS $Z_LIBS $LIBS" | |
677 OCTAVE_CHECK_LIBRARY(curl, cURL, | |
678 [cURL library not found. The urlread and urlwrite functions will be disabled.], | |
679 [curl/curl.h], [curl_easy_escape]) | |
680 LIBS="$save_LIBS" | |
681 CPPFLAGS="$save_CPPFLAGS" | |
682 | |
683 ### GraphicsMagick++ | |
684 | |
685 warn_magick="GraphicsMagick++ library not found. The imread function for reading image files will not be fully functional." | |
686 | |
687 MAGICK_CPPFLAGS= | |
688 MAGICK_LDFLAGS= | |
689 MAGICK_LIBS= | |
690 | |
691 PKG_CHECK_EXISTS([GraphicsMagick++], [ | |
692 ## Make sure we only get -I, -L and -l flags. Some GraphicsMagick++ | |
693 ## packages adds extra flags that are useful when building | |
694 ## GraphicsMagick++ extentions. These extra flags break the Octave build. | |
695 MAGICK_LDFLAGS=`$PKG_CONFIG --libs-only-L GraphicsMagick++` | |
696 MAGICK_LIBS=`$PKG_CONFIG --libs-only-l GraphicsMagick++` | |
697 MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I GraphicsMagick++` | |
698 | |
699 warn_magick="GraphicsMagick++ library fails tests. The imread function for reading image files will not be fully functional." | |
700 | |
701 save_CPPFLAGS="$CPPFLAGS" | |
702 save_LIBS="$LIBS" | |
703 CPPFLAGS="$MAGICK_CPPFLAGS $CPPFLAGS" | |
704 LIBS="$MAGICK_LDFLAGS $MAGICK_LIBS $LIBS" | |
705 AC_LANG_PUSH(C++) | |
706 AC_CHECK_HEADER([Magick++.h], [ | |
707 AC_MSG_CHECKING([for Magick::ColorRGB in Magick++.h]) | |
708 AC_TRY_LINK([#include <Magick++.h>], [Magick::ColorRGB c;], [ | |
709 AC_MSG_RESULT(yes) | |
710 warn_magick= | |
711 ], [ | |
712 AC_MSG_RESULT(no) | |
713 ]) | |
714 ]) | |
715 AC_LANG_POP(C++) | |
716 CPPFLAGS="$save_CPPFLAGS" | |
717 LIBS="$save_LIBS" | |
718 ]) | |
719 | |
720 if test -z "$warn_magick"; then | |
721 AC_DEFINE(HAVE_MAGICK, 1, [Define if GraphicsMagick++ is available.]) | |
722 else | |
723 MAGICK_CPPFLAGS= | |
724 MAGICK_LDFLAGS= | |
725 MAGICK_LIBS= | |
726 fi | |
727 AC_SUBST(MAGICK_CPPFLAGS) | |
728 AC_SUBST(MAGICK_LDFLAGS) | |
729 AC_SUBST(MAGICK_LIBS) | |
730 | |
731 # --------------------------------------------------------------------- | |
732 | |
733 ## libraries needed for graphics | |
734 | |
735 warn_freetype="" | |
736 warn_ftgl="" | |
737 | |
738 OCTAVE_OPENGL | |
739 if test -n "$OPENGL_LIBS"; then | |
740 AC_DEFINE(HAVE_OPENGL, 1, [Define if OpenGL is available]) | |
741 | |
742 ## ftgl (needs freetype 2) | |
743 AC_CHECK_FT2([9.0.3],[AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if you have Freetype library.])], | |
744 [warn_freetype="FreeType library not found. Native renderer will not have on-screen text"]) | |
745 if test -z "$warn_freetype"; then | |
746 AC_LANG_PUSH(C++) | |
747 save_LIBS="$LIBS" | |
748 save_CXXFLAGS="$CXXFLAGS" | |
749 save_CPPFLAGS="$CPPFLAGS" | |
750 LIBS="$LIBS $FT2_LIBS $OPENGL_LIBS" | |
751 CXXFLAGS="$CXXFLAGS $FT2_CFLAGS" | |
752 CPPFLAGS="$CPPFLAGS $FT2_CFLAGS" | |
753 has_ftgl_h=yes | |
754 AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [ | |
755 AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [ | |
756 AC_DEFINE(HAVE_FTGL_UPPERCASE, 1, [Define to 1 if you have FTGL.h or FTGL/FTGL.h]) | |
757 break | |
758 ], has_ftgl_h=no)]) | |
759 if test "$has_ftgl_h" = yes; then | |
760 AC_MSG_CHECKING([for FTGLTextureFont in -lftgl]) | |
761 LIBS="$save_LIBS -lftgl $FT2_LIBS $OPENGL_LIBS" | |
762 AC_TRY_LINK([ | |
763 #ifdef HAVE_FTGL_FTGL_H | |
764 #ifdef HAVE_FTGL_UPPERCASE | |
765 #include <FTGL/FTGL.h> | |
766 #else | |
767 #include <FTGL/ftgl.h> | |
768 #endif | |
769 #include <FTGL/FTGLTextureFont.h> | |
770 #elif HAVE_FTGL_H | |
771 #ifdef HAVE_FTGL_UPPERCASE | |
772 #include <FTGL.h> | |
773 #else | |
774 #include <ftgl.h> | |
775 #endif | |
776 #include <FTGLTextureFont.h> | |
777 #endif], [ | |
778 FTGLTextureFont font("");], [ | |
779 OPENGL_LIBS="-lftgl $FT2_LIBS $OPENGL_LIBS" | |
780 LIBS="$save_LIBS" | |
781 CPPFLAGS="$save_CPPFLAGS" | |
782 AC_DEFINE(HAVE_FTGL, 1, [Define to 1 if FTGL is present]) | |
783 AC_MSG_RESULT(yes) | |
784 XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"], [ | |
785 AC_MSG_RESULT(no) | |
786 warn_ftgl="FTGL library not found. Native renderer will not have on-screen text" | |
787 ]) | |
788 LIBS="$save_LIBS" | |
789 CXXFLAGS="$save_CXXFLAGS" | |
790 CPPFLAGS="$save_CPPFLAGS" | |
791 else | |
792 warn_ftgl="FTGL headers not found. Native renderer will not have on-screen text" | |
793 fi | |
794 AC_LANG_POP(C++) | |
795 fi | |
796 fi | |
797 | |
798 # fontconfig library | |
799 | |
800 warn_fontconfig="" | |
801 if test -z "$warn_freetype"; then | |
802 PKG_CHECK_MODULES(FONTCONFIG,[fontconfig],[ | |
803 have_fontconfig=yes | |
804 OPENGL_LIBS="$FONTCONFIG_LIBS $OPENGL_LIBS" | |
805 XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FONTCONFIG_CFLAGS" | |
806 AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if fontconfig is present])],[ | |
807 have_fontconfig=no | |
808 warn_fontconfig="Fontconfig not found. Native text rendering will use hard-coded font instead."]) | |
809 fi | |
810 | |
811 GRAPHICS_LIBS= | |
812 GRAPHICS_CFLAGS= | |
813 | |
814 ## fltk (www.fltk.org) | |
815 AC_ARG_WITH(fltk-prefix, | |
816 [ --with-fltk-prefix=PFX Prefix where FLTK is installed (optional)], | |
817 fltk_prefix="$withval", | |
818 fltk_prefix="") | |
819 AC_ARG_WITH(fltk-exec-prefix, | |
820 [ --with-fltk-exec-prefix=PFX Exec prefix where FLTK is installed (optional)], | |
821 fltk_exec_prefix="$withval", | |
822 fltk_exec_prefix="") | |
823 | |
824 if test -n "$fltk_exec_prefix"; then | |
825 fltk_args="$fltk_args --exec-prefix=$fltk_exec_prefix" | |
826 if test "x${FLTK_CONFIG+set}" != xset ; then | |
827 FLTK_CONFIG="$fltk_exec_prefix/bin/fltk-config" | |
828 fi | |
829 fi | |
830 | |
831 if test -n "$fltk_prefix"; then | |
832 fltk_args="$fltk_args --prefix=$fltk_prefix" | |
833 if test x${FLTK_CONFIG+set} != xset ; then | |
834 FLTK_CONFIG="$fltk_prefix/bin/fltk-config" | |
835 fi | |
836 fi | |
837 | |
838 AC_PATH_PROG(FLTK_CONFIG, fltk-config, no) | |
839 | |
840 warn_fltk_config="" | |
841 warn_fltk_opengl="" | |
842 | |
843 if test "$FLTK_CONFIG" = "no" ; then | |
844 warn_fltk_config="FLTK config script not found. Native graphics will be disabled." | |
845 else | |
846 FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`" | |
847 FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`" | |
848 | |
849 AC_MSG_CHECKING(for OpenGL support in FLTK) | |
850 cat > conftest.cc <<EOF | |
851 #include <FL/gl.h> | |
852 int nothing=0; | |
853 EOF | |
854 $CXX $CXXFLAGS $FLTK_CFLAGS -c conftest.cc || \ | |
855 warn_fltk_opengl="FLTK does not have OpenGL support. Native graphics will be disabled." | |
856 | |
857 if test -z "$warn_fltk_opengl"; then | |
858 AC_MSG_RESULT(yes) | |
859 AC_DEFINE(HAVE_FLTK, 1, [Define if FLTK is available]) | |
860 GRAPHICS_CFLAGS="$FLTK_CFLAGS" | |
861 GRAPHICS_LIBS="$FLTK_LDFLAGS" | |
862 else | |
863 AC_MSG_RESULT(no) | |
864 fi | |
865 fi | |
866 | |
867 AC_SUBST(GRAPHICS_CFLAGS) | |
868 AC_SUBST(GRAPHICS_LIBS) | |
869 | |
870 # ---------------------------------------------------------------------- | |
871 | |
872 OCTAVE_PROG_AR | |
873 | |
874 AC_PROG_RANLIB | |
875 | |
876 XTRA_CRUFT_SH_LDFLAGS= | |
877 case "$canonical_host_type" in | |
878 *-*-msdosmsvc) | |
879 FLIBS="$FLIBS -lkernel32" | |
880 XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def" | |
881 ;; | |
882 esac | |
883 AC_SUBST(XTRA_CRUFT_SH_LDFLAGS) | |
884 | |
885 ### Checks for BLAS and LAPACK libraries: | |
886 # (Build subdirectories of libcruft if they aren't found on the system.) | |
887 ACX_BLAS_WITH_F77_FUNC([], [BLAS_DIR="blas"]) | |
888 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) | |
889 AC_SUBST(BLAS_DIR) | |
890 AC_SUBST(LAPACK_DIR) | |
891 | |
892 if test "x$acx_blas_f77_func_ok" = "xno"; then | |
893 warn_blas_f77_incompatible="A BLAS library was detected but found incompatible with your Fortran 77 compiler. The reference BLAS implementation will be used. To improve performance, consider using a different Fortran compiler or a switch like -ff2c to make your Fortran compiler use a calling convention compatible with the way your BLAS library was compiled, or use a different BLAS library." | |
894 AC_MSG_WARN($warn_blas_f77_incompatible) | |
895 fi | |
896 | |
897 # Check for the qrupdate library | |
898 | |
899 save_LIBS="$LIBS" | |
900 LIBS="$BLAS_LIBS $FLIBS $LIBS" | |
901 OCTAVE_CHECK_LIBRARY(qrupdate, qrupdate, | |
902 [qrupdate not found. The QR & Cholesky updating functions will be slow.], | |
903 [], | |
904 [F77_FUNC(sqr1up,SQR1UP)], | |
905 [], [don't use qrupdate, disable QR & Cholesky updating functions]) | |
906 LIBS="$save_LIBS" | |
907 | |
908 # Check for AMD library | |
909 | |
910 OCTAVE_CHECK_LIBRARY(amd, AMD, | |
911 [AMD library not found. This will result in some lack of functionality for sparse matrices.], | |
912 [suitesparse/amd.h ufsparse/amd.h amd/amd.h amd.h], | |
913 [amd_postorder], | |
914 [], [don't use AMD library, disable some sparse functionality]) | |
915 | |
916 # Check for CAMD library | |
917 | |
918 OCTAVE_CHECK_LIBRARY(camd, CAMD, | |
919 [CAMD library not found. This will result in some lack of functionality for sparse matrices.], | |
920 [suitesparse/camd.h ufsparse/camd.h amd/camd.h camd.h], | |
921 [camd_postorder], | |
922 [], [don't use CAMD library, disable some sparse functionality]) | |
923 | |
924 # Check for COLAMD library | |
925 | |
926 OCTAVE_CHECK_LIBRARY(colamd, COLAMD, | |
927 [COLAMD library not found. This will result in some lack of functionality for sparse matrices.], | |
928 [suitesparse/colamd.h ufsparse/colamd.h amd/colamd.h colamd.h], | |
929 [colamd], | |
930 [], [don't use COLAMD library, disable some sparse functionality]) | |
931 | |
932 # Check for CCOLAMD library | |
933 | |
934 OCTAVE_CHECK_LIBRARY(ccolamd, CCOLAMD, | |
935 [CCOLAMD library not found. This will result in some lack of functionality for sparse matrices.], | |
936 [suitesparse/ccolamd.h ufsparse/ccolamd.h amd/ccolamd.h ccolamd.h], | |
937 [ccolamd], | |
938 [], [don't use CCOLAMD library, disable some sparse functionality]) | |
939 | |
940 # Check for CHOLMOD library. If your cholmod library requires cblas, | |
941 # then you will need to configure with --with-cholmod="-lcholmod -lcblas". | |
942 | |
943 save_LIBS="$LIBS" | |
944 LIBS="$BLAS_LIBS $FLIBS $LIBS" | |
945 OCTAVE_CHECK_LIBRARY(cholmod, CHOLMOD, | |
946 [CHOLMOD library not found. This will result in some lack of functionality for sparse matrices.], | |
947 [suitesparse/cholmod.h ufsparse/cholmod.h cholmod/cholmod.h cholmod.h], | |
948 [cholmod_start], | |
949 [], [don't use CHOLMOD library, disable some sparse functionality]) | |
950 LIBS="$save_LIBS" | |
951 | |
952 # Check for CXSparse library | |
953 | |
954 OCTAVE_CHECK_LIBRARY(cxsparse, CXSparse, | |
955 [CXSparse library not found. This will result in some lack of functionality for sparse matrices.], | |
956 [suitesparse/cs.h ufsparse/cs.h amd/cs.h cs.h], | |
957 [cs_di_sqr], | |
958 [C++], [don't use CXSparse library, disable some sparse functionality]) | |
959 | |
960 # Check for UMFPACK library. | |
961 | |
962 save_LIBS="$LIBS" | |
963 LIBS="$AMD_LDFLAGS $AMD_LIBS $BLAS_LIBS $FLIBS $LIBS" | |
964 OCTAVE_CHECK_LIBRARY(umfpack, UMFPACK, | |
965 [UMFPACK not found. This will result in some lack of functionality for sparse matrices.], | |
966 [suitesparse/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], | |
967 [umfpack_zi_get_determinant], | |
968 [], [don't use UMFPACK, disable some sparse functionality]) | |
969 LIBS="$save_LIBS" | |
970 | |
971 if test -z "$UMFPACK_LIBS"; then | |
972 ## Invalidate the cache and try again with -lcblas. | |
973 $as_unset ac_cv_lib_umfpack_umfpack_zi_get_determinant | |
974 save_LIBS="$LIBS" | |
975 LIBS="-lcblas $AMD_LDFLAGS $AMD_LIBS $BLAS_LIBS $FLIBS $LIBS" | |
976 OCTAVE_CHECK_LIBRARY(umfpack, UMFPACK, | |
977 [UMFPACK not found. This will result in some lack of functionality for sparse matrices.], | |
978 [suitesparse/umfpack.h ufsparse/umfpack.h umfpack/umfpack.h umfpack.h], | |
979 [umfpack_zi_get_determinant], | |
980 [], [don't use UMFPACK, disable some sparse functionality]) | |
981 if test -n "$UMFPACK_LIBS"; then | |
982 UMFPACK_LIBS="$UMFPACK_LIBS -lcblas" | |
983 fi | |
984 LIBS="$save_LIBS" | |
985 fi | |
986 | |
987 if test -n "$UMFPACK_LIBS"; then | |
988 save_LIBS="$LIBS"; | |
989 LIBS="$UMFPACK_LIBS $AMD_LIBS $BLAS_LIBS $FLIBS $LIBS" | |
990 OCTAVE_UMFPACK_SEPERATE_SPLIT | |
991 LIBS="$save_LIBS" | |
992 fi | |
993 | |
994 save_LIBS="$LIBS" | |
995 LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS" | |
996 OCTAVE_CHECK_LIBRARY(arpack, ARPACK, | |
997 [arpack not found. The eigs function will be disabled.], | |
998 [], | |
999 [F77_FUNC(dseupd,DSEUPD)], | |
1000 [], [don't use the ARPACK library, disable eigs function]) | |
1001 LIBS="$save_LIBS" | |
1002 | |
1003 ### Handle shared library options. | |
1004 | |
1005 ### Enable creation of static libraries. | |
1006 | |
1007 AC_ARG_ENABLE(static, | |
1008 [AS_HELP_STRING([--enable-static], [create static libraries])], | |
1009 [if test "$enableval" = no; then STATIC_LIBS=false; | |
1010 else STATIC_LIBS=true; fi], | |
1011 STATIC_LIBS=false) | |
1012 AC_SUBST(STATIC_LIBS) | |
1013 | |
1014 ### Enable creation of shared libraries. Currently only works with | |
1015 ### gcc on some systems. | |
1016 | |
1017 AC_ARG_ENABLE(shared, | |
1018 [AS_HELP_STRING([--enable-shared], | |
1019 [create shared libraries (not all systems)])], | |
1020 [if test "$enableval" = no; then SHARED_LIBS=false; | |
1021 else SHARED_LIBS=true; fi], | |
1022 SHARED_LIBS=true) | |
1023 AC_SUBST(SHARED_LIBS) | |
1024 | |
1025 ### Enable dynamic linking. --enable-shared implies this, so | |
1026 ### --enable-dl is only need if you are only building static libraries | |
1027 ### and want to try dynamic linking too (works on some systems, for | |
1028 ### example, OS X and Windows). | |
1029 | |
1030 AC_ARG_ENABLE(dl, | |
1031 [AS_HELP_STRING([--enable-dl], | |
1032 [create shared libraries (not all systems)])], | |
1033 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; | |
1034 else ENABLE_DYNAMIC_LINKING=true; fi], | |
1035 ENABLE_DYNAMIC_LINKING=true) | |
1036 | |
1037 if $STATIC_LIBS || $SHARED_LIBS; then | |
1038 true | |
1039 else | |
1040 AC_MSG_ERROR([You can't disable building static AND shared libraries!]) | |
1041 fi | |
1042 | |
1043 AC_ARG_ENABLE(rpath, | |
1044 [AS_HELP_STRING([--enable-rpath], | |
1045 [override the default link options for rpath; e.g., --enable-rpath='-rpath $(octlibdir)'])], | |
1046 [ if test "$enableval" = no; then use_rpath=false; | |
1047 else | |
1048 use_rpath=true | |
1049 if test "$enableval" = yes; then true; | |
1050 else enable_rpath_arg="$enableval"; fi | |
1051 fi], [use_rpath=true]) | |
1052 | |
1053 CPICFLAG=-fPIC | |
1054 CXXPICFLAG=-fPIC | |
1055 FPICFLAG=-fPIC | |
1056 SHLEXT=so | |
1057 SHLLIB='$(SHLEXT)' | |
1058 SHLBIN= | |
1059 SHLEXT_VER='$(SHLEXT).$(version)' | |
1060 SHLLIB_VER='$(SHLLIB).$(version)' | |
1061 SHLBIN_VER='$(SHLBIN).$(version)' | |
1062 SHLLINKEXT= | |
1063 LIBPRE=lib | |
1064 SHLPRE=lib | |
1065 SHLLIBPRE=lib | |
1066 SHLBINPRE=lib | |
1067 SH_LD='$(CXX)' | |
1068 SH_LDFLAGS=-shared | |
1069 DL_LD='$(SH_LD)' | |
1070 DL_LDFLAGS='$(SH_LDFLAGS)' | |
1071 MKOCTFILE_DL_LDFLAGS='$(DL_LDFLAGS)' | |
1072 SONAME_FLAGS= | |
1073 RLD_FLAG= | |
1074 NO_OCT_FILE_STRIP=false | |
1075 TEMPLATE_AR='$(AR)' | |
1076 TEMPLATE_ARFLAGS="$ARFLAGS" | |
1077 CRUFT_DLL_DEFS= | |
1078 OCTAVE_DLL_DEFS= | |
1079 OCTINTERP_DLL_DEFS= | |
1080 OCTGRAPHICS_DLL_DEFS= | |
1081 library_path_var=LD_LIBRARY_PATH | |
1082 ldpreloadsep=" " | |
1083 SCRIPTS_EXE_SUFFIX= | |
1084 case "$canonical_host_type" in | |
1085 *-*-386bsd* | *-*-netbsd*) | |
1086 SH_LD=ld | |
1087 SH_LDFLAGS=-Bshareable | |
1088 ;; | |
1089 *-*-openbsd*) | |
1090 SH_LDFLAGS='-shared -fPIC' | |
1091 ;; | |
1092 *-*-freebsd*) | |
1093 SH_LDFLAGS="-shared -Wl,-x" | |
1094 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
1095 ;; | |
1096 alpha*-dec-osf*) | |
1097 CPICFLAG= | |
1098 CXXPICFLAG= | |
1099 FPICFLAG= | |
1100 SH_LDFLAGS="-shared -Wl,-expect_unresolved -Wl,'*'" | |
1101 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
1102 ;; | |
1103 *-*-darwin*) | |
1104 DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $(LDFLAGS)' | |
1105 MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $$BINDIR/octave-$$OCTAVE_VERSION$$EXEEXT' | |
1106 SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)' | |
1107 case "$canonical_host_type" in | |
1108 powerpc-*) | |
1109 CXXPICFLAG= | |
1110 CPICFLAG= | |
1111 FPICFLAG= | |
1112 ;; | |
1113 esac | |
1114 SHLEXT=dylib | |
1115 SHLLIB='$(SHLEXT)' | |
1116 SHLEXT_VER='$(version).$(SHLEXT)' | |
1117 SHLLIB_VER='$(version).$(SHLLIB)' | |
1118 NO_OCT_FILE_STRIP=true | |
1119 SONAME_FLAGS='-install_name $(octlibdir)/$@' | |
1120 library_path_var=DYLD_LIBRARY_PATH | |
1121 ;; | |
1122 *-*-cygwin*) | |
1123 CPICFLAG= | |
1124 CXXPICFLAG= | |
1125 FPICFLAG= | |
1126 LIBPRE=lib | |
1127 SHLPRE=cyg | |
1128 SHLBINPRE=cyg | |
1129 SHLEXT=dll | |
1130 SHLLIB=dll.a | |
1131 SHLBIN=dll | |
1132 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc" | |
1133 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base" | |
1134 SONAME_FLAGS='-Wl,--out-implib=$(patsubst $(SHLPRE)%,$(LIBPRE)%,$@).a' | |
1135 ldpreloadsep=":" | |
1136 ;; | |
1137 *-*-mingw*) | |
1138 CPICFLAG= | |
1139 CXXPICFLAG= | |
1140 FPICFLAG= | |
1141 SHLEXT=dll | |
1142 SHLLIB=dll.a | |
1143 SHLBIN=dll | |
1144 DL_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc" | |
1145 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-auto-image-base" | |
1146 SONAME_FLAGS='-Wl,--out-implib=$@.a' | |
1147 library_path_var=PATH | |
1148 SCRIPTS_EXE_SUFFIX='$(EXEEXT)' | |
1149 ;; | |
1150 | |
1151 *-*-msdosmsvc) | |
1152 DL_LDFLAGS="-shared" | |
1153 CPICFLAG= | |
1154 CXXPICFLAG= | |
1155 FPICFLAG= | |
1156 SHLEXT=dll | |
1157 SHLLIB=lib | |
1158 SHLBIN=dll | |
1159 LIBPRE= | |
1160 SHLPRE= | |
1161 SHLLIBPRE= | |
1162 SHLBINPRE= | |
1163 SH_LDFLAGS="-shared" | |
1164 if test -n "`echo $CFLAGS | grep -e '-g'`" -o -n "`echo $CXXFLAGS | grep -e '-g'`"; then | |
1165 DL_LDFLAGS="$DL_LDFLAGS -g" | |
1166 SH_LDFLAGS="$SH_LDFLAGS -g" | |
1167 fi | |
1168 NO_OCT_FILE_STRIP=true | |
1169 library_path_var=PATH | |
1170 NO_OCT_FILE_STRIP=true | |
1171 ## Extra compilation flags. | |
1172 CRUFT_DLL_DEFS="-DCRUFT_DLL" | |
1173 OCTAVE_DLL_DEFS="-DOCTAVE_DLL" | |
1174 OCTINTERP_DLL_DEFS="-DOCTINTERP_DLL" | |
1175 OCTGRAPHICS_DLL_DEFS="-DOCTGRAPHICS_DLL" | |
1176 SCRIPTS_EXE_SUFFIX='$(EXEEXT)' | |
1177 ;; | |
1178 *-*-linux* | *-*-gnu*) | |
1179 MKOCTFILE_DL_LDFLAGS="-shared -Wl,-Bsymbolic" | |
1180 SONAME_FLAGS='-Wl,-soname -Wl,$@' | |
1181 RLD_FLAG='-Wl,-rpath -Wl,$(octlibdir)' | |
1182 ;; | |
1183 i[[3456]]86-*-sco3.2v5*) | |
1184 SONAME_FLAGS='-Wl,-h -Wl,$@' | |
1185 RLD_FLAG= | |
1186 SH_LDFLAGS=-G | |
1187 ;; | |
1188 rs6000-ibm-aix* | powerpc-ibm-aix*) | |
1189 CPICFLAG= | |
1190 CXXPICFLAG= | |
1191 FPICFLAG= | |
1192 library_path_var=LIBPATH | |
1193 ;; | |
1194 hppa*-hp-hpux*) | |
1195 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
1196 FPICFLAG=-fPIC | |
1197 else | |
1198 FPICFLAG=+Z | |
1199 fi | |
1200 SHLEXT=sl | |
1201 SH_LDFLAGS="-shared -fPIC" | |
1202 RLD_FLAG='-Wl,+b -Wl,$(octlibdir)' | |
1203 library_path_var=SHLIB_PATH | |
1204 ;; | |
1205 ia64*-hp-hpux*) | |
1206 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
1207 FPICFLAG=-fPIC | |
1208 else | |
1209 FPICFLAG=+Z | |
1210 fi | |
1211 SH_LDFLAGS="-shared -fPIC" | |
1212 RLD_FLAG='-Wl,+b -Wl,$(octlibdir)' | |
1213 ;; | |
1214 *-sgi-*) | |
1215 CPICFLAG= | |
1216 CXXPICFLAG= | |
1217 FPICFLAG= | |
1218 RLD_FLAG='-rpath $(octlibdir)' | |
1219 ;; | |
1220 sparc-sun-sunos4*) | |
1221 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
1222 FPICFLAG=-fPIC | |
1223 else | |
1224 FPICFLAG=-PIC | |
1225 fi | |
1226 SH_LD=ld | |
1227 SH_LDFLAGS="-assert nodefinitions" | |
1228 RLD_FLAG='-L$(octlibdir)' | |
1229 ;; | |
1230 sparc-sun-solaris2* | i386-pc-solaris2*) | |
1231 if test "$ac_cv_f77_compiler_gnu" = yes; then | |
1232 FPICFLAG=-fPIC | |
1233 else | |
1234 FPICFLAG=-KPIC | |
1235 fi | |
1236 if test "$GCC" = yes; then | |
1237 CPICFLAG=-fPIC | |
1238 else | |
1239 CPICFLAG=-KPIC | |
1240 fi | |
1241 if test "$GXX" = yes; then | |
1242 CXXPICFLAG=-fPIC | |
1243 SH_LDFLAGS=-shared | |
1244 else | |
1245 CXXPICFLAG=-KPIC | |
1246 SH_LDFLAGS=-G | |
1247 fi | |
1248 RLD_FLAG='-R $(octlibdir)' | |
1249 ## Template closures in archive libraries need a different mechanism. | |
1250 if test "$GXX" = yes; then | |
1251 true | |
1252 else | |
1253 TEMPLATE_AR='$(CXX)' | |
1254 TEMPLATE_ARFLAGS="-xar -o" | |
1255 fi | |
1256 ;; | |
1257 esac | |
1258 | |
1259 if $use_rpath; then | |
1260 if test -n "$enable_rpath_arg"; then | |
1261 RLD_FLAG="$enable_rpath_arg" | |
1262 fi | |
1263 else | |
1264 RLD_FLAG="" | |
1265 fi | |
1266 | |
1267 AC_MSG_NOTICE([defining FPICFLAG to be $FPICFLAG]) | |
1268 AC_MSG_NOTICE([defining CPICFLAG to be $CPICFLAG]) | |
1269 AC_MSG_NOTICE([defining CXXPICFLAG to be $CXXPICFLAG]) | |
1270 AC_MSG_NOTICE([defining SHLEXT to be $SHLEXT]) | |
1271 AC_MSG_NOTICE([defining SHLLIB to be $SHLLIB]) | |
1272 AC_MSG_NOTICE([defining SHLBIN to be $SHLBIN]) | |
1273 AC_MSG_NOTICE([defining SHLEXT_VER to be $SHLEXT_VER]) | |
1274 AC_MSG_NOTICE([defining SHLLIB_VER to be $SHLLIB_VER]) | |
1275 AC_MSG_NOTICE([defining SHLBIN_VER to be $SHLBIN_VER]) | |
1276 AC_MSG_NOTICE([defining SHLLINKEXT to be $SHLLINKEXT]) | |
1277 AC_MSG_NOTICE([defining LIBPRE to be $LIBPRE]) | |
1278 AC_MSG_NOTICE([defining SHLPRE to be $SHLPRE]) | |
1279 AC_MSG_NOTICE([defining SHLLIBPRE to be $SHLLIBPRE]) | |
1280 AC_MSG_NOTICE([defining SHLBINPRE to be $SHLBINPRE]) | |
1281 AC_MSG_NOTICE([defining SH_LD to be $SH_LD]) | |
1282 AC_MSG_NOTICE([defining SH_LDFLAGS to be $SH_LDFLAGS]) | |
1283 AC_MSG_NOTICE([defining DL_LD to be $DL_LD]) | |
1284 AC_MSG_NOTICE([defining DL_LDFLAGS to be $DL_LDFLAGS]) | |
1285 AC_MSG_NOTICE([defining MKOCTFILE_DL_LDFLAGS to be $MKOCTFILE_DL_LDFLAGS]) | |
1286 AC_MSG_NOTICE([defining SONAME_FLAGS to be $SONAME_FLAGS]) | |
1287 AC_MSG_NOTICE([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) | |
1288 AC_MSG_NOTICE([defining RLD_FLAG to be $RLD_FLAG]) | |
1289 AC_MSG_NOTICE([defining TEMPLATE_AR to be $TEMPLATE_AR]) | |
1290 AC_MSG_NOTICE([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) | |
1291 AC_MSG_NOTICE([defining CRUFT_DLL_DEFS to be $CRUFT_DLL_DEFS]) | |
1292 AC_MSG_NOTICE([defining OCTAVE_DLL_DEFS to be $OCTAVE_DLL_DEFS]) | |
1293 AC_MSG_NOTICE([defining OCTINTERP_DLL_DEFS to be $OCTINTERP_DLL_DEFS]) | |
1294 AC_MSG_NOTICE([defining OCTGRAPHICS_DLL_DEFS to be $OCTGRAPHICS_DLL_DEFS]) | |
1295 AC_MSG_NOTICE([defining library_path_var to be $library_path_var]) | |
1296 AC_SUBST(FPICFLAG) | |
1297 AC_SUBST(CPICFLAG) | |
1298 AC_SUBST(CXXPICFLAG) | |
1299 AC_SUBST(SHLEXT) | |
1300 AC_SUBST(SHLLIB) | |
1301 AC_SUBST(SHLBIN) | |
1302 AC_SUBST(SHLEXT_VER) | |
1303 AC_SUBST(SHLLIB_VER) | |
1304 AC_SUBST(SHLBIN_VER) | |
1305 AC_SUBST(SHLLINKEXT) | |
1306 AC_SUBST(LIBPRE) | |
1307 AC_SUBST(SHLPRE) | |
1308 AC_SUBST(SHLLIBPRE) | |
1309 AC_SUBST(SHLBINPRE) | |
1310 AC_SUBST(SH_LD) | |
1311 AC_SUBST(SH_LDFLAGS) | |
1312 AC_SUBST(DL_LD) | |
1313 AC_SUBST(DL_LDFLAGS) | |
1314 AC_SUBST(MKOCTFILE_DL_LDFLAGS) | |
1315 AC_SUBST(SONAME_FLAGS) | |
1316 AC_SUBST(NO_OCT_FILE_STRIP) | |
1317 AC_SUBST(RLD_FLAG) | |
1318 AC_SUBST(TEMPLATE_AR) | |
1319 AC_SUBST(TEMPLATE_ARFLAGS) | |
1320 AC_SUBST(CRUFT_DLL_DEFS) | |
1321 AC_SUBST(OCTAVE_DLL_DEFS) | |
1322 AC_SUBST(OCTINTERP_DLL_DEFS) | |
1323 AC_SUBST(OCTGRAPHICS_DLL_DEFS) | |
1324 AC_SUBST(library_path_var) | |
1325 AC_SUBST(ldpreloadsep) | |
1326 AC_SUBST(SCRIPTS_EXE_SUFFIX) | |
1327 | |
1328 ### special checks for odd OS specific things. | |
1329 ### | |
1330 ### I am told that on some SCO systems, the only place to find some | |
1331 ### functions like gethostname and gettimeofday is in libsocket. | |
1332 | |
1333 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)]) | |
1334 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) | |
1335 | |
1336 case "$canonical_host_type" in | |
1337 *-*-cygwin*) | |
1338 AC_CHECK_LIB(wsock32, gethostname) | |
1339 LIBS="$LIBS -lwsock32" | |
1340 ;; | |
1341 *-*-msdosmsvc* | *-*-mingw*) | |
1342 LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32" | |
1343 ;; | |
1344 esac | |
1345 | |
1346 ### Type stuff. | |
1347 | |
1348 AC_TYPE_MODE_T | |
1349 AC_TYPE_OFF_T | |
1350 AC_TYPE_PID_T | |
1351 AC_TYPE_SIZE_T | |
1352 AC_TYPE_UID_T | |
1353 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) | |
1354 AC_CHECK_TYPES([long long int, unsigned long long int]) | |
1355 AC_CHECK_TYPES([sigset_t, sig_atomic_t], , , [ | |
1356 #if defined (HAVE_SYS_TYPES_H) | |
1357 #include <sys/types.h> | |
1358 #endif | |
1359 #include <signal.h>]) | |
1360 | |
1361 ### How big are ints and how are they oriented? These could probably | |
1362 ### be eliminated in favor of run-time checks. | |
1363 | |
1364 AC_CHECK_SIZEOF(short) | |
1365 AC_CHECK_SIZEOF(int) | |
1366 AC_CHECK_SIZEOF(long) | |
1367 AC_CHECK_SIZEOF(long long) | |
1368 | |
1369 ### Does the C compiler handle alloca() and const correctly? | |
1370 | |
1371 AC_FUNC_ALLOCA | |
1372 AC_C_CONST | |
1373 | |
1374 ### See if we should use placement delete. | |
1375 | |
1376 OCTAVE_PLACEMENT_DELETE | |
1377 | |
1378 ### See if we can auto allocate variable sized arrays. | |
1379 | |
1380 OCTAVE_DYNAMIC_AUTO_ARRAYS | |
1381 | |
1382 ### See if we can use fast integer arithmetics | |
1383 | |
1384 OCTAVE_FAST_INT_OPS | |
1385 | |
1386 ### Check for long double type (for 64-bit integers) | |
1387 | |
1388 AC_CHECK_SIZEOF(long double) | |
1389 | |
1390 ### Checks for header files. | |
1391 | |
1392 AC_HEADER_STDC | |
1393 AC_HEADER_DIRENT | |
1394 AC_HEADER_TIME | |
1395 AC_HEADER_SYS_WAIT | |
1396 | |
1397 ### C headers | |
1398 | |
1399 AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ | |
1400 floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ | |
1401 ncurses.h poll.h pthread.h pwd.h stdint.h stdlib.h string.h sunmath.h sys/ioctl.h \ | |
1402 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ | |
1403 sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ | |
1404 unistd.h utime.h varargs.h) | |
1405 | |
1406 ### C++ headers | |
1407 | |
1408 AC_LANG_PUSH(C++) | |
1409 AC_CHECK_HEADERS(sstream) | |
1410 AC_LANG_POP(C++) | |
1411 | |
1412 have_termios_h=no | |
1413 AC_CHECK_HEADERS(termios.h, have_termios_h=yes) | |
1414 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no) | |
1415 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no) | |
1416 AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no) | |
1417 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no) | |
1418 AC_CHECK_HEADERS(conio.h, have_conio_h=yes, have_conio_h=no) | |
1419 | |
1420 ### I'm told that termios.h is broken on NeXT systems. | |
1421 | |
1422 case "$canonical_host_type" in | |
1423 *-*-nextstep*) | |
1424 if test "$have_termios_h" = yes; then | |
1425 AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) | |
1426 have_termios_h=no | |
1427 fi | |
1428 ;; | |
1429 esac | |
1430 | |
1431 if test "$have_termios_h" = yes \ | |
1432 || test "$have_termio_h" = yes \ | |
1433 || test "$have_sgtty_h" = yes; then | |
1434 true | |
1435 else | |
1436 AC_MSG_WARN([I couldn't find termios.h, termio.h, or sgtty.h!]) | |
1437 fi | |
1438 | |
1439 LIBGLOB= | |
1440 AC_SUBST(LIBGLOB) | |
1441 if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then | |
1442 AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, [ | |
1443 AC_CHECK_LIB(glob, fnmatch, [have_fnmatch=yes; LIBGLOB=-lglob], | |
1444 have_fnmatch=no)]) | |
1445 AC_CHECK_FUNCS(glob, have_glob=yes, [ | |
1446 AC_CHECK_LIB(glob, glob, [have_glob=yes; LIBGLOB=-lglob], | |
1447 have_glob=no)]) | |
1448 | |
1449 if test "$have_fnmatch" != yes || test "$have_glob" != yes; then | |
1450 AC_MSG_ERROR([You are required to have fnmatch and glob]) | |
1451 fi | |
1452 else | |
1453 AC_MSG_ERROR([You are required to have fnmatch.h and glob.h]) | |
1454 fi | |
1455 | |
1456 ### Checks for functions and variables. | |
1457 | |
1458 AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \ | |
1459 chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork fstat getcwd \ | |
1460 getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \ | |
1461 getppid getpwent getpwuid gettimeofday getuid getwd _kbhit kill \ | |
1462 lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf lstat \ | |
1463 memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise readlink \ | |
1464 realpath rename resolvepath rindex rmdir roundl select setgrent setlocale \ | |
1465 setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \ | |
1466 snprintf stat strcasecmp strdup strerror stricmp strncasecmp \ | |
1467 strnicmp strptime strsignal symlink tempnam tgammaf trunc umask \ | |
1468 uname unlink usleep utime vfprintf vsprintf vsnprintf waitpid \ | |
1469 _chmod _snprintf x_utime _utime32) | |
1470 | |
1471 AC_LANG_PUSH(C++) | |
1472 AC_CHECK_DECLS([exp2, round, tgamma], [], [], [[#include <cmath>]]) | |
1473 AC_CHECK_FUNCS([exp2 round tgamma]) | |
1474 AH_VERBATIM([Z_FUNCS_AND_DECLS], [ | |
1475 #if defined (__cplusplus) | |
1476 extern "C" { | |
1477 #endif | |
1478 #if HAVE_EXP2 && ! HAVE_DECL_EXP2 | |
1479 double exp2 (double ); | |
1480 #endif | |
1481 #if HAVE_ROUND && ! HAVE_DECL_ROUND | |
1482 double round (double); | |
1483 #endif | |
1484 #if HAVE_TGAMMA && ! HAVE_DECL_TGAMMA | |
1485 double tgamma (double); | |
1486 #endif | |
1487 #if defined (__cplusplus) | |
1488 } | |
1489 #endif | |
1490 ]) | |
1491 AC_LANG_POP(C++) | |
1492 | |
1493 case "$canonical_host_type" in | |
1494 *-*-mingw*) | |
1495 ## MinGW does not provide a mkstemp function. However, it provides | |
1496 ## the mkstemps function in libiberty. | |
1497 AC_MSG_CHECKING(for mkstemps in libiberty) | |
1498 save_LIBS="$LIBS" | |
1499 LIBS="-liberty $LIBS" | |
1500 AC_LINK_IFELSE([ | |
1501 AC_LANG_PROGRAM([[int mkstemps (char *pattern, int suffix_len);]], | |
1502 [[mkstemps ("XXXXXX", 0);]] | |
1503 )], | |
1504 [AC_MSG_RESULT(yes) | |
1505 HAVE_MKSTEMPS=yes | |
1506 AC_DEFINE(HAVE_MKSTEMPS, 1, [Define if mkstemps is available in libiberty.]) | |
1507 ], | |
1508 [AC_MSG_RESULT(no) | |
1509 HAVE_MKSTEMPS=no | |
1510 LIBS="$save_LIBS" | |
1511 ]) | |
1512 ;; | |
1513 esac | |
1514 | |
1515 case "$canonical_host_type" in | |
1516 *-*-msdosmsvc | *-*-mingw*) | |
1517 ## The %T and %e format specifiers for strftime are not implemented | |
1518 ## so use our version. We could use an actual configure test | |
1519 ## for this. | |
1520 ;; | |
1521 *) | |
1522 AC_CHECK_FUNCS(strftime) | |
1523 ;; | |
1524 esac | |
1525 | |
1526 OCTAVE_HAVE_C99_VSNPRINTF | |
1527 OCTAVE_STRPTIME_BROKEN | |
1528 OCTAVE_SMART_PUTENV | |
1529 | |
1530 case "$canonical_host_type" in | |
1531 *-*-msdosmsvc | *-*-mingw*) | |
1532 AC_MSG_CHECKING([for required _WIN32_WINNT]) | |
1533 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[ | |
1534 #include <windows.h> | |
1535 #if _WIN32_WINNT < 0x0403 | |
1536 #error "Wrong version" | |
1537 #endif]], []), | |
1538 AC_MSG_RESULT([none]), [ | |
1539 AC_DEFINE(_WIN32_WINNT, 0x0403, [Define to 0x0403 to access InitializeCriticalSectionAndSpinCount]) | |
1540 AC_MSG_RESULT([0x0403])]) | |
1541 AC_MSG_CHECKING([whether _USE_MATH_DEFINES needs to be defined]) | |
1542 AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <math.h>]], | |
1543 [[int x = M_LN2;]]), | |
1544 AC_MSG_RESULT([no]), [ | |
1545 AC_DEFINE(_USE_MATH_DEFINES, 1, [Define if your system needs it to define math constants like M_LN2]) | |
1546 AC_MSG_RESULT([yes])]) | |
1547 ;; | |
1548 esac | |
1549 | |
1550 ### Dynamic linking is now enabled only if we are building shared | |
1551 ### libs and some API for dynamic linking is detected. | |
1552 | |
1553 LD_CXX='$(CXX)' | |
1554 RDYNAMIC_FLAG= | |
1555 DL_API_MSG="" | |
1556 dlopen_api=false | |
1557 shl_load_api=false | |
1558 loadlibrary_api=false | |
1559 dyld_api=false | |
1560 | |
1561 if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then | |
1562 | |
1563 ## Check for dyld first since OS X can have a non-standard libdl | |
1564 | |
1565 save_LIBS="$LIBS" | |
1566 AC_CHECK_HEADER(mach-o/dyld.h) | |
1567 if test "$ac_cv_header_mach_o_dyld_h" = yes; then | |
1568 dyld_api=true | |
1569 else | |
1570 AC_CHECK_LIB(dld, shl_load, [DL_LIBS=-ldld; LIBS="$LIBS $DL_LIBS"]) | |
1571 AC_CHECK_FUNCS(shl_load shl_findsym) | |
1572 if test "$ac_cv_func_shl_load" = yes \ | |
1573 && test "$ac_cv_func_shl_findsym" = yes; then | |
1574 shl_load_api=true | |
1575 else | |
1576 AC_CHECK_LIB(wsock32, LoadLibrary, [ | |
1577 DL_LIBS=-lwsock32; LIBS="$LIBS $DL_LIBS"]) | |
1578 AC_CHECK_FUNCS(LoadLibrary) | |
1579 if test "$ac_cv_func_loadlibrary" = yes; then | |
1580 loadlibrary_api=true | |
1581 else | |
1582 AC_CHECK_LIB(dl, dlopen, [DL_LIBS=-ldl; LIBS="$LIBS $DL_LIBS"]) | |
1583 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) | |
1584 if test "$ac_cv_func_dlclose" = yes \ | |
1585 && test "$ac_cv_func_dlerror" = yes \ | |
1586 && test "$ac_cv_func_dlopen" = yes \ | |
1587 && test "$ac_cv_func_dlsym" = yes; then | |
1588 dlopen_api=true | |
1589 else | |
1590 case "$canonical_host_type" in | |
1591 i[[3456]]86-*-sco3.2v5*) | |
1592 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' | |
1593 dlopen_api=true | |
1594 ;; | |
1595 esac | |
1596 fi | |
1597 fi | |
1598 fi | |
1599 fi | |
1600 LIBS="$save_LIBS" | |
1601 AC_SUBST(DL_LIBS) | |
1602 | |
1603 ## autoconf test for LoadLibrary appears broken. Bypass for cygwin/mingw | |
1604 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then | |
1605 true | |
1606 else | |
1607 case "$canonical_host_type" in | |
1608 *-*-cygwin* | *-*-mingw* | *-*-msdosmsvc) | |
1609 loadlibrary_api=true; | |
1610 ;; | |
1611 esac | |
1612 fi | |
1613 | |
1614 if $dlopen_api; then | |
1615 DL_API_MSG="(dlopen)" | |
1616 AC_DEFINE(HAVE_DLOPEN_API, 1, [Define if your system has dlopen, dlsym, dlerror, and dlclose for dynamic linking]) | |
1617 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) | |
1618 elif $shl_load_api; then | |
1619 DL_API_MSG="(shl_load)" | |
1620 AC_DEFINE(HAVE_SHL_LOAD_API, 1, [Define if your system has shl_load and shl_findsym for dynamic linking]) | |
1621 elif $loadlibrary_api; then | |
1622 DL_API_MSG="(LoadLibrary)" | |
1623 AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) | |
1624 elif $dyld_api; then | |
1625 DL_API_MSG="(dyld)" | |
1626 AC_DEFINE(HAVE_DYLD_API, 1, [Define if your system has dyld for dynamic linking]) | |
1627 fi | |
1628 | |
1629 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then | |
1630 ENABLE_DYNAMIC_LINKING=true | |
1631 AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) | |
1632 fi | |
1633 fi | |
1634 | |
1635 if $SHARED_LIBS; then | |
1636 LIBOCTINTERP=-loctinterp$SHLLINKEXT | |
1637 LIBOCTAVE=-loctave$SHLLINKEXT | |
1638 LIBCRUFT=-lcruft$SHLLINKEXT | |
1639 else | |
1640 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' | |
1641 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' | |
1642 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' | |
1643 fi | |
1644 | |
1645 AC_SUBST(LD_CXX) | |
1646 AC_SUBST(RDYNAMIC_FLAG) | |
1647 AC_SUBST(ENABLE_DYNAMIC_LINKING) | |
1648 AC_SUBST(LIBOCTINTERP) | |
1649 AC_SUBST(LIBOCTAVE) | |
1650 AC_SUBST(LIBCRUFT) | |
1651 | |
1652 ### There is more than one possible prototype for gettimeofday. See | |
1653 ### which one (if any) appears in sys/time.h. These tests are from | |
1654 ### Emacs 19. | |
1655 | |
1656 AC_MSG_CHECKING(for struct timeval) | |
1657 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME | |
1658 #include <sys/time.h> | |
1659 #include <time.h> | |
1660 #else | |
1661 #ifdef HAVE_SYS_TIME_H | |
1662 #include <sys/time.h> | |
1663 #else | |
1664 #include <time.h> | |
1665 #endif | |
1666 #endif]], [[static struct timeval x; x.tv_sec = x.tv_usec;]])], | |
1667 [AC_MSG_RESULT(yes) | |
1668 HAVE_TIMEVAL=yes | |
1669 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], | |
1670 [AC_MSG_RESULT(no) | |
1671 HAVE_TIMEVAL=no]) | |
1672 | |
1673 if test "x$HAVE_TIMEVAL" = xyes; then | |
1674 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments) | |
1675 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef TIME_WITH_SYS_TIME | |
1676 #include <sys/time.h> | |
1677 #include <time.h> | |
1678 #else | |
1679 #ifdef HAVE_SYS_TIME_H | |
1680 #include <sys/time.h> | |
1681 #else | |
1682 #include <time.h> | |
1683 #endif | |
1684 #endif]], [[struct timeval time; | |
1685 struct timezone dummy; | |
1686 gettimeofday (&time, &dummy);]])], | |
1687 [AC_MSG_RESULT(no)], | |
1688 [AC_MSG_RESULT(yes) | |
1689 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, | |
1690 [Define if your system has a single-arg prototype for gettimeofday.])]) | |
1691 fi | |
1692 | |
1693 dnl Maybe <cmath> defines the IEEE functions we need. | |
1694 | |
1695 OCTAVE_CMATH_FUNC(isnan) | |
1696 OCTAVE_CMATH_FUNC(isinf) | |
1697 OCTAVE_CMATH_FUNC(isfinite) | |
1698 | |
1699 dnl Would like to get rid of this cruft, and just have | |
1700 dnl | |
1701 dnl AC_CHECK_FUNCS(finite isnan isinf) | |
1702 dnl | |
1703 dnl instead, but that used to fail on some systems... | |
1704 dnl | |
1705 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf | |
1706 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that | |
1707 dnl fails, we try again by including math.h and invoking the function | |
1708 dnl with an argument. | |
1709 | |
1710 ### I am told that Inf and NaN don't work on m68k HP sytems, and that | |
1711 ### on SCO systems, isnan and isinf don't work, but they can be | |
1712 ### replaced by something that does. | |
1713 | |
1714 case "$canonical_host_type" in | |
1715 m68k-hp-hpux*) | |
1716 ;; | |
1717 *-*-sco*) | |
1718 AC_MSG_NOTICE([defining SCO to be 1]) | |
1719 AC_DEFINE(SCO, 1, [Define if using an SCO system.]) | |
1720 AC_MSG_NOTICE([forcing HAVE_ISINF for SCO]) | |
1721 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) | |
1722 AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO]) | |
1723 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) | |
1724 ;; | |
1725 *) | |
1726 AC_CHECK_FUNCS(finite isnan isinf copysign signbit) | |
1727 AC_CHECK_FUNCS(_finite _isnan _copysign) | |
1728 AC_CHECK_DECLS(signbit, , , [#include <math.h>]) | |
1729 ;; | |
1730 esac | |
1731 | |
1732 ### Check for nonstandard but common math functions that we need. | |
1733 | |
1734 AC_CHECK_FUNCS(acosh acoshf asinh asinhf atanh atanhf erf erff erfc erfcf exp2f log2 log2f) | |
1735 AC_CHECK_FUNCS(hypotf _hypotf) | |
1736 | |
1737 ### Checks for OS specific cruft. | |
1738 | |
1739 AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) | |
1740 | |
1741 AC_STRUCT_TM | |
1742 AC_STRUCT_TIMEZONE | |
1743 AC_FUNC_CLOSEDIR_VOID | |
1744 | |
1745 AC_CHECK_MEMBERS(struct group.gr_passwd) | |
1746 | |
1747 # mkdir takes a single argument on some systems. | |
1748 OCTAVE_MKDIR_TAKES_ONE_ARG | |
1749 | |
1750 octave_found_termlib=no | |
1751 for termlib in ncurses curses termcap terminfo termlib; do | |
1752 AC_CHECK_LIB(${termlib}, tputs, [ | |
1753 TERM_LIBS="-l${termlib}" | |
1754 octave_found_termlib=yes | |
1755 break]) | |
1756 done | |
1757 | |
1758 if test "$octave_found_termlib" = no; then | |
1759 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\ | |
1760 r -ltermlib!" | |
1761 AC_MSG_WARN($warn_termlibs) | |
1762 fi | |
1763 AC_SUBST(TERM_LIBS) | |
1764 | |
1765 OCTAVE_ENABLE_READLINE | |
1766 | |
1767 AC_MSG_CHECKING([for struct exception in math.h]) | |
1768 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>]], | |
1769 [[struct exception *x; x->type; x->name;]])], | |
1770 [AC_MSG_RESULT(yes) | |
1771 AC_DEFINE(EXCEPTION_IN_MATH, 1, | |
1772 [Define if your math.h declares struct exception for matherr().])], | |
1773 [AC_MSG_RESULT(no)]) | |
1774 | |
1775 ### Signal stuff. | |
1776 | |
1777 AC_TYPE_SIGNAL | |
1778 AC_CHECK_DECLS([sys_siglist], [], [], | |
1779 [#include <signal.h> | |
1780 /* NetBSD declares sys_siglist in unistd.h. */ | |
1781 #if HAVE_UNISTD_H | |
1782 # include <unistd.h> | |
1783 #endif | |
1784 ]) | |
1785 OCTAVE_SIGNAL_CHECK | |
1786 OCTAVE_REINSTALL_SIGHANDLERS | |
1787 if test "$ac_cv_type_signal" = "void"; then | |
1788 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.]) | |
1789 fi | |
1790 | |
1791 ### A system dependent kluge or two. | |
1792 | |
1793 AC_CHECK_FUNCS(getrusage times) | |
1794 case "$canonical_host_type" in | |
1795 *-*-cygwin*) | |
1796 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) | |
1797 ;; | |
1798 esac | |
1799 | |
1800 ### Checks for other programs used for building, testing, installing, | |
1801 ### and running Octave. | |
1802 | |
1803 AC_PROG_AWK | |
1804 OCTAVE_PROG_FIND | |
1805 OCTAVE_PROG_SED | |
1806 OCTAVE_PROG_PERL | |
1807 OCTAVE_PROG_PYTHON | |
1808 | |
1809 OCTAVE_PROG_FLEX | |
1810 OCTAVE_PROG_BISON | |
1811 | |
1812 AC_PROG_LN_S | |
1813 | |
1814 AC_PROG_INSTALL | |
1815 INSTALL_SCRIPT='${INSTALL}' | |
1816 AC_SUBST(INSTALL_SCRIPT) | |
1817 | |
1818 OCTAVE_PROG_DESKTOP_FILE_INSTALL | |
1819 | |
1820 OCTAVE_PROG_GNUPLOT | |
1821 OCTAVE_PROG_PAGER | |
1822 OCTAVE_PROG_GPERF | |
1823 | |
1824 OCTAVE_PROG_GHOSTSCRIPT | |
1825 OCTAVE_PROG_MAKEINFO | |
1826 OCTAVE_PROG_TEXI2DVI | |
1827 OCTAVE_PROG_TEXI2PDF | |
1828 | |
1829 ### Even though we include config.h, we need to have the preprocessor | |
1830 ### defines available in a variable for the octave-bug script. Use | |
1831 ### UGLY_DEFS for that. | |
1832 | |
1833 AC_OUTPUT_MAKE_DEFS | |
1834 | |
1835 ### We have to insert extra levels of backslash quoting here so that | |
1836 ### the right thing ends up in oct-conf.h. | |
1837 UGLY_DEFS=`echo $DEFS | $SED 's,\\",\\\\\\\\\\\\\\\\\\",g'` | |
1838 AC_MSG_NOTICE([defining UGLY_DEFS to be $UGLY_DEFS]) | |
1839 AC_SUBST(UGLY_DEFS) | |
1840 | |
1841 ### Maybe add -Wall, -W, and -Wshadow to compiler flags now that we're | |
1842 ### done feature testing. | |
1843 | |
1844 try_extra_warning_flags=true | |
1845 AC_ARG_ENABLE(extra-warning-flags, | |
1846 [AS_HELP_STRING([--enable-extra-warning-flags], | |
1847 [add -Wall, -W, -Wshadow, and -Wold-style-cast options to CFLAGS and CXXFLAGS (on by default, but only if the compiler appears to accept them)])], | |
1848 [if test "$enableval" = no; then | |
1849 try_extra_warning_flags=false | |
1850 fi], []) | |
1851 | |
1852 if $try_extra_warning_flags; then | |
1853 OCTAVE_CC_FLAG(-Wall, [ | |
1854 WARN_CFLAGS="$WARN_CFLAGS -Wall"; | |
1855 AC_MSG_RESULT([adding -Wall to WARN_CFLAGS])]) | |
1856 OCTAVE_CC_FLAG(-W, [ | |
1857 WARN_CFLAGS="$WARN_CFLAGS -W"; | |
1858 AC_MSG_RESULT([adding -W to WARN_CFLAGS])]) | |
1859 OCTAVE_CC_FLAG(-Wshadow, [ | |
1860 WARN_CFLAGS="$WARN_CFLAGS -Wshadow"; | |
1861 AC_MSG_RESULT([adding -Wshadow to WARN_CFLAGS])]) | |
1862 OCTAVE_CC_FLAG(-Wformat, [ | |
1863 WARN_CFLAGS="$WARN_CFLAGS -Wformat"; | |
1864 AC_MSG_RESULT([adding -Wformat to WARN_CFLAGS])]) | |
1865 | |
1866 OCTAVE_CXX_FLAG(-Wall, [ | |
1867 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"; | |
1868 AC_MSG_RESULT([adding -Wall to WARN_CXXFLAGS])]) | |
1869 OCTAVE_CXX_FLAG(-W, [ | |
1870 WARN_CXXFLAGS="$WARN_CXXFLAGS -W"; | |
1871 AC_MSG_RESULT([adding -W to WARN_CXXFLAGS])]) | |
1872 OCTAVE_CXX_FLAG(-Wshadow, [ | |
1873 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wshadow"; | |
1874 AC_MSG_RESULT([adding -Wshadow to WARN_CXXFLAGS])]) | |
1875 OCTAVE_CXX_FLAG(-Wold-style-cast, [ | |
1876 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wold-style-cast"; | |
1877 AC_MSG_RESULT([adding -Wold-style-cast to WARN_CXXFLAGS])]) | |
1878 OCTAVE_CXX_FLAG(-Wformat, [ | |
1879 WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat"; | |
1880 AC_MSG_RESULT([adding -Wformat to WARN_CXXFLAGS])]) | |
1881 fi | |
1882 | |
1883 GCC_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Wmissing-prototypes \ | |
1884 -Wpointer-arith -Wstrict-prototypes -Wwrite-strings" | |
1885 | |
1886 GXX_STRICT_FLAGS="-Wcast-align -Wcast-qual -Wconversion -Wpointer-arith \ | |
1887 -Wwrite-strings -Weffc++" | |
1888 | |
1889 try_strict_warning_flags=false | |
1890 | |
1891 AC_ARG_ENABLE(strict-warning-flags, | |
1892 [AS_HELP_STRING([--enable-strict-warning-flags], | |
1893 [add extra strict warning options to CFLAGS and CXXFLAGS (off by default)])], | |
1894 [if test "$enableval" = yes; then | |
1895 try_strict_warning_flags=true | |
1896 fi], []) | |
1897 | |
1898 if $try_strict_warning_flags; then | |
1899 for flag in $GCC_STRICT_FLAGS; do | |
1900 OCTAVE_CC_FLAG($flag, [ | |
1901 WARN_CFLAGS="$WARN_CFLAGS $flag"; | |
1902 AC_MSG_RESULT([adding $flag to WARN_CFLAGS])]) | |
1903 done | |
1904 for flag in $GXX_STRICT_FLAGS; do | |
1905 OCTAVE_CXX_FLAG($flag, [ | |
1906 WARN_CXXFLAGS="$WARN_CXXFLAGS $flag"; | |
1907 AC_MSG_RESULT([adding $flag to WARN_CXXFLAGS])]) | |
1908 done | |
1909 fi | |
1910 | |
1911 AC_SUBST(WARN_CFLAGS) | |
1912 AC_SUBST(WARN_CXXFLAGS) | |
1913 | |
1914 ### Run configure in subdirectories. | |
1915 | |
1916 export CC | |
1917 export CXX | |
1918 export F77 | |
1919 | |
1920 AC_CONFIG_SUBDIRS(scripts) | |
1921 | |
1922 ### Some things to add to the bottom of config.h. | |
1923 | |
1924 AH_BOTTOM([ | |
1925 #if defined (__GNUC__) | |
1926 #define GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__)) | |
1927 #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__)) | |
1928 #define GCC_ATTR_UNUSED __attribute__ ((__unused__)) | |
1929 #else | |
1930 #define GCC_ATTR_DEPRECATED | |
1931 #define GCC_ATTR_NORETURN | |
1932 #define GCC_ATTR_UNUSED | |
1933 #endif | |
1934 | |
1935 #define X_CAST(T, E) (T) (E) | |
1936 | |
1937 #if defined (CXX_BROKEN_REINTERPRET_CAST) | |
1938 #define FCN_PTR_CAST(T, E) (T) (E) | |
1939 #else | |
1940 #define FCN_PTR_CAST(T, E) reinterpret_cast<T> (E) | |
1941 #endif | |
1942 | |
1943 #if !defined(HAVE_DEV_T) | |
1944 typedef short dev_t; | |
1945 #endif | |
1946 | |
1947 #if !defined(HAVE_INO_T) | |
1948 typedef unsigned long ino_t; | |
1949 #endif | |
1950 | |
1951 #if !defined(HAVE_NLINK_T) | |
1952 typedef short nlink_t; | |
1953 #endif | |
1954 | |
1955 #if !defined(HAVE_SIGSET_T) | |
1956 typedef int sigset_t; | |
1957 #endif | |
1958 | |
1959 #if !defined(HAVE_SIG_ATOMIC_T) | |
1960 typedef int sig_atomic_t; | |
1961 #endif | |
1962 | |
1963 #if defined (_MSC_VER) | |
1964 #define __WIN32__ | |
1965 #define WIN32 | |
1966 /* missing parameters in macros */ | |
1967 #pragma warning (disable: 4003) | |
1968 /* missing implementations in template instantiation */ | |
1969 #pragma warning (disable: 4996) | |
1970 /* deprecated function names (FIXME?) */ | |
1971 #pragma warning (disable: 4661) | |
1972 #endif | |
1973 | |
1974 #if defined (__WIN32__) && ! defined (__CYGWIN__) | |
1975 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 | |
1976 #elif defined (__CYGWIN__) | |
1977 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 | |
1978 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 | |
1979 #else | |
1980 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 | |
1981 #endif | |
1982 | |
1983 /* Define if we expect to have <windows.h>, Sleep, etc. */ | |
1984 #if defined (__WIN32__) && ! defined (__CYGWIN__) | |
1985 #define OCTAVE_USE_WINDOWS_API 1 | |
1986 #endif | |
1987 | |
1988 #if defined (__APPLE__) && defined (__MACH__) | |
1989 #define OCTAVE_USE_OS_X_API 1 | |
1990 #endif | |
1991 | |
1992 /* sigsetjmp is a macro, not a function. */ | |
1993 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) | |
1994 #define OCTAVE_HAVE_SIG_JUMP | |
1995 #endif | |
1996 | |
1997 #if defined (__DECCXX) | |
1998 #define __USE_STD_IOSTREAM | |
1999 #endif | |
2000 | |
2001 #if defined (_UNICOS) | |
2002 #define F77_USES_CRAY_CALLING_CONVENTION | |
2003 #endif | |
2004 | |
2005 #if 0 | |
2006 #define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION | |
2007 #endif | |
2008 | |
2009 #ifdef USE_64_BIT_IDX_T | |
2010 #define SIZEOF_OCTAVE_IDX_TYPE 8 | |
2011 #else | |
2012 #define SIZEOF_OCTAVE_IDX_TYPE SIZEOF_INT | |
2013 #endif | |
2014 | |
2015 // To be able to use long doubles for 64-bit mixed arithmetics, we need them at | |
2016 // least 80 bits wide and we need roundl declared in math.h. | |
2017 // FIXME -- maybe substitute this by a more precise check in the future. | |
2018 #if (SIZEOF_LONG_DOUBLE >= 10) && defined (HAVE_ROUNDL) | |
2019 #define OCTAVE_INT_USE_LONG_DOUBLE | |
2020 #endif | |
2021 | |
2022 #define OCTAVE_EMPTY_CPP_ARG | |
2023 | |
2024 // Octave is currently unable to use FFTW unless both float | |
2025 // and double versions are both available. | |
2026 #if defined (HAVE_FFTW3) && defined (HAVE_FFTW3F) | |
2027 #define HAVE_FFTW | |
2028 #endif | |
2029 | |
2030 // Backward compatibility. | |
2031 #if defined (HAVE_Z) | |
2032 #define HAVE_ZLIB | |
2033 #endif | |
2034 | |
2035 #include "oct-dlldefs.h" | |
2036 #include "oct-types.h" | |
2037 ]) | |
2038 | |
2039 ### Do the substitutions in all the Makefiles. | |
2040 | |
2041 AC_CONFIG_COMMANDS([Makefile], [if test "$ac_srcdir" != "."; then | |
2042 cp $srcdir/Makefile . | |
2043 fi]) | |
2044 | |
2045 AC_SUBST(ac_config_files) | |
2046 AC_SUBST(ac_config_headers) | |
2047 | |
2048 AC_CONFIG_FILES([octMakefile Makeconf m4/Makefile test/Makefile | |
2049 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile | |
2050 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile | |
2051 examples/Makefile examples/@polynomial/Makefile | |
2052 examples/@FIRfilter/Makefile liboctave/Makefile | |
2053 liboctave/oct-types.h src/Makefile src/mxarray.h libcruft/Makefile | |
2054 libcruft/Makerules libcruft/amos/Makefile libcruft/blas/Makefile | |
2055 libcruft/daspk/Makefile libcruft/dasrt/Makefile | |
2056 libcruft/dassl/Makefile libcruft/fftpack/Makefile | |
2057 libcruft/lapack/Makefile | |
2058 libcruft/misc/Makefile libcruft/odepack/Makefile | |
2059 libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile | |
2060 libcruft/ranlib/Makefile libcruft/slatec-fn/Makefile | |
2061 libcruft/slatec-err/Makefile libcruft/villad/Makefile | |
2062 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) | |
2063 | |
2064 AC_OUTPUT | |
2065 | |
2066 ### Print a summary so that important information isn't missed. | |
2067 | |
2068 AC_MSG_NOTICE([ | |
2069 | |
2070 Octave is now configured for $canonical_host_type | |
2071 | |
2072 Source directory: $srcdir | |
2073 Installation prefix: $prefix | |
2074 C compiler: $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS | |
2075 C++ compiler: $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS | |
2076 Fortran compiler: $F77 $FFLAGS | |
2077 Fortran libraries: $FLIBS | |
2078 Glob libraries: $LIBGLOB | |
2079 Lex libraries: $LEXLIB | |
2080 LIBS: $LIBS | |
2081 | |
2082 AMD CPPFLAGS: $AMD_CPPFLAGS | |
2083 AMD LDFLAGS: $AMD_LDFLAGS | |
2084 AMD libraries: $AMD_LIBS | |
2085 ARPACK libraries: $ARPACK_LIBS | |
2086 BLAS libraries: $BLAS_LIBS | |
2087 CAMD CPPFLAGS: $CAMD_CPPFLAGS | |
2088 CAMD LDFLAGS: $CAMD_LDFLAGS | |
2089 CAMD libraries: $CAMD_LIBS | |
2090 CARBON libraries: $CARBON_LIBS | |
2091 CCOLAMD CPPFLAGS: $CCOLAMD_CPPFLAGS | |
2092 CCOLAMD LDFLAGS: $CCOLAMD_LDFLAGS | |
2093 CCOLAMD libraries: $CCOLAMD_LIBS | |
2094 CHOLMOD CPPFLAGS: $CHOLMOD_CPPFLAGS | |
2095 CHOLMOD LDFLAGS: $CHOLMOD_LDFLAGS | |
2096 CHOLMOD libraries: $CHOLMOD_LIBS | |
2097 COLAMD CPPFLAGS: $COLAMD_CPPFLAGS | |
2098 COLAMD LDFLAGS: $COLAMD_LDFLAGS | |
2099 COLAMD libraries: $COLAMD_LIBS | |
2100 CURL CPPFLAGS: $CURL_CPPFLAGS | |
2101 CURL LDFLAGS: $CURL_LDFLAGS | |
2102 CURL libraries: $CURL_LIBS | |
2103 CXSPARSE CPPFLAGS: $CXSPARSE_CPPFLAGS | |
2104 CXSPARSE LDFLAGS: $CXSPARSE_LDFLAGS | |
2105 CXSPARSE libraries: $CXSPARSE_LIBS | |
2106 DL libraries: $DL_LIBS | |
2107 FFTW3 CPPFLAGS: $FFTW3_CPPFLAGS | |
2108 FFTW3 LDFLAGS: $FFTW3_LDFLAGS | |
2109 FFTW3 libraries: $FFTW3_LIBS | |
2110 FFTW3F CPPFLAGS: $FFTW3F_CPPFLAGS | |
2111 FFTW3F LDFLAGS: $FFTW3F_LDFLAGS | |
2112 FFTW3F libraries: $FFTW3F_LIBS | |
2113 FLTK backend libs: $GRAPHICS_LIBS | |
2114 GLPK CPPFLAGS: $GLPK_CPPFLAGS | |
2115 GLPK LDFLAGS: $GLPK_LDFLAGS | |
2116 GLPK libraries: $GLPK_LIBS | |
2117 GraphicsMagick++ | |
2118 CPPFLAGS: $MAGICK_CPPFLAGS | |
2119 LDFLAGS: $MAGICK_LDFLAGS | |
2120 libraries: $MAGICK_LIBS | |
2121 HDF5 CPPFLAGS: $HDF5_CPPFLAGS | |
2122 HDF5 LDFLAGS: $HDF5_LDFLAGS | |
2123 HDF5 libraries: $HDF5_LIBS | |
2124 OPENGL libraries: $OPENGL_LIBS | |
2125 PTHREAD flags: $PTHREAD_CFLAGS | |
2126 PTHREAD libraries: $PTHREAD_LIBS | |
2127 QHULL CPPFLAGS: $QHULL_CPPFLAGS | |
2128 QHULL LDFLAGS: $QHULL_LDFLAGS | |
2129 QHULL libraries: $QHULL_LIBS | |
2130 QRUPDATE libraries: $QRUPDATE_LIBS | |
2131 READLINE libraries: $READLINE_LIBS | |
2132 REGEX libraries: $REGEX_LIBS | |
2133 TERM libraries: $TERM_LIBS | |
2134 UMFPACK libraries: $UMFPACK_LIBS | |
2135 X11 include flags: $X11_INCFLAGS | |
2136 X11 libraries: $X11_LIBS | |
2137 Z CPPFLAGS: $Z_CPPFLAGS | |
2138 Z LDFLAGS: $Z_LDFLAGS | |
2139 Z libraries: $Z_LIBS | |
2140 | |
2141 Default pager: $DEFAULT_PAGER | |
2142 gnuplot: $GNUPLOT | |
2143 | |
2144 Do internal array bounds checking: $BOUNDS_CHECKING | |
2145 Build static libraries: $STATIC_LIBS | |
2146 Build shared libraries: $SHARED_LIBS | |
2147 Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG | |
2148 Include support for GNU readline: $USE_READLINE | |
2149 64-bit array dims and indexing: $USE_64_BIT_IDX_T | |
2150 ]) | |
2151 | |
2152 warn_msg_printed=false | |
2153 | |
2154 if $ENABLE_DYNAMIC_LINKING; then | |
2155 if $SHARED_LIBS; then | |
2156 true | |
2157 else | |
2158 AC_MSG_WARN([You used --enable-dl but not --enable-shared.]) | |
2159 AC_MSG_WARN([Are you sure that is what you want to do?]) | |
2160 warn_msg_printed=true | |
2161 fi | |
2162 fi | |
2163 | |
2164 if test -n "$gxx_only"; then | |
2165 AC_MSG_WARN($gxx_only) | |
2166 warn_msg_printed=true | |
2167 fi | |
2168 | |
2169 if test -n "$warn_gcc_version"; then | |
2170 AC_MSG_WARN($warn_gcc_version) | |
2171 warn_msg_printed=true | |
2172 fi | |
2173 | |
2174 if test -n "$warn_gcc_only"; then | |
2175 AC_MSG_WARN($warn_gcc_only) | |
2176 warn_msg_printed=true | |
2177 fi | |
2178 | |
2179 if test -n "$warn_readline"; then | |
2180 AC_MSG_WARN($warn_readline) | |
2181 warn_msg_printed=true | |
2182 fi | |
2183 | |
2184 if test -n "$warn_termlibs"; then | |
2185 AC_MSG_WARN($warn_termlibs) | |
2186 warn_msg_printed=true | |
2187 fi | |
2188 | |
2189 if test -n "$warn_gperf"; then | |
2190 AC_MSG_WARN($warn_gperf) | |
2191 warn_msg_printed=true | |
2192 fi | |
2193 | |
2194 if test -n "$warn_flex"; then | |
2195 AC_MSG_WARN($warn_flex) | |
2196 warn_msg_printed=true | |
2197 fi | |
2198 | |
2199 if test -n "$warn_bison"; then | |
2200 AC_MSG_WARN($warn_bison) | |
2201 warn_msg_printed=true | |
2202 fi | |
2203 | |
2204 if test -n "$warn_less"; then | |
2205 AC_MSG_WARN($warn_less) | |
2206 warn_msg_printed=true | |
2207 fi | |
2208 | |
2209 if test -n "$warn_blas_f77_incompatible"; then | |
2210 AC_MSG_WARN($warn_blas_f77_incompatible) | |
2211 warn_msg_printed=true | |
2212 fi | |
2213 | |
2214 if test -n "$warn_umfpack"; then | |
2215 AC_MSG_WARN($warn_umfpack) | |
2216 warn_msg_printed=true | |
2217 fi | |
2218 | |
2219 if test -n "$warn_qrupdate"; then | |
2220 AC_MSG_WARN($warn_qrupdate) | |
2221 warn_msg_printed=true | |
2222 fi | |
2223 | |
2224 if test -n "$warn_amd"; then | |
2225 AC_MSG_WARN($warn_amd) | |
2226 warn_msg_printed=true | |
2227 fi | |
2228 | |
2229 if test -n "$warn_colamd"; then | |
2230 AC_MSG_WARN($warn_colamd) | |
2231 warn_msg_printed=true | |
2232 fi | |
2233 | |
2234 if test -n "$warn_ccolamd"; then | |
2235 AC_MSG_WARN($warn_ccolamd) | |
2236 warn_msg_printed=true | |
2237 fi | |
2238 | |
2239 if test -n "$warn_cholmod"; then | |
2240 AC_MSG_WARN($warn_cholmod) | |
2241 warn_msg_printed=true | |
2242 fi | |
2243 | |
2244 if test -n "$warn_cxsparse"; then | |
2245 AC_MSG_WARN($warn_cxsparse) | |
2246 warn_msg_printed=true | |
2247 fi | |
2248 | |
2249 if test -n "$warn_arpack"; then | |
2250 AC_MSG_WARN($warn_arpack) | |
2251 warn_msg_printed=true | |
2252 fi | |
2253 | |
2254 if test -n "$warn_curl"; then | |
2255 AC_MSG_WARN($warn_curl) | |
2256 warn_msg_printed=true | |
2257 fi | |
2258 | |
2259 if test -n "$warn_fftw"; then | |
2260 AC_MSG_WARN($warn_fftw) | |
2261 warn_msg_printed=true | |
2262 fi | |
2263 | |
2264 if test -n "$warn_glpk"; then | |
2265 AC_MSG_WARN($warn_glpk) | |
2266 warn_msg_printed=true | |
2267 fi | |
2268 | |
2269 if test -n "$warn_magick"; then | |
2270 AC_MSG_WARN($warn_magick) | |
2271 warn_msg_printed=true | |
2272 fi | |
2273 | |
2274 if test -n "$warn_hdf5"; then | |
2275 AC_MSG_WARN($warn_hdf5) | |
2276 warn_msg_printed=true | |
2277 fi | |
2278 | |
2279 if test -n "$warn_regex"; then | |
2280 AC_MSG_WARN($warn_regex) | |
2281 warn_msg_printed=true | |
2282 fi | |
2283 | |
2284 if test -n "$warn_pcre"; then | |
2285 AC_MSG_WARN($warn_pcre) | |
2286 warn_msg_printed=true | |
2287 fi | |
2288 | |
2289 if test -n "$warn_qhull"; then | |
2290 AC_MSG_WARN($warn_qhull) | |
2291 warn_msg_printed=true | |
2292 fi | |
2293 | |
2294 if test -n "$warn_zlib"; then | |
2295 AC_MSG_WARN($warn_zlib) | |
2296 warn_msg_printed=true | |
2297 fi | |
2298 | |
2299 if test -n "$warn_ghostscript"; then | |
2300 AC_MSG_WARN($warn_ghostscript) | |
2301 warn_msg_printed=true | |
2302 fi | |
2303 | |
2304 if test -n "$warn_makeinfo"; then | |
2305 AC_MSG_WARN($warn_makeinfo) | |
2306 warn_msg_printed=true | |
2307 fi | |
2308 | |
2309 if test -n "$warn_texi2dvi"; then | |
2310 AC_MSG_WARN($warn_texi2dvi) | |
2311 warn_msg_printed=true | |
2312 fi | |
2313 | |
2314 if test -n "$warn_texi2pdf"; then | |
2315 AC_MSG_WARN($warn_texi2pdf) | |
2316 warn_msg_printed=true | |
2317 fi | |
2318 | |
2319 if test -n "$warn_64_bit"; then | |
2320 AC_MSG_WARN($warn_64_bit) | |
2321 warn_msg_printed=true | |
2322 fi | |
2323 | |
2324 if test -n "$warn_gnuplot"; then | |
2325 | |
2326 ## If you change this text, be sure to also change the corresponding | |
2327 ## set of warnings above. | |
2328 | |
2329 AC_MSG_WARN([]) | |
2330 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) | |
2331 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) | |
2332 AC_MSG_WARN([plotting commands without it.]) | |
2333 AC_MSG_WARN([]) | |
2334 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) | |
2335 AC_MSG_WARN([tell Octave where to find it by typing the command]) | |
2336 AC_MSG_WARN([]) | |
2337 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) | |
2338 AC_MSG_WARN([]) | |
2339 AC_MSG_WARN([at the Octave prompt.]) | |
2340 AC_MSG_WARN([]) | |
2341 warn_msg_printed=true | |
2342 fi | |
2343 | |
2344 if $USE_64_BIT_IDX_T; then | |
2345 AC_MSG_WARN([]) | |
2346 AC_MSG_WARN([You used the EXPERIMENTAL --enable-64 option.]) | |
2347 AC_MSG_WARN([Are you sure that is what you want to do?]) | |
2348 AC_MSG_WARN([]) | |
2349 AC_MSG_WARN([You must ensure that the Fortran compiler generates]) | |
2350 AC_MSG_WARN([code with 8 byte signed INTEGER values, and that your]) | |
2351 AC_MSG_WARN([BLAS and LAPACK libraries are compiled to use 8 byte]) | |
2352 AC_MSG_WARN([signed integers for array indexing.]) | |
2353 AC_MSG_WARN([]) | |
2354 warn_msg_printed=true | |
2355 fi | |
2356 | |
2357 native_graphics=true | |
2358 if test -n "$warn_freetype"; then | |
2359 AC_MSG_WARN("$warn_freetype") | |
2360 native_graphics=false | |
2361 warn_msg_printed=true | |
2362 fi | |
2363 | |
2364 if test -n "$warn_fontconfig"; then | |
2365 AC_MSG_WARN("$warn_fontconfig") | |
2366 native_graphics=false | |
2367 warn_msg_printed=true | |
2368 fi | |
2369 | |
2370 if test -n "$warn_ftgl"; then | |
2371 AC_MSG_WARN("$warn_ftgl") | |
2372 native_graphics=false | |
2373 warn_msg_printed=true | |
2374 fi | |
2375 | |
2376 if test -n "$warn_fltk_config"; then | |
2377 AC_MSG_WARN("$warn_fltk_config") | |
2378 native_graphics=false | |
2379 warn_msg_printed=true | |
2380 fi | |
2381 | |
2382 if test -n "$warn_fltk_opengl"; then | |
2383 AC_MSG_WARN("$warn_fltk_opengl") | |
2384 native_graphics=false | |
2385 warn_msg_printed=true | |
2386 fi | |
2387 | |
2388 if $native_graphics; then | |
2389 true; | |
2390 else | |
2391 AC_MSG_WARN([]) | |
2392 AC_MSG_WARN([I didn't find the necessary libraries to compile native]) | |
2393 AC_MSG_WARN([graphics. It isn't necessary to have native graphics]) | |
2394 AC_MSG_WARN([but you will have to use gnuplot or you won't be able]) | |
2395 AC_MSG_WARN([to use any of Octave's plotting commands]) | |
2396 AC_MSG_WARN([]) | |
2397 warn_msg_printed=true | |
2398 fi | |
2399 | |
2400 if $warn_msg_printed; then | |
2401 AC_MSG_NOTICE([ | |
2402 | |
2403 NOTE: libraries may be skipped if a library is not found OR | |
2404 if the library on your system is missing required features. | |
2405 ]) | |
2406 fi | |
2407 | |
2408 ### End of configure. |