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