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