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