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