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