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