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