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 |
2488
|
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
|
22 ### 02111-1307, USA. |
869
|
23 |
3887
|
24 AC_INIT |
4214
|
25 AC_REVISION($Revision: 1.398 $) |
3887
|
26 AC_PREREQ(2.52) |
|
27 AC_CONFIG_SRCDIR([src/octave.cc]) |
1146
|
28 AC_CONFIG_HEADER(config.h) |
869
|
29 |
3887
|
30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
|
31 |
|
32 OCTAVE_HOST_TYPE |
869
|
33 |
3923
|
34 AC_AIX |
3887
|
35 AC_MINIX |
3923
|
36 AC_ISC_POSIX |
1667
|
37 |
2223
|
38 ### some defaults |
|
39 |
2813
|
40 OCTAVE_SET_DEFAULT(man1dir, '$(mandir)/man1') |
|
41 OCTAVE_SET_DEFAULT(man1ext, '.1') |
|
42 OCTAVE_SET_DEFAULT(infofile, '$(infodir)/octave.info') |
3597
|
43 OCTAVE_SET_DEFAULT(octincludedir, '$(includedir)/octave-$(version)') |
3029
|
44 OCTAVE_SET_DEFAULT(fcnfiledir, '$(datadir)/octave/$(version)/m') |
2813
|
45 OCTAVE_SET_DEFAULT(localfcnfiledir, '$(datadir)/octave/site/m') |
3597
|
46 OCTAVE_SET_DEFAULT(localverfcnfiledir, '$(datadir)/octave/$(version)/site/m') |
|
47 OCTAVE_SET_DEFAULT(localfcnfilepath, |
|
48 '$(localverfcnfiledir)//:$(localfcnfiledir)//') |
3141
|
49 OCTAVE_SET_DEFAULT(octlibdir, '$(libdir)/octave-$(version)') |
3029
|
50 OCTAVE_SET_DEFAULT(archlibdir, |
3130
|
51 '$(libexecdir)/octave/$(version)/exec/$(canonical_host_type)') |
3029
|
52 OCTAVE_SET_DEFAULT(localarchlibdir, |
3130
|
53 '$(libexecdir)/octave/site/exec/$(canonical_host_type)') |
3597
|
54 OCTAVE_SET_DEFAULT(localverarchlibdir, |
|
55 '$(libexecdir)/octave/$(version)/site/exec/$(canonical_host_type)') |
3029
|
56 OCTAVE_SET_DEFAULT(octfiledir, |
3130
|
57 '$(libexecdir)/octave/$(version)/oct/$(canonical_host_type)') |
3029
|
58 OCTAVE_SET_DEFAULT(localoctfiledir, |
3130
|
59 '$(libexecdir)/octave/site/oct/$(canonical_host_type)') |
3597
|
60 OCTAVE_SET_DEFAULT(localveroctfiledir, |
|
61 '$(libexecdir)/octave/$(version)/site/oct/$(canonical_host_type)') |
|
62 OCTAVE_SET_DEFAULT(localoctfilepath, |
|
63 '$(localveroctfiledir)//:$(localoctfiledir)//') |
3029
|
64 OCTAVE_SET_DEFAULT(fcnfilepath, |
|
65 '.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//') |
|
66 OCTAVE_SET_DEFAULT(imagedir, '$(datadir)/octave/$(version)/imagelib') |
2813
|
67 OCTAVE_SET_DEFAULT(imagepath, '.:$(imagedir)//') |
1667
|
68 |
2155
|
69 ### Make configure args available for other uses. |
|
70 |
|
71 config_opts=$ac_configure_args |
|
72 AC_SUBST(config_opts) |
|
73 |
1667
|
74 ### Path separator. |
|
75 |
3887
|
76 AC_DEFINE(SEPCHAR, [':'], Define this to be the path separator for your system, as a character constant.]) |
|
77 AC_DEFINE(SEPCHAR_STR, [":"], [Define this to the path separator, as a string.]) |
1667
|
78 |
869
|
79 ### Allow the user to force us to use f2c. |
|
80 |
832
|
81 AC_ARG_WITH(f2c, |
|
82 [ --with-f2c use f2c even if Fortran compiler is available], |
2813
|
83 [if test "$withval" = no; then use_f2c=false; else use_f2c=true; fi], |
1177
|
84 use_f2c=false) |
|
85 |
|
86 ### Allow the user to force us to use g77. |
|
87 |
|
88 AC_ARG_WITH(g77, |
|
89 [ --with-g77 use g77 to compile Fortran subroutines], |
2813
|
90 [if test "$withval" = no; then use_g77=false; else use_g77=true; fi], |
1177
|
91 use_g77=false) |
|
92 |
2813
|
93 ### Allow the user to force us to use f77. |
|
94 |
|
95 AC_ARG_WITH(f77, |
|
96 [ --with-f77 use f77 to compile Fortran subroutines], |
|
97 [if test "$withval" = no; then use_f77=false; else use_f77=true; fi], |
|
98 use_f77=false) |
|
99 |
|
100 ### Make sure only one of the above options for Fortran compilers was |
|
101 ### specified (multiple "no" or --without-FOO options are ok). |
|
102 |
|
103 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(f77, g77, |
3105
|
104 [warn_f77_and_g77="--with-f77 and --with-g77 both specified! Using g77..." |
|
105 AC_MSG_WARN($warn_f77_and_g77) |
2813
|
106 use_g77=false]) |
|
107 |
|
108 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(f77, f2c, |
3105
|
109 [warn_f2c_and_f77="--with-f2c and --with-f77 both specified! Using f77..." |
|
110 AC_MSG_WARN($warn_f2c_and_f77) |
2813
|
111 use_f2c=false]) |
|
112 |
|
113 OCTAVE_CHECK_EXCLUSIVE_WITH_OPTIONS(g77, f2c, |
3105
|
114 [warn_f2c_and_g77="--with-f2c and --with-g77 both specified! Using g77..." |
|
115 AC_MSG_WARN($warn_f2c_and_g77) |
2813
|
116 use_f2c=false]) |
869
|
117 |
2415
|
118 dnl ### Allow the user disable support for plplot. |
|
119 dnl |
|
120 dnl # USE_PLPLOT=true |
|
121 dnl # PLPLOT_DIR=plplot |
3156
|
122 dnl # LIBPLPLOT='$(TOPDIR)/plplot/libplplot.$(LIBEXT) |
1397
|
123 USE_PLPLOT=false |
|
124 PLPLOT_DIR="" |
|
125 LIBPLPLOT="" |
2415
|
126 dnl AC_ARG_ENABLE(plplot, |
|
127 dnl [ --enable-plplot use plplot for plotting (default is yes)], |
2813
|
128 dnl [if test "$enableval" = no; then |
2415
|
129 dnl USE_PLPLOT=false; |
|
130 dnl LIBPLPLOT=""; |
|
131 dnl PLPLOT_DIR=""; |
|
132 dnl fi], []) |
|
133 dnl if $USE_PLPLOT; then |
3887
|
134 dnl AC_DEFINE(USE_PLPLOT, 1, [Define to use plplot.]) |
2415
|
135 dnl fi |
2421
|
136 AC_SUBST(LIBPLPLOT) |
|
137 AC_SUBST(PLPLOT_DIR) |
1137
|
138 |
3156
|
139 LIBKPATHSEA='$(TOPDIR)/kpathsea/libkpathsea.$(LIBEXT)' |
|
140 AC_SUBST(LIBKPATHSEA) |
|
141 |
2813
|
142 ### Make it possible to have Octave's array and matrix classes do bounds |
2108
|
143 ### checking on element references. This slows some operations down a |
2813
|
144 ### bit, so it is turned off by default. |
2108
|
145 |
2450
|
146 BOUNDS_CHECKING=false |
2108
|
147 AC_ARG_ENABLE(bounds-check, |
3060
|
148 [ --enable-bounds-check for internal array classes (default is no)], |
|
149 [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], []) |
2108
|
150 if $BOUNDS_CHECKING; then |
3887
|
151 AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.]) |
2108
|
152 fi |
|
153 |
3215
|
154 ### It seems that there are some broken inline assembly functions in |
|
155 ### the GNU libc. Since I'm not sure how to test whether we are using |
|
156 ### GNU libc, just disable them for all platforms. |
|
157 |
|
158 AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) |
3887
|
159 AC_DEFINE(__NO_MATH_INLINES, 1, [Define if your version of GNU libc has buggy inline assembly code for math functions like exp.]) |
3215
|
160 |
869
|
161 ### See which C++ compiler to use (we expect to find g++). |
|
162 |
1334
|
163 EXTERN_CXXFLAGS="$CXXFLAGS" |
|
164 |
405
|
165 AC_PROG_CXX |
|
166 AC_PROG_CXXCPP |
869
|
167 |
|
168 ### Do special things for g++. |
|
169 |
2353
|
170 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | \ |
3107
|
171 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
|
172 |
4191
|
173 ### Auto instantiate all templates, other than those that are explicitly |
|
174 ### instantiated in Octave. Octave currently instantiates all needed |
|
175 ### templates for GCC-2.8.x and EGCS-1.1.x, but not for newer GNU releases |
|
176 ### nor for other supported compilers. |
|
177 |
3775
|
178 cxx_auto_instantiate_templates=yes |
405
|
179 case "$gxx_version" in |
3887
|
180 1.* | 2.[[0123456]].* | 2.7.[01]*) |
3107
|
181 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) |
|
182 ;; |
3887
|
183 2.8* | 2.9[[1-6]]*) |
3775
|
184 cxx_auto_instantiate_templates=no |
|
185 ;; |
405
|
186 esac |
869
|
187 |
1894
|
188 CXX_VERSION= |
|
189 if test -n "$gxx_version"; then |
|
190 CXX_VERSION="$gxx_version" |
|
191 fi |
|
192 AC_SUBST(CXX_VERSION) |
|
193 |
3107
|
194 OCTAVE_CXX_NEW_FRIEND_TEMPLATE_DECL |
3769
|
195 OCTAVE_CXX_ISO_COMPLIANT_LIBRARY |
3107
|
196 |
3842
|
197 # Determine the ABI used the C++ compiler, needed by the dynamic loading |
|
198 # code. Currently supported ABIs are GNU v2, GNU v3 and Sun Workshop. |
|
199 |
|
200 OCTAVE_CXX_ABI |
|
201 |
869
|
202 ### See which C compiler to use (we expect to find gcc). |
|
203 |
1334
|
204 EXTERN_CFLAGS="$CFLAGS" |
|
205 |
5
|
206 AC_PROG_CC |
405
|
207 AC_PROG_CPP |
832
|
208 AC_PROG_GCC_TRADITIONAL |
869
|
209 |
|
210 ### Do special things for gcc. |
|
211 |
2353
|
212 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | \ |
3107
|
213 sed -e 's/^.*g.. version *//' -e 's/cygnus-//' -e 's/egcs-//'` |
405
|
214 case "$gcc_version" in |
|
215 2.*) |
1087
|
216 if test -z "$LDFLAGS"; then |
|
217 LDFLAGS="-g" |
|
218 AC_MSG_RESULT([defining LDFLAGS to be $LDFLAGS]) |
|
219 fi |
405
|
220 ;; |
|
221 1.*) |
3105
|
222 warn_gcc_version="gcc version $gcc_version is likely to cause problems" |
|
223 AC_MSG_WARN($warn_gcc_version) |
405
|
224 ;; |
5
|
225 esac |
869
|
226 |
1894
|
227 CC_VERSION= |
|
228 if test -n "$gcc_version"; then |
|
229 CC_VERSION="$gcc_version" |
|
230 fi |
|
231 AC_SUBST(CC_VERSION) |
|
232 |
3775
|
233 ### The flag to create dependency varies depending on the compier. |
|
234 |
|
235 # Assume GCC. |
|
236 DEPEND_FLAGS="-M" |
|
237 DEPEND_EXTRA_SED_PATTERN="" |
|
238 case "$canonical_host_type" in |
|
239 sparc-sun-solaris2* | i386-pc-solaris2*) |
3820
|
240 if test "$GCC" = yes; then |
3775
|
241 true |
|
242 else |
|
243 DEPEND_FLAGS="-xM1" |
|
244 DEPEND_EXTRA_SED_PATTERN="-e '/\/opt\/SUNWspro/d'" |
|
245 fi |
|
246 ;; |
|
247 esac |
|
248 AC_SUBST(DEPEND_FLAGS) |
|
249 AC_SUBST(DEPEND_EXTRA_SED_PATTERN) |
|
250 |
3065
|
251 ### On Intel systems with gcc, we may need to compile with -mieee-fp to |
2558
|
252 ### get full support for IEEE floating point. |
2020
|
253 ### |
3126
|
254 ### On Alpha/OSF systems, we need -mieee. |
869
|
255 |
3126
|
256 ieee_fp_flag= |
350
|
257 case "$canonical_host_type" in |
3887
|
258 i[[3456789]]86-*-*) |
3126
|
259 OCTAVE_CC_FLAG(-mieee-fp, [ |
|
260 ieee_fp_flag=-mieee-fp |
3131
|
261 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" |
|
262 AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])]) |
3126
|
263 |
|
264 OCTAVE_CXX_FLAG(-mieee-fp, [ |
|
265 ieee_fp_flag=-mieee-fp |
3131
|
266 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" |
|
267 AC_MSG_RESULT([adding -mieee-fp to XTRA_CXXFLAGS])]) |
324
|
268 ;; |
3127
|
269 alpha*-*-*) |
3160
|
270 OCTAVE_CC_FLAG(-mieee-with-inexact, [ |
|
271 ieee_fp_flag=-mieee-with-inexact |
|
272 XTRA_CFLAGS="$XTRA_CFLAGS -mieee-with-inexact" |
|
273 AC_MSG_RESULT([adding -mieee-with-inexact to XTRA_CFLAGS])]) |
3131
|
274 |
3160
|
275 OCTAVE_CXX_FLAG(-mieee-with-inexact, [ |
|
276 ieee_fp_flag=-mieee-with-inexact |
|
277 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-with-inexact" |
|
278 AC_MSG_RESULT([adding -mieee-with-inexact to XTRA_CXXFLAGS])]) |
2020
|
279 ;; |
3176
|
280 *ibm-aix4*) |
3351
|
281 OCTAVE_CC_FLAG(-mminimal-toc, [ |
|
282 XTRA_CFLAGS="$XTRA_CFLAGS -mminimal-toc"]) |
3176
|
283 |
3351
|
284 OCTAVE_CXX_FLAG(-mminimal-toc, [ |
|
285 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mminimal-toc"]) |
3176
|
286 ;; |
324
|
287 esac |
3126
|
288 |
3775
|
289 ### We do our own template instantiation for specific compilers. |
3126
|
290 |
3820
|
291 if test "$cxx_auto_instantiate_templates" = no; then |
3956
|
292 case "$canonical_host_type" in |
|
293 *-*-darwin*) |
|
294 OCTAVE_CXX_FLAG(-fno-coalesce-templates, [ |
|
295 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-coalesce-templates" |
|
296 AC_MSG_RESULT([adding -fno-coalesce-templates to XTRA_CXXFLAGS])]) |
|
297 ;; |
|
298 esac |
3775
|
299 OCTAVE_CXX_FLAG(-fno-implicit-templates, [ |
|
300 XTRA_CXXFLAGS="$XTRA_CXXFLAGS -fno-implicit-templates" |
|
301 AC_MSG_RESULT([adding -fno-implicit-templates to XTRA_CXXFLAGS])]) |
|
302 fi |
3126
|
303 |
|
304 AC_SUBST(XTRA_CFLAGS) |
|
305 AC_SUBST(XTRA_CXXFLAGS) |
869
|
306 |
1667
|
307 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
|
308 |
|
309 case "$canonical_host_type" in |
3127
|
310 alpha*-dec-osf1.3) |
1667
|
311 LD_STATIC_FLAG=-static |
|
312 ;; |
|
313 esac |
1679
|
314 if test -n "$LD_STATIC_FLAG"; then |
|
315 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) |
|
316 fi |
|
317 AC_SUBST(LD_STATIC_FLAG) |
1667
|
318 |
3222
|
319 OCTAVE_CXX_PREPENDS_UNDERSCORE |
4094
|
320 |
|
321 ### Defaults for cross compiling. BUILD_CC and BUILD_CXX are |
|
322 ### the compilers that we use for building tools on the build system. |
4098
|
323 ### For now, we assume that the only cross compiling we can do is |
|
324 ### with gcc on a Unixy system. |
4094
|
325 |
|
326 if test "$cross_compiling" = yes; then |
|
327 BUILD_CC="gcc" |
|
328 BUILD_CFLAGS="-O2 -g" |
|
329 BUILD_CXX="g++" |
|
330 BUILD_CXXFLAGS="-O2 -g" |
4098
|
331 BUILD_EXEEXT="" |
4094
|
332 else |
|
333 BUILD_CC=$CC |
|
334 BUILD_CFLAGS="-O2 -g" |
|
335 BUILD_CXX="g++" |
|
336 BUILD_CXXFLAGS="-O2 -g" |
4098
|
337 BUILD_EXEEXT="$EXEEXT" |
4094
|
338 fi |
|
339 |
|
340 AC_ARG_VAR(BUILD_CC, [build system C compiler (used if cross compiling)]) |
|
341 AC_ARG_VAR(BUILD_CFLAGS, [build system C compiler flags (used if cross compiling)]) |
|
342 AC_ARG_VAR(BUILD_CXX, [build system C++ compiler (used if cross compiling)]) |
|
343 AC_ARG_VAR(BUILD_CXXFLAGS, [build system C++ compiler flags (used if cross compiling)]) |
4098
|
344 AC_SUBST(BUILD_EXEEXT) |
3222
|
345 |
3232
|
346 dnl This is bogus. We shouldn't have to explicitly add libc too! |
|
347 |
|
348 ### Look for math library. If found, this will add -lm to LIBS. |
|
349 |
|
350 case "$canonical_host_type" in |
|
351 *-*-nextstep*) |
|
352 ;; |
|
353 *-*-linux*) |
|
354 AC_CHECK_LIB(m, sin, , , -lc) |
|
355 ;; |
|
356 *) |
|
357 AC_CHECK_LIB(m, sin) |
|
358 ;; |
|
359 esac |
|
360 |
3820
|
361 ### Check for HDF5 library. |
|
362 |
|
363 ### XXX FIXME XXX -- how can user specify a set of libraries here? |
|
364 |
|
365 WITH_HDF5=true |
|
366 AC_ARG_WITH(hdf5, |
|
367 [ --without-hdf5 don't use HDF5], |
|
368 with_hdf5=$withval, with_hdf5=yes) |
|
369 |
|
370 hdf5_lib= |
|
371 if test "$with_hdf5" = yes; then |
|
372 hdf5_lib="hdf5" |
|
373 elif test "$with_hdf5" != no; then |
|
374 hdf5_lib="$with_hdf5" |
3687
|
375 fi |
|
376 |
3820
|
377 HDF5_LIBS= |
|
378 WITH_HDF5=false |
|
379 if test -n "$hdf5_lib"; then |
|
380 AC_CHECK_LIB($hdf5_lib, H5Pcreate, [ |
|
381 AC_CHECK_LIB(z, deflate, [ |
|
382 AC_CHECK_HEADERS(hdf5.h, [ |
|
383 WITH_HDF5=true |
|
384 HDF5_LIBS="-l$hdf5_lib -lz" |
|
385 LIBS="$HDF5_LIBS $LIBS" |
3892
|
386 AC_DEFINE(HAVE_HDF5, 1, [Define if HDF5 is available.])])])]) |
3820
|
387 fi |
3687
|
388 |
3827
|
389 # Checks for FFTW header and library. |
|
390 |
|
391 # subdirectories of libcruft to build if they aren't found on the system: |
|
392 FFT_DIR="fftpack" |
|
393 AC_SUBST(FFT_DIR) |
|
394 |
|
395 # Installed fftw library, if any. |
|
396 FFTW_LIBS='' |
|
397 AC_SUBST(FFTW_LIBS) |
|
398 |
|
399 AC_ARG_WITH(fftw, |
3886
|
400 [ --without-fftw use included fftpack instead of installed fftw], |
|
401 with_fftw=$withval, with_fftw=yes) |
3827
|
402 |
|
403 if test "$with_fftw" = "yes"; then |
3887
|
404 have_fftw_header=no |
|
405 AC_CHECK_HEADERS(dfftw.h fftw.h, [have_fftw_header=yes; break]) |
|
406 if test "$have_fftw_header" = yes; then |
3827
|
407 AC_CHECK_LIB(dfftw, fftw_create_plan, FFTW_LIBS="-ldfftw", |
|
408 [AC_CHECK_LIB(fftw, fftw_create_plan, FFTW_LIBS="-lfftw", with_fftw=no)]) |
|
409 else |
|
410 with_fftw=no |
|
411 fi |
|
412 fi |
|
413 |
|
414 if test "$with_fftw" = yes; then |
|
415 FFT_DIR='' |
3892
|
416 AC_DEFINE(HAVE_FFTW, 1, [Define if the FFTW library is available.]) |
3827
|
417 fi |
|
418 |
|
419 # ---------------------------------------------------------------------- |
|
420 |
3012
|
421 ### We need these before trying to find libf2c. |
|
422 |
3130
|
423 OCTAVE_PROG_AR |
3012
|
424 |
|
425 AC_PROG_RANLIB |
|
426 |
2813
|
427 ### If we haven't been forced to use a particular Fortran compiler, |
|
428 ### try to find one using any one of several common Un*x Fortran |
3887
|
429 ### compiler names using the AC_PROG_F77 macro. |
1239
|
430 ### |
2813
|
431 ### The configure options --with-f77, --with-g77, or --with-f2c |
|
432 ### force f77, g77 or f2c to be used. It is also possible to use |
|
433 ### these options to specify the name of the compiler. For example, |
|
434 ### `--with-g77=/opt/gnu/bin/f77' says that we are using g77 but it is |
|
435 ### installed as /opt/gnu/bin/f77. |
1233
|
436 |
2813
|
437 if $use_f77; then |
3008
|
438 if test "$with_f77" = yes; then |
2813
|
439 F77=f77 |
|
440 else |
|
441 F77="$with_f77" |
|
442 fi |
|
443 AC_MSG_RESULT([defining F77 to be $F77]) |
|
444 elif $use_g77; then |
2336
|
445 if test "$with_g77" = yes; then |
1239
|
446 F77=g77 |
|
447 else |
|
448 F77="$with_g77" |
|
449 fi |
|
450 AC_MSG_RESULT([defining F77 to be $F77]) |
1233
|
451 elif $use_f2c; then |
|
452 F77= |
2336
|
453 if test "$with_f2c" = yes; then |
1317
|
454 F2C=f2c |
1239
|
455 else |
|
456 F2C="$with_f2c" |
|
457 fi |
|
458 AC_MSG_RESULT([defining F2C to be $F2C]) |
1233
|
459 fi |
5
|
460 |
3887
|
461 if test "x$FFLAGS" = x; then |
|
462 FFLAGS="-O" # override -g -O default by AC_PROG_F77 |
|
463 fi |
|
464 |
|
465 # the F77 variable, if set, overrides AC_PROG_F77 automatically |
|
466 AC_PROG_F77 |
|
467 |
1239
|
468 have_fortran_compiler=false |
|
469 have_f2c=false |
5
|
470 |
2813
|
471 if $use_f2c; then |
1239
|
472 have_f2c=true |
|
473 else |
|
474 if test -n "$F77"; then |
3887
|
475 AC_F77_LIBRARY_LDFLAGS |
|
476 AC_F77_DUMMY_MAIN |
|
477 AC_F77_WRAPPERS |
|
478 case "$canonical_host_type" in |
|
479 alpha*-*-*) |
|
480 if test "$ac_cv_f77_compiler_gnu" = yes; then |
|
481 FFLAGS="$ieee_fp_flag $FFLAGS" |
|
482 else |
|
483 FFLAGS="-fpe1 $FFLAGS" |
|
484 fi |
|
485 ;; |
|
486 powerpc-apple-machten*) |
|
487 FFLAGS= |
|
488 ;; |
|
489 esac |
|
490 if test -n "$FFLAGS"; then |
|
491 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) |
1239
|
492 fi |
|
493 have_fortran_compiler=true |
1233
|
494 else |
1239
|
495 AC_CHECK_PROG(F2C, f2c, f2c, []) |
3897
|
496 AC_ARG_VAR(F2C, [Fortran to C translator command]) |
|
497 AC_ARG_VAR(F2CFLAGS, [Fortran to C translator flags]) |
1239
|
498 if test -n "$F2C"; then |
|
499 have_f2c=true |
5
|
500 fi |
|
501 fi |
|
502 fi |
869
|
503 |
2762
|
504 f77_rules_frag=/dev/null |
1239
|
505 if $have_fortran_compiler; then |
2762
|
506 f77_rules_frag=Makefrag.f77 |
1679
|
507 cat << \EOF > $f77_rules_frag |
1668
|
508 |
1753
|
509 %.c : %.f |
1668
|
510 |
1791
|
511 %.o : %.f |
3615
|
512 $(FC) -c $(ALL_FFLAGS) -o $@ $< |
1668
|
513 |
1984
|
514 pic/%.o : %.f |
|
515 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ |
|
516 |
1668
|
517 EOF |
1239
|
518 elif $have_f2c; then |
3887
|
519 AC_DEFINE(HAVE_F2C, 1, [Define if we are using f2c.]) |
2562
|
520 |
|
521 ### XXX FIMXE XXX -- these shouldn't be fixed names, eh? |
|
522 |
|
523 oct_conflib=libconflib.a |
|
524 oct_obj_ext=o |
|
525 |
|
526 if AC_TRY_EVAL(ac_compile); then |
3887
|
527 $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AS_MESSAGE_LOG_FD() |
2562
|
528 if test -n "$RANLIB"; then |
3887
|
529 $RANLIB $oct_conflib 1>&AS_MESSAGE_LOG_FD() |
5
|
530 fi |
|
531 fi |
2562
|
532 rm -f conftest* |
3232
|
533 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib]) |
2562
|
534 rm -f $oct_conflib |
|
535 |
|
536 if test -z "$FLIBS"; then |
3232
|
537 AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=) |
2562
|
538 if test -n "$FLIBS"; then |
|
539 AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77) |
|
540 fi |
|
541 fi |
|
542 |
1462
|
543 if test -z "$FLIBS"; then |
3105
|
544 warn_f2c_no_lib="I found f2c but not libf2c.a, or libF77.a and libI77.a" |
|
545 AC_MSG_WARN($warn_f2c_no_lib) |
5
|
546 fi |
2633
|
547 f77_rules_frag=Makefrag.f77 |
1679
|
548 cat << \EOF > $f77_rules_frag |
1668
|
549 |
1824
|
550 %.c : %.f |
3847
|
551 $(F2C) $(F2CFLAGS) < $< > $(@F) |
1668
|
552 |
1753
|
553 %.o : %.f |
1668
|
554 |
|
555 EOF |
5
|
556 else |
832
|
557 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
|
558 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) |
1664
|
559 AC_MSG_ERROR([See the file INSTALL for more information.]) |
5
|
560 fi |
869
|
561 |
1163
|
562 FC=$F77 |
|
563 AC_SUBST(FC) |
1679
|
564 AC_SUBST_FILE(f77_rules_frag) |
869
|
565 |
3820
|
566 ### Checks for BLAS and LAPACK libraries: |
3887
|
567 # (Build subdirectories of libcruft if they aren't found on the system.) |
3820
|
568 |
3887
|
569 sinclude(acx_blas.m4) |
|
570 sinclude(acx_lapack.m4) |
|
571 ACX_BLAS([], [BLAS_DIR="blas"]) |
|
572 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) |
3690
|
573 AC_SUBST(BLAS_DIR) |
|
574 AC_SUBST(LAPACK_DIR) |
|
575 |
4110
|
576 ### Handle shared library options. |
2813
|
577 |
3034
|
578 ### Enable creation of static libraries. |
|
579 |
|
580 AC_ARG_ENABLE(static, |
|
581 [ --enable-static create static libraries], |
|
582 [if test "$enableval" = no; then STATIC_LIBS=false; |
|
583 else STATIC_LIBS=true; fi], |
|
584 STATIC_LIBS=true) |
|
585 AC_SUBST(STATIC_LIBS) |
|
586 |
2813
|
587 ### Enable creation of shared libraries. Currently only works with |
|
588 ### gcc on some systems. |
|
589 |
|
590 AC_ARG_ENABLE(shared, |
|
591 [ --enable-shared create shared libraries (not all systems)], |
|
592 [if test "$enableval" = no; then SHARED_LIBS=false; |
|
593 else SHARED_LIBS=true; fi], |
|
594 SHARED_LIBS=false) |
|
595 AC_SUBST(SHARED_LIBS) |
|
596 |
4128
|
597 ### Enable dynamic linking. --enable-shared implies this, so |
|
598 ### --enable-dl is only need if you are only building static libraries |
|
599 ### and want to try dynamic linking too (works on some systems, for |
|
600 ### example, OS X and Windows). |
|
601 |
|
602 AC_ARG_ENABLE(dl, |
|
603 [ --enable-dl create shared libraries (not all systems)], |
|
604 [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; |
|
605 else ENABLE_DYNAMIC_LINKING=true; fi], |
|
606 ENABLE_DYNAMIC_LINKING=false) |
|
607 |
3034
|
608 if $STATIC_LIBS || $SHARED_LIBS; then |
|
609 true |
|
610 else |
|
611 AC_MSG_ERROR([You can't disable building static AND shared libraries!]) |
|
612 fi |
|
613 |
2813
|
614 use_rpath=true |
|
615 AC_ARG_ENABLE(rpath, |
|
616 [ --enable-rpath add -rpath to link command for shared libraries], |
|
617 [if test "$enableval" = no; then use_rpath=false; fi], []) |
|
618 |
|
619 DLFCN_DIR= |
|
620 CPICFLAG=-fPIC |
|
621 CXXPICFLAG=-fPIC |
|
622 FPICFLAG=-fPIC |
|
623 SHLEXT=so |
4190
|
624 SHLLIB='$(SHLEXT)' |
4102
|
625 SHLBIN= |
4138
|
626 SHLEXT_VER='$(SHLEXT).$(version)' |
|
627 SHLLIB_VER='$(SHLLIB).$(version)' |
|
628 SHLBIN_VER='$(SHLBIN).$(version)' |
4126
|
629 SHLLINKEXT= |
3124
|
630 SH_LD="$CXX" |
2813
|
631 SH_LDFLAGS=-shared |
4199
|
632 MKOCTFILE_SH_LDFLAGS='$(SH_LDFLAGS)' |
3036
|
633 SONAME_FLAGS= |
2813
|
634 RLD_FLAG= |
4199
|
635 NO_OCT_FILE_STRIP=false |
4102
|
636 INCLUDE_LINK_DEPS=false |
3775
|
637 TEMPLATE_AR="$AR" |
|
638 TEMPLATE_ARFLAGS="$ARFLAGS" |
4104
|
639 library_path_var=LD_LIBRARY_PATH |
2813
|
640 case "$canonical_host_type" in |
|
641 *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) |
|
642 SH_LD=ld |
|
643 SH_LDFLAGS=-Bshareable |
|
644 ;; |
3127
|
645 alpha*-dec-osf*) |
2813
|
646 CPICFLAG= |
|
647 CXXPICFLAG= |
|
648 FPICFLAG= |
|
649 SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'" |
3162
|
650 RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' |
2813
|
651 ;; |
3956
|
652 *-*-darwin*) |
4162
|
653 SH_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave' |
4201
|
654 MKOCTFILE_SH_LDFLAGS='-bundle -bundle_loader $(bindir)/octave-$(version)$(EXEEXT)' |
4157
|
655 CXXPICFLAG= |
|
656 CPICFLAG= |
|
657 FPICFLAG= |
|
658 INCLUDE_LINK_DEPS=true |
4199
|
659 NO_OCT_FILE_STRIP=true |
3956
|
660 ;; |
4105
|
661 *-*-cygwin* | *-*-mingw*) |
4102
|
662 CXXPICFLAG= |
|
663 CPICFLAG= |
|
664 FPICFLAG= |
|
665 SHLEXT=dll |
|
666 SHLLIB=dll.a |
|
667 SHLBIN=dll |
4104
|
668 SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import" |
4102
|
669 SHLLINKEXT=.dll |
|
670 SONAME_FLAGS='-Wl,--out-implib=$@.a' |
|
671 INCLUDE_LINK_DEPS=true |
4104
|
672 library_path_var=PATH |
4102
|
673 ;; |
3740
|
674 *-*-linux* | *-*-gnu*) |
3038
|
675 SONAME_FLAGS='-Xlinker -soname -Xlinker $@' |
3162
|
676 RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' |
2813
|
677 ;; |
3887
|
678 i[[3456]]86-*-sco3.2v5*) |
3705
|
679 SONAME_FLAGS='-Xlinker -h -Xlinker $@' |
|
680 RLD_FLAG= |
3160
|
681 SH_LDFLAGS=-G |
|
682 ;; |
2813
|
683 rs6000-ibm-aix* | powerpc-ibm-aix*) |
|
684 CPICFLAG= |
|
685 CXXPICFLAG= |
|
686 FPICFLAG= |
|
687 DLFCN_DIR=dlfcn |
|
688 ;; |
|
689 hppa*-hp-hpux*) |
3887
|
690 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
691 FPICFLAG=-fPIC |
|
692 else |
|
693 FPICFLAG=+Z |
|
694 fi |
|
695 SHLEXT=sl |
|
696 SH_LDFLAGS="-shared -fPIC" |
3162
|
697 RLD_FLAG='-Xlinker +b -Xlinker $(octlibdir)' |
2813
|
698 ;; |
|
699 *-sgi-*) |
|
700 CPICFLAG= |
|
701 CXXPICFLAG= |
|
702 FPICFLAG= |
3162
|
703 RLD_FLAG='-L$(octlibdir)' |
2813
|
704 ;; |
|
705 sparc-sun-sunos4*) |
3887
|
706 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
707 FPICFLAG=-fPIC |
|
708 else |
|
709 FPICFLAG=-PIC |
|
710 fi |
3059
|
711 SH_LD=ld |
|
712 SH_LDFLAGS="-assert nodefinitions" |
3162
|
713 RLD_FLAG='-L$(octlibdir)' |
2813
|
714 ;; |
3606
|
715 sparc-sun-solaris2* | i386-pc-solaris2*) |
3887
|
716 if test "$ac_cv_f77_compiler_gnu" = yes; then |
2813
|
717 FPICFLAG=-fPIC |
|
718 else |
3775
|
719 FPICFLAG=-KPIC |
|
720 fi |
|
721 if test "$GCC" = yes; then |
|
722 CPICFLAG=-fPIC |
|
723 else |
|
724 CPICFLAG=-KPIC |
2813
|
725 fi |
3775
|
726 if test "$GXX" = yes; then |
|
727 CXXPICFLAG=-fPIC |
|
728 SH_LDFLAGS=-shared |
|
729 else |
|
730 CXXPICFLAG=-KPIC |
|
731 SH_LDFLAGS=-G |
|
732 fi |
|
733 RLD_FLAG='-R $(octlibdir)' |
|
734 # Template closures in archive libraries need a different mechanism. |
3820
|
735 if test "$GXX" = yes; then |
3775
|
736 true |
|
737 else |
|
738 TEMPLATE_AR="$CXX" |
|
739 TEMPLATE_ARFLAGS="-xar -o" |
|
740 fi |
2813
|
741 ;; |
|
742 esac |
|
743 |
|
744 if $use_rpath; then |
|
745 true |
|
746 else |
|
747 RLD_FLAG= |
|
748 fi |
|
749 |
|
750 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG]) |
|
751 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) |
|
752 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG]) |
|
753 AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) |
4126
|
754 AC_MSG_RESULT([defining SHLLIB to be $SHLLIB]) |
|
755 AC_MSG_RESULT([defining SHLBIN to be $SHLBIN]) |
|
756 AC_MSG_RESULT([defining SHLEXT_VER to be $SHLEXT_VER]) |
|
757 AC_MSG_RESULT([defining SHLLIB_VER to be $SHLLIB_VER]) |
|
758 AC_MSG_RESULT([defining SHLBIN_VER to be $SHLBIN_VER]) |
|
759 AC_MSG_RESULT([defining SHLLINKEXT to be $SHLLINKEXT]) |
2813
|
760 AC_MSG_RESULT([defining DLFCN_DIR to be $DLFCN_DIR]) |
|
761 AC_MSG_RESULT([defining SH_LD to be $SH_LD]) |
|
762 AC_MSG_RESULT([defining SH_LDFLAGS to be $SH_LDFLAGS]) |
4199
|
763 AC_MSG_RESULT([defining MKOCTFILE_SH_LDFLAGS to be $MKOCTFILE_SH_LDFLAGS]) |
3036
|
764 AC_MSG_RESULT([defining SONAME_FLAGS to be $SONAME_FLAGS]) |
4199
|
765 AC_MSG_RESULT([defining NO_OCT_FILE_STRIP to be $NO_OCT_FILE_STRIP]) |
2813
|
766 AC_MSG_RESULT([defining RLD_FLAG to be $RLD_FLAG]) |
3775
|
767 AC_MSG_RESULT([defining TEMPLATE_AR to be $TEMPLATE_AR]) |
|
768 AC_MSG_RESULT([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) |
4102
|
769 AC_MSG_RESULT([defining INCLUDE_LINK_DEPS to be $INCLUDE_LINK_DEPS]) |
4104
|
770 AC_MSG_RESULT([defining library_path_var to be $library_path_var]) |
2813
|
771 AC_SUBST(FPICFLAG) |
|
772 AC_SUBST(CPICFLAG) |
|
773 AC_SUBST(CXXPICFLAG) |
|
774 AC_SUBST(SHLEXT) |
4102
|
775 AC_SUBST(SHLLIB) |
|
776 AC_SUBST(SHLBIN) |
4126
|
777 AC_SUBST(SHLEXT_VER) |
|
778 AC_SUBST(SHLLIB_VER) |
|
779 AC_SUBST(SHLBIN_VER) |
|
780 AC_SUBST(SHLLINKEXT) |
2813
|
781 AC_SUBST(DLFCN_DIR) |
|
782 AC_SUBST(SH_LD) |
|
783 AC_SUBST(SH_LDFLAGS) |
4199
|
784 AC_SUBST(MKOCTFILE_SH_LDFLAGS) |
3036
|
785 AC_SUBST(SONAME_FLAGS) |
4199
|
786 AC_SUBST(NO_OCT_FILE_STRIP) |
2813
|
787 AC_SUBST(RLD_FLAG) |
3775
|
788 AC_SUBST(TEMPLATE_AR) |
|
789 AC_SUBST(TEMPLATE_ARFLAGS) |
4102
|
790 AC_SUBST(INCLUDE_LINK_DEPS) |
4104
|
791 AC_SUBST(library_path_var) |
4102
|
792 |
2813
|
793 ### special checks for odd OS specific things. |
|
794 ### |
|
795 ### I am told that on some SCO systems, the only place to find some |
|
796 ### functions like gethostname and gettimeofday is in libsocket. |
|
797 |
3887
|
798 AC_CHECK_FUNCS(gethostname, [], [AC_CHECK_LIB(socket, gethostname)]) |
|
799 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) |
2813
|
800 |
|
801 ### How big are ints and how are they oriented? These could probably |
|
802 ### be eliminated in favor of run-time checks. |
|
803 |
3888
|
804 AC_CHECK_SIZEOF(short) |
|
805 AC_CHECK_SIZEOF(int) |
|
806 AC_CHECK_SIZEOF(long) |
|
807 AC_CHECK_SIZEOF(long long) |
2813
|
808 |
|
809 ### Does the C compiler handle alloca() and const correctly? |
|
810 |
3887
|
811 AC_FUNC_ALLOCA([]) |
2813
|
812 AC_C_CONST |
|
813 |
|
814 ### See if we should define NPOS. |
|
815 |
|
816 OCTAVE_STRING_NPOS |
|
817 |
869
|
818 ### Checks for header files. |
|
819 |
832
|
820 AC_HEADER_STDC |
|
821 AC_HEADER_DIRENT |
1377
|
822 AC_HEADER_TIME |
|
823 AC_HEADER_SYS_WAIT |
2097
|
824 |
4051
|
825 ### C headers |
|
826 |
4067
|
827 AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ |
4051
|
828 floatingpoint.h grp.h ieeefp.h limits.h memory.h nan.h \ |
|
829 ncurses.h poll.h pwd.h stdlib.h string.h sys/ioctl.h \ |
3308
|
830 sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ |
|
831 sys/time.h sys/times.h sys/types.h sys/utsname.h termcap.h \ |
3887
|
832 unistd.h varargs.h) |
|
833 |
4051
|
834 ### C++ headers |
|
835 |
|
836 AC_LANG_PUSH(C++) |
|
837 AC_CHECK_HEADERS(sstream) |
|
838 AC_LANG_POP(C++) |
|
839 |
3887
|
840 have_termios_h=no |
|
841 AC_CHECK_HEADERS($TERMIOS_H, have_termios_h=yes) |
|
842 AC_CHECK_HEADERS(termio.h, have_termio_h=yes, have_termio_h=no) |
|
843 AC_CHECK_HEADERS(sgtty.h, have_sgtty_h=yes, have_sgtty_h=no) |
|
844 AC_CHECK_HEADERS(glob.h, have_glob_h=yes, have_glob_h=no) |
|
845 AC_CHECK_HEADERS(fnmatch.h, have_fnmatch_h=yes, have_fnmatch_h=no) |
4067
|
846 AC_CHECK_HEADERS(conio.h, have_conio_h=yes, have_conio_h=no) |
3249
|
847 |
3225
|
848 ### I'm told that termios.h is broken on NeXT systems. |
|
849 |
|
850 case "$canonical_host_type" in |
|
851 *-*-nextstep*) |
3887
|
852 if test "$have_termios_h" = yes; then |
3249
|
853 AC_MSG_WARN([Ignoring termios.h on NeXT systems.]) |
3887
|
854 have_termios_h=no |
3249
|
855 fi |
3225
|
856 ;; |
|
857 esac |
|
858 |
3887
|
859 if test "$have_termios_h" = yes \ |
|
860 || test "$have_termio_h" = yes \ |
|
861 || test "$have_sgtty_h" = yes; then |
832
|
862 true |
|
863 else |
4064
|
864 AC_MSG_WARN([I couldn't find termios.h, termio.h, or sgtty.h!]) |
832
|
865 fi |
869
|
866 |
3697
|
867 ## I'm told that setting LIBGLOB to be $(TOPDIR)/glob/libglob.a causes |
|
868 ## trouble on SCO systems, but setting it to be the two object files |
|
869 ## avoids the problem. |
3177
|
870 |
3156
|
871 GLOB_DIR=glob |
3697
|
872 LIBGLOB='$(TOPDIR)/glob/glob.o $(TOPDIR)/glob/fnmatch.o' |
3156
|
873 GLOB_INCFLAGS='-I$(top_srcdir)/glob -I$(TOPDIR)/glob' |
3887
|
874 if test "$have_fnmatch_h" = yes && test "$have_glob_h" = yes; then |
|
875 AC_EGREP_CPP(yes, [#include <fnmatch.h> |
|
876 #ifdef FNM_NOESCAPE |
|
877 #ifdef FNM_FOOBAR_PATHNAME /* FIXME: delete FOOBAR_ ? */ |
|
878 #ifdef FNM_PERIOD |
|
879 yes |
|
880 #endif |
|
881 #endif |
|
882 #endif |
3177
|
883 ], [ |
|
884 GLOB_DIR= |
|
885 AC_CHECK_LIB(glob, glob) |
3887
|
886 AC_CHECK_FUNCS(fnmatch, have_fnmatch=yes, have_fnmatch=no) |
|
887 AC_CHECK_FUNCS(glob, have_glob=yes, have_glob=no) |
|
888 if test "$have_fnmatch" = yes && test "$have_glob" = yes; then |
3177
|
889 GLOB_DIR= |
|
890 LIBGLOB= |
|
891 GLOB_INCFLAGS= |
|
892 fi |
|
893 ]) |
3156
|
894 fi |
|
895 AC_SUBST(GLOB_DIR) |
|
896 AC_SUBST(LIBGLOB) |
|
897 AC_SUBST(GLOB_INCFLAGS) |
|
898 |
1788
|
899 ### Checks for functions and variables. |
869
|
900 |
3710
|
901 AC_CHECK_FUNCS(atexit bcopy bzero dup2 endgrent endpwent execvp \ |
|
902 fcntl fork getcwd getegid geteuid getgid getgrent getgrgid \ |
3803
|
903 getgrnam getpgrp getpid getppid getpwent \ |
4092
|
904 getpwuid gettimeofday getuid getwd _kbhit kill link localtime_r lstat \ |
|
905 memmove mkdir mkfifo on_exit pipe poll putenv raise readlink rename \ |
4180
|
906 rindex rmdir select setgrent setpwent setvbuf sigaction siglongjmp \ |
|
907 sigpending sigprocmask sigsuspend stat strcasecmp strdup \ |
|
908 strerror strftime stricmp strncasecmp strnicmp strptime symlink \ |
|
909 tempnam umask unlink usleep vfprintf vsprintf vsnprintf waitpid) |
1300
|
910 |
1708
|
911 OCTAVE_SMART_PUTENV |
|
912 |
4110
|
913 ### Dynamic linking is now enabled only if we are building shared |
|
914 ### libs and some API for dynamic linking is detected. |
|
915 |
3705
|
916 LD_CXX='$(CXX)' |
2064
|
917 LIBDLFCN= |
|
918 DLFCN_INCFLAGS= |
3232
|
919 RDYNAMIC_FLAG= |
4110
|
920 DL_API_MSG="" |
|
921 dlopen_api=false |
|
922 shl_load_api=false |
|
923 loadlibrary_api=false |
4163
|
924 dyld_api=false |
4110
|
925 |
4163
|
926 if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then |
|
927 |
|
928 ### Check for dyld first since OS X can have a non-standard libdl |
4110
|
929 |
4163
|
930 AC_CHECK_HEADER(Mach-O/dyld.h) |
4201
|
931 if test "$ac_cv_header_Mach_O_dyld_h" = yes; then |
4163
|
932 dyld_api=true |
|
933 else |
4189
|
934 AC_CHECK_LIB(dld, shl_load) |
|
935 AC_CHECK_FUNCS(shl_load shl_findsym) |
4201
|
936 if test "$ac_cv_func_shl_load" = yes \ |
|
937 && test "$ac_cv_func_shl_findsym" = yes; then |
4189
|
938 shl_load_api=true |
4110
|
939 else |
4189
|
940 AC_CHECK_LIB(wsock32, LoadLibrary) |
|
941 AC_CHECK_FUNCS(LoadLibrary) |
4201
|
942 if test "$ac_cv_func_loadlibrary" = yes; then |
4189
|
943 loadlibrary_api=true |
2063
|
944 else |
4189
|
945 AC_CHECK_LIB(dl, dlopen) |
|
946 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) |
4201
|
947 if test "$ac_cv_func_dlclose" = yes \ |
|
948 && test "$ac_cv_func_dlerror" = yes \ |
|
949 && test "$ac_cv_func_dlopen" = yes \ |
|
950 && test "$ac_cv_func_dlsym" = yes; then |
4189
|
951 dlopen_api=true |
|
952 else |
4163
|
953 case "$canonical_host_type" in |
|
954 rs6000-ibm-aix* | powerpc-ibm-aix*) |
|
955 LIBDLFCN="-ldlfcn -ll -lld" |
|
956 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' |
|
957 dlopen_api=true |
|
958 ;; |
|
959 i[[3456]]86-*-sco3.2v5*) |
|
960 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' |
|
961 dlopen_api=true |
|
962 ;; |
|
963 esac |
|
964 fi |
2063
|
965 fi |
4110
|
966 fi |
|
967 fi |
|
968 |
|
969 if $dlopen_api; then |
|
970 DL_API_MSG="(dlopen)" |
|
971 AC_DEFINE(HAVE_DLOPEN_API, 1, [Define if your system has dlopen, dlsym, dlerror, and dlclose for dynamic linking]) |
3958
|
972 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) |
4110
|
973 elif $shl_load_api; then |
|
974 DL_API_MSG="(shl_load)" |
|
975 AC_DEFINE(HAVE_SHL_LOAD_API, 1, [Define if your system has shl_load and shl_findsym for dynamic linking]) |
|
976 elif $loadlibrary_api; then |
|
977 DL_API_MSG="(LoadLibrary)" |
|
978 AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) |
4163
|
979 elif $dyld_api; then |
|
980 DL_API_MSG="(dyld)" |
|
981 AC_DEFINE(HAVE_DYLD_API, 1, [Define if your system has dyld for dynamic linking]) |
4110
|
982 fi |
|
983 |
4163
|
984 if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then |
4128
|
985 ENABLE_DYNAMIC_LINKING=true |
|
986 AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) |
1978
|
987 fi |
4163
|
988 fi |
|
989 |
|
990 if $SHARED_LIBS; then |
|
991 LIBOCTINTERP=-loctinterp$SHLLINKEXT |
|
992 LIBOCTAVE=-loctave$SHLLINKEXT |
|
993 LIBCRUFT=-lcruft$SHLLINKEXT |
1978
|
994 else |
4110
|
995 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' |
|
996 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' |
|
997 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' |
1664
|
998 fi |
4163
|
999 |
4110
|
1000 AC_SUBST(LD_CXX) |
2064
|
1001 AC_SUBST(LIBDLFCN) |
|
1002 AC_SUBST(DLFCN_INCFLAGS) |
3232
|
1003 AC_SUBST(RDYNAMIC_FLAG) |
4128
|
1004 AC_SUBST(ENABLE_DYNAMIC_LINKING) |
4110
|
1005 AC_SUBST(LIBOCTINTERP) |
|
1006 AC_SUBST(LIBOCTAVE) |
|
1007 AC_SUBST(LIBCRUFT) |
1901
|
1008 |
1300
|
1009 ### There is more than one possible prototype for gettimeofday. See |
2782
|
1010 ### which one (if any) appears in sys/time.h. These tests are from |
|
1011 ### Emacs 19. |
1300
|
1012 |
2782
|
1013 AC_MSG_CHECKING(for struct timeval) |
|
1014 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME |
|
1015 #include <sys/time.h> |
|
1016 #include <time.h> |
|
1017 #else |
|
1018 #ifdef HAVE_SYS_TIME_H |
|
1019 #include <sys/time.h> |
|
1020 #else |
|
1021 #include <time.h> |
|
1022 #endif |
|
1023 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], |
|
1024 [AC_MSG_RESULT(yes) |
|
1025 HAVE_TIMEVAL=yes |
3887
|
1026 AC_DEFINE(HAVE_TIMEVAL, 1, [Define if struct timeval is defined.])], |
2782
|
1027 [AC_MSG_RESULT(no) |
|
1028 HAVE_TIMEVAL=no]) |
|
1029 |
|
1030 if test "x$HAVE_TIMEVAL" = xyes; then |
|
1031 AC_MSG_CHECKING(whether gettimeofday can't accept two arguments) |
|
1032 AC_TRY_LINK([#ifdef TIME_WITH_SYS_TIME |
|
1033 #include <sys/time.h> |
|
1034 #include <time.h> |
|
1035 #else |
|
1036 #ifdef HAVE_SYS_TIME_H |
|
1037 #include <sys/time.h> |
|
1038 #else |
|
1039 #include <time.h> |
|
1040 #endif |
|
1041 #endif],[struct timeval time; struct timezone dummy; |
|
1042 gettimeofday (&time, &dummy);], [AC_MSG_RESULT(no)], |
|
1043 [AC_MSG_RESULT(yes) |
3887
|
1044 AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1, [Define if your system has a single-arg prototype for gettimeofday.])]) |
2782
|
1045 fi |
869
|
1046 |
832
|
1047 dnl Would like to get rid of this cruft, and just have |
|
1048 dnl |
|
1049 dnl AC_CHECK_FUNCS(finite isnan isinf) |
|
1050 dnl |
|
1051 dnl instead, but that used to fail on some systems... |
369
|
1052 dnl |
832
|
1053 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf |
|
1054 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that |
369
|
1055 dnl fails, we try again by including math.h and invoking the function |
|
1056 dnl with an argument. |
869
|
1057 |
2508
|
1058 ### I am told that Inf and NaN don't work on m68k HP sytems, and that |
|
1059 ### on SCO systems, isnan and isinf don't work, but they can be |
|
1060 ### replaced by something that does. |
956
|
1061 |
|
1062 case "$canonical_host_type" in |
1384
|
1063 m68k-hp-hpux*) |
956
|
1064 ;; |
2508
|
1065 *-*-sco*) |
|
1066 AC_MSG_RESULT([defining SCO to be 1]) |
3887
|
1067 AC_DEFINE(SCO, 1, [Define if using an SCO system.]) |
2508
|
1068 AC_MSG_RESULT([forcing HAVE_ISINF for SCO]) |
3887
|
1069 AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().]) |
2508
|
1070 AC_MSG_RESULT([forcing HAVE_ISNAN for SCO]) |
3887
|
1071 AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().]) |
2508
|
1072 ;; |
956
|
1073 *) |
3475
|
1074 AC_CHECK_FUNCS(finite isnan isinf) |
956
|
1075 ;; |
|
1076 esac |
|
1077 |
1076
|
1078 ### Check for nonstandard but common math functions that we need. |
|
1079 |
3130
|
1080 AC_CHECK_FUNCS(acosh asinh atanh erf erfc) |
|
1081 |
869
|
1082 ### Checks for OS specific cruft. |
|
1083 |
3887
|
1084 AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev]) |
|
1085 |
405
|
1086 AC_STRUCT_TM |
1186
|
1087 AC_STRUCT_TIMEZONE |
1388
|
1088 AC_FUNC_CLOSEDIR_VOID |
1225
|
1089 |
3892
|
1090 AC_CHECK_MEMBERS(struct group.gr_passwd) |
2548
|
1091 |
4067
|
1092 # mkdir takes a single argument on some systems. |
|
1093 OCTAVE_MKDIR_TAKES_ONE_ARG |
|
1094 |
3887
|
1095 octave_found_termlib=no |
2592
|
1096 for termlib in ncurses curses termcap terminfo termlib; do |
2034
|
1097 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
405
|
1098 case "${TERMLIBS}" in |
|
1099 *-l${termlib}*) |
3822
|
1100 LIBS="$TERMLIBS $LIBS" |
4102
|
1101 AC_SUBST(TERMLIBS) |
3887
|
1102 octave_found_termlib=yes |
405
|
1103 break |
|
1104 ;; |
|
1105 esac |
|
1106 done |
869
|
1107 |
3887
|
1108 if test "$octave_found_termlib" = no; then |
|
1109 warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, o\ |
|
1110 r -ltermlib!" |
3105
|
1111 AC_MSG_WARN($warn_termlibs) |
2488
|
1112 fi |
|
1113 |
3822
|
1114 OCTAVE_ENABLE_READLINE |
|
1115 |
832
|
1116 AC_MSG_CHECKING([for struct exception in math.h]) |
|
1117 AC_TRY_LINK([#include <math.h>], |
|
1118 [struct exception *x; x->type; x->name;], |
835
|
1119 AC_MSG_RESULT(yes) |
3887
|
1120 AC_DEFINE(EXCEPTION_IN_MATH, 1, [Define if your math.h declares struct exception for matherr().]), |
869
|
1121 AC_MSG_RESULT(no)) |
|
1122 |
|
1123 ### Signal stuff. |
|
1124 |
834
|
1125 AC_TYPE_SIGNAL |
4214
|
1126 AC_CHECK_DECL([sys_siglist], |
|
1127 [AC_DEFINE(SYS_SIGLIST_DECLARED, 1, [Define if your system has a declaration of sys_siglist.])], |
|
1128 [AC_CHECK_DECLS([sys_siglist])], [#include <signal.h>]) |
885
|
1129 AC_MSG_CHECKING([for sys_siglist variable]) |
|
1130 AC_TRY_LINK([#include <stdio.h>], |
|
1131 [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);], |
|
1132 AC_MSG_RESULT(yes) |
3887
|
1133 AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if your system has a sys_siglist variable.]), |
885
|
1134 AC_MSG_RESULT(no)) |
2470
|
1135 OCTAVE_SIGNAL_CHECK |
|
1136 OCTAVE_REINSTALL_SIGHANDLERS |
869
|
1137 |
1762
|
1138 ### Type stuff. |
|
1139 |
|
1140 AC_TYPE_MODE_T |
|
1141 AC_TYPE_OFF_T |
2097
|
1142 AC_TYPE_PID_T |
1762
|
1143 AC_TYPE_SIZE_T |
|
1144 AC_TYPE_UID_T |
3892
|
1145 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) |
4180
|
1146 AC_CHECK_TYPES([sigset_t, sig_atomic_t], , , [#include <signal.h>]) |
1762
|
1147 |
2633
|
1148 ### A system dependent kluge or two. |
|
1149 |
2035
|
1150 AC_CHECK_FUNCS(getrusage times) |
2427
|
1151 case "$canonical_host_type" in |
3971
|
1152 *-*-cygwin*) |
3887
|
1153 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) |
2427
|
1154 ;; |
|
1155 esac |
|
1156 |
2762
|
1157 bsd_gcc_kluge_targets_frag=/dev/null |
2633
|
1158 case "$canonical_host_type" in |
|
1159 *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) |
|
1160 bsd_gcc_kluge_targets_frag=Makefrag.bsd |
|
1161 cat << \EOF > $bsd_gcc_kluge_targets_frag |
|
1162 |
|
1163 lex.o: lex.cc |
|
1164 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1165 |
|
1166 pt-plot.o: pt-plot.cc |
|
1167 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1168 |
|
1169 symtab.o: symtab.cc |
|
1170 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1171 |
|
1172 toplev.o: toplev.cc |
|
1173 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1174 |
|
1175 unwind-prot.o: unwind-prot.cc |
|
1176 $(CXX) -c $(CPPFLAGS) $(CXXFLAGS_NO_PT_FLAGS) $< |
|
1177 |
|
1178 EOF |
|
1179 ;; |
|
1180 esac |
|
1181 AC_SUBST_FILE(bsd_gcc_kluge_targets_frag) |
|
1182 |
869
|
1183 ### Checks for other programs used for building, testing, installing, |
|
1184 ### and running Octave. |
|
1185 |
4084
|
1186 OCTAVE_PROG_SED |
|
1187 |
3729
|
1188 OCTAVE_PROG_FLEX |
|
1189 OCTAVE_PROG_BISON |
869
|
1190 |
1722
|
1191 AC_PROG_LN_S |
|
1192 |
3222
|
1193 OCTAVE_PROG_NM |
3130
|
1194 OCTAVE_PROG_RUNTEST |
869
|
1195 |
405
|
1196 AC_PROG_INSTALL |
2642
|
1197 INSTALL_SCRIPT='${INSTALL}' |
|
1198 AC_SUBST(INSTALL_SCRIPT) |
869
|
1199 |
3130
|
1200 OCTAVE_PROG_GNUPLOT |
|
1201 OCTAVE_PROG_PAGER |
3673
|
1202 OCTAVE_PROG_GPERF |
3130
|
1203 |
2032
|
1204 ### Even though we include config.h, we need to have the preprocessor |
|
1205 ### defines available in a variable for the octave-bug script. Use |
|
1206 ### UGLY_DEFS for that. |
|
1207 |
|
1208 AC_OUTPUT_MAKE_DEFS |
3956
|
1209 |
|
1210 |
|
1211 dnl Maybe this should really be conditional on "broken sed", or |
|
1212 dnl "broken shell backslash quoting" or somesuch. |
|
1213 dnl |
|
1214 case "$canonical_host_type" in |
|
1215 *-*-darwin*) |
|
1216 UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",g'` |
|
1217 ;; |
|
1218 *) |
|
1219 UGLY_DEFS=`echo $DEFS | sed 's,\\",\\\\\\\\\\\\\\\\\\",g'` |
|
1220 ;; |
|
1221 esac |
2032
|
1222 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) |
|
1223 AC_SUBST(UGLY_DEFS) |
|
1224 |
869
|
1225 ### Maybe add -Wall to compiler flags now that we're done feature |
|
1226 ### testing. |
|
1227 |
3131
|
1228 if test -z "$EXTERN_CFLAGS"; then |
|
1229 OCTAVE_CC_FLAG(-Wall) |
405
|
1230 fi |
3131
|
1231 |
|
1232 if test -z "$EXTERN_CXXFLAGS"; then |
|
1233 OCTAVE_CXX_FLAG(-Wall) |
405
|
1234 fi |
869
|
1235 |
2813
|
1236 ### Someday, maybe include -ansi and even -pedantic in this list... |
|
1237 |
|
1238 GCC_PICKY_FLAGS="-Wcast-align -Wcast-qual -Wid-clash-31 \ |
|
1239 -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ |
|
1240 -Wstrict-prototypes -Wwrite-strings" |
|
1241 |
3131
|
1242 GXX_PICKY_FLAGS="$GCC_PICKY_FLAGS -Weffc++ -Wenum-clash -fno-nonnull-objects" |
2813
|
1243 |
|
1244 AC_ARG_ENABLE(picky-flags, |
|
1245 [ --enable-picky-flags add picky options to CFLAGS, CXXFLAGS, FFLAGS], |
3131
|
1246 [if test "$enableval" = no; then |
|
1247 true |
2813
|
1248 elif test "$enableval" = yes; then |
3131
|
1249 if test -z "$EXTERN_CFLAGS"; then |
|
1250 for flag in $GCC_PICKY_FLAGS; do |
|
1251 OCTAVE_CC_FLAG($flag) |
|
1252 done |
2813
|
1253 fi |
3131
|
1254 if test -z "$EXTERN_CXXFLAGS"; then |
|
1255 for flag in $GXX_PICKY_FLAGS; do |
|
1256 OCTAVE_CXX_FLAG($flag) |
|
1257 done |
2813
|
1258 fi |
|
1259 fi], []) |
|
1260 |
1146
|
1261 ### Run configure in subdirectories. |
|
1262 |
1304
|
1263 export CC |
|
1264 export CXX |
|
1265 export F77 |
|
1266 |
3887
|
1267 AC_CONFIG_SUBDIRS(kpathsea scripts) |
|
1268 |
|
1269 # autoconf 2.50 deprecates the use of variables (e.g. $GLOB_DIR) |
|
1270 # in AC_CONFIG_SUBDIRS; the following form is recommended instead: |
|
1271 |
|
1272 if test "x$GLOB_DIR" = xglob; then |
|
1273 AC_CONFIG_SUBDIRS(glob) |
|
1274 fi |
|
1275 |
|
1276 if test "x$PLPLOT_DIR" = xplplot; then |
|
1277 AC_CONFIG_SUBDIRS(plplot) |
|
1278 fi |
1146
|
1279 |
3923
|
1280 ### Some things to add to the bottom of config.h. |
|
1281 |
|
1282 AH_BOTTOM([ |
|
1283 #if defined (__GNUC__) |
|
1284 #define GCC_ATTR_NORETURN __attribute__ ((__noreturn__)) |
|
1285 #define GCC_ATTR_UNUSED __attribute__ ((__unused__)) |
|
1286 #else |
|
1287 #define GCC_ATTR_NORETURN |
|
1288 #define GCC_ATTR_UNUSED |
|
1289 #endif |
|
1290 |
|
1291 #define CONST_CAST(T, E) (T) (E) |
|
1292 |
|
1293 #define DYNAMIC_CAST(T, E) (T) (E) |
|
1294 |
|
1295 #define REINTERPRET_CAST(T, E) (T) (E) |
|
1296 |
|
1297 #define STATIC_CAST(T, E) (T) (E) |
|
1298 |
|
1299 #define X_CAST(T, E) (T) (E) |
|
1300 |
|
1301 #define HEAVYWEIGHT_INDEXING 1 |
|
1302 |
|
1303 #define WITH_KPATHSEARCH 1 |
|
1304 |
|
1305 #if defined(HAVE_F2C) && !defined(F77_FUNC) |
|
1306 # define F77_FUNC(x,X) x ## _ |
|
1307 # define F77_FUNC_(x,X) x ## __ |
|
1308 #endif |
|
1309 |
|
1310 #if !defined(HAVE_DEV_T) |
4064
|
1311 typedef short dev_t; |
3923
|
1312 #endif |
|
1313 |
|
1314 #if !defined(HAVE_INO_T) |
4064
|
1315 typedef unsigned long ino_t; |
3923
|
1316 #endif |
|
1317 |
|
1318 #if !defined(HAVE_NLINK_T) |
4064
|
1319 typedef short nlink_t; |
3923
|
1320 #endif |
|
1321 |
|
1322 #if !defined(HAVE_SIGSET_T) |
4064
|
1323 typedef int sigset_t; |
3923
|
1324 #endif |
4101
|
1325 |
4180
|
1326 #if !defined(HAVE_SIG_ATOMIC_T) |
|
1327 typedef int sig_atomic_t; |
|
1328 #endif |
|
1329 |
4101
|
1330 #define OCTAVE_HAVE_POSIX_FILESYSTEM 1 |
|
1331 |
|
1332 #if defined (__WIN32__) |
|
1333 #define OCTAVE_HAVE_WINDOWS_FILESYSTEM 1 |
|
1334 #if ! defined (__CYGWIN__) |
|
1335 #undef OCTAVE_HAVE_POSIX_FILESYSTEM |
|
1336 #endif |
|
1337 #endif |
|
1338 |
|
1339 /* Define if we expect to have <windows.h>, Sleep, etc. */ |
4102
|
1340 #if defined (__WIN32__) && ! defined (__CYGWIN__) |
4101
|
1341 #define OCTAVE_USE_WINDOWS_API 1 |
|
1342 #endif |
4153
|
1343 |
4180
|
1344 /* sigsetjmp is a macro, not a function. */ |
|
1345 #if defined (sigsetjmp) && defined (HAVE_SIGLONGJMP) |
|
1346 #define OCTAVE_HAVE_SIG_JUMP |
|
1347 #endif |
3923
|
1348 ]) |
|
1349 |
869
|
1350 ### Do the substitutions in all the Makefiles. |
|
1351 |
3887
|
1352 AC_CONFIG_FILES([Makefile octMakefile Makeconf install-octave \ |
3215
|
1353 test/Makefile dlfcn/Makefile \ |
|
1354 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \ |
|
1355 doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \ |
|
1356 examples/Makefile liboctave/Makefile src/Makefile \ |
|
1357 libcruft/Makefile libcruft/Makerules \ |
3220
|
1358 libcruft/amos/Makefile libcruft/blas/Makefile \ |
3989
|
1359 libcruft/daspk/Makefile libcruft/dasrt/Makefile \ |
3220
|
1360 libcruft/dassl/Makefile libcruft/fftpack/Makefile \ |
|
1361 libcruft/lapack/Makefile libcruft/linpack/Makefile \ |
|
1362 libcruft/minpack/Makefile libcruft/misc/Makefile \ |
3983
|
1363 libcruft/odepack/Makefile libcruft/odessa/Makefile \ |
|
1364 libcruft/ordered-qz/Makefile \ |
3220
|
1365 libcruft/quadpack/Makefile libcruft/ranlib/Makefile \ |
3215
|
1366 libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \ |
3690
|
1367 libcruft/villad/Makefile \ |
3887
|
1368 libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile]) |
|
1369 AC_OUTPUT |
1225
|
1370 |
3887
|
1371 AC_CONFIG_COMMANDS([default-1],[[chmod +x install-octave]],[[]]) |
3176
|
1372 |
1225
|
1373 ### Print a summary so that important information isn't missed. |
|
1374 |
|
1375 if test -z "$F77"; then |
|
1376 FORT="$F2C $F2CFLAGS" |
|
1377 else |
2610
|
1378 FORT="$F77 $FFLAGS" |
1225
|
1379 fi |
|
1380 |
|
1381 AC_MSG_RESULT([ |
|
1382 |
|
1383 Octave is now configured for $canonical_host_type |
|
1384 |
1664
|
1385 Source directory: $srcdir |
|
1386 Installation prefix: $prefix |
3126
|
1387 C compiler: $CC $XTRA_CFLAGS $CFLAGS |
|
1388 C++ compiler: $CXX $XTRA_CXXFLAGS $CXXFLAGS |
1664
|
1389 Fortran compiler: $FORT |
|
1390 Fortran libraries: $FLIBS |
3820
|
1391 BLAS libraries: $BLAS_LIBS |
3827
|
1392 FFTW libraries: $FFTW_LIBS |
3820
|
1393 HDF5 libraries: $HDF5_LIBS |
3822
|
1394 LIBS: $LIBS |
1664
|
1395 Default pager: $DEFAULT_PAGER |
|
1396 gnuplot: $GNUPLOT_BINARY |
|
1397 |
4110
|
1398 Do internal array bounds checking: $BOUNDS_CHECKING |
|
1399 Build static libraries: $STATIC_LIBS |
|
1400 Build shared libraries: $SHARED_LIBS |
4128
|
1401 Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG |
4110
|
1402 Include support for GNU readline: $USE_READLINE |
1225
|
1403 ]) |
3105
|
1404 |
|
1405 warn_msg_printed=false |
|
1406 |
|
1407 if test -n "$warn_f77_and_g77"; then |
|
1408 AC_MSG_WARN($warn_f77_and_g77) |
|
1409 warn_msg_printed=true |
|
1410 fi |
|
1411 |
|
1412 if test -n "$warn_f2c_and_f77"; then |
|
1413 AC_MSG_WARN($warn_f2c_and_f77) |
|
1414 warn_msg_printed=true |
|
1415 fi |
|
1416 |
|
1417 if test -n "$warn_f2c_and_g77"; then |
|
1418 AC_MSG_WARN($warn_f2c_and_g77) |
|
1419 warn_msg_printed=true |
|
1420 fi |
|
1421 |
|
1422 if test -n "$gxx_only"; then |
|
1423 AC_MSG_WARN($gxx_only) |
|
1424 warn_msg_printed=true |
|
1425 fi |
|
1426 |
|
1427 if test -n "$warn_gcc_version"; then |
|
1428 AC_MSG_WARN($warn_gcc_version) |
|
1429 warn_msg_printed=true |
|
1430 fi |
|
1431 |
|
1432 if test -n "$warn_gcc_only"; then |
|
1433 AC_MSG_WARN($warn_gcc_only) |
|
1434 warn_msg_printed=true |
|
1435 fi |
|
1436 |
|
1437 if test -n "$warn_f2c_no_lib"; then |
|
1438 AC_MSG_WARN($warn_f2c_no_lib) |
|
1439 warn_msg_printed=true |
|
1440 fi |
|
1441 |
3825
|
1442 if test -n "$warn_readline"; then |
|
1443 AC_MSG_WARN($warn_readline) |
|
1444 warn_msg_printed=true |
|
1445 fi |
|
1446 |
3105
|
1447 if test -n "$warn_termlibs"; then |
|
1448 AC_MSG_WARN($warn_termlibs) |
|
1449 warn_msg_printed=true |
|
1450 fi |
|
1451 |
3673
|
1452 if test -n "$warn_gperf"; then |
|
1453 AC_MSG_WARN($warn_gperf) |
|
1454 warn_msg_printed=true |
|
1455 fi |
|
1456 |
3105
|
1457 if test -n "$warn_flex"; then |
|
1458 AC_MSG_WARN($warn_flex) |
|
1459 warn_msg_printed=true |
|
1460 fi |
|
1461 |
|
1462 if test -n "$warn_bison"; then |
|
1463 AC_MSG_WARN($warn_bison) |
|
1464 warn_msg_printed=true |
|
1465 fi |
|
1466 |
|
1467 if test -n "$warn_less"; then |
|
1468 AC_MSG_WARN($warn_less) |
|
1469 warn_msg_printed=true |
|
1470 fi |
|
1471 |
|
1472 if test -n "$warn_runtest"; then |
|
1473 AC_MSG_WARN($warn_runtest) |
|
1474 warn_msg_printed=true |
|
1475 fi |
|
1476 |
|
1477 if test -n "$warn_gnuplot"; then |
|
1478 |
|
1479 ## If you change this text, be sure to also change the corresponding |
|
1480 ## set of warnings above. |
|
1481 |
|
1482 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
|
1483 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) |
|
1484 AC_MSG_WARN([plotting commands without it.]) |
|
1485 AC_MSG_WARN([]) |
|
1486 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) |
|
1487 AC_MSG_WARN([tell Octave where to find it by typing the command]) |
|
1488 AC_MSG_WARN([]) |
|
1489 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) |
|
1490 AC_MSG_WARN([]) |
|
1491 AC_MSG_WARN([at the Octave prompt.]) |
|
1492 warn_msg_printed=true |
|
1493 fi |
|
1494 |
|
1495 if $warn_msg_printed; then |
|
1496 AC_MSG_RESULT([]) |
|
1497 fi |
|
1498 |
|
1499 ### End of configure. |