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