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