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