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