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