405
|
1 dnl configure.in |
|
2 dnl |
5
|
3 dnl Process this file with autoconf to produce a configure script. |
|
4 dnl |
1885
|
5 dnl Copyright (C) 1996 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 |
1315
|
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
869
|
22 |
2108
|
23 AC_REVISION($Revision: 1.195 $) |
2034
|
24 AC_PREREQ(2.9) |
405
|
25 AC_INIT(src/octave.cc) |
1146
|
26 AC_CONFIG_HEADER(config.h) |
869
|
27 |
|
28 AC_DEFINE(OCTAVE_SOURCE, 1) |
|
29 |
859
|
30 AC_CANONICAL_HOST |
885
|
31 if test -z "$host"; then |
|
32 host=unknown |
|
33 fi |
|
34 target_host_type=$host |
|
35 canonical_host_type=$host |
|
36 if test "$host" = unknown; then |
869
|
37 AC_MSG_WARN([configuring Octave for unknown system type |
859
|
38 ]) |
294
|
39 fi |
869
|
40 AC_SUBST(target_host_type) |
|
41 |
1667
|
42 ### some defaults |
|
43 |
|
44 AC_PREFIX_DEFAULT(/usr/local) |
|
45 |
|
46 exec_prefix='$(prefix)' |
|
47 bindir='$(exec_prefix)/bin' |
1721
|
48 datadir='$(prefix)/share' |
1667
|
49 libdir='$(exec_prefix)/lib' |
1721
|
50 libexecdir='$(exec_prefix)/libexec' |
1980
|
51 includedir='$(prefix)/include/octave-$(version)' |
1667
|
52 mandir='$(prefix)/man/man1' |
|
53 infodir='$(prefix)/info' |
|
54 fcnfiledir='$(datadir)/octave/$(version)/m' |
|
55 localfcnfiledir='$(datadir)/octave/site/m' |
|
56 localfcnfilepath='$(localfcnfiledir)//' |
1721
|
57 archlibdir='$(libexecdir)/octave/$(version)/exec/$(target_host_type)' |
|
58 octfiledir='$(libexecdir)/octave/$(version)/oct/$(target_host_type)' |
|
59 localoctfiledir='$(libexecdir)/octave/site/oct/$(target_host_type)' |
1667
|
60 localoctfilepath='$(localoctfiledir)//' |
|
61 fcnfilepath='.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//' |
|
62 imagedir='$(datadir)/octave/$(version)/imagelib' |
|
63 imagepath='.:$(imagedir)//' |
|
64 |
|
65 AC_MSG_RESULT([defining prefix to be $prefix]) |
|
66 AC_MSG_RESULT([defining exec_prefix to be $exec_prefix]) |
|
67 AC_MSG_RESULT([defining bindir to be $bindir]) |
|
68 AC_MSG_RESULT([defining datadir to be $datadir]) |
|
69 AC_MSG_RESULT([defining libdir to be $libdir]) |
1721
|
70 AC_MSG_RESULT([defining libexecdir to be $libexecdir]) |
1667
|
71 AC_MSG_RESULT([defining includedir to be $includedir]) |
|
72 AC_MSG_RESULT([defining mandir to be $mandir]) |
|
73 AC_MSG_RESULT([defining infodir to be $infodir]) |
|
74 AC_MSG_RESULT([defining fcnfiledir to be $fcnfiledir]) |
|
75 AC_MSG_RESULT([defining localfcnfiledir to be $localfcnfiledir]) |
|
76 AC_MSG_RESULT([defining localfcnfilepath to be $localfcnfilepath]) |
|
77 AC_MSG_RESULT([defining archlibdir to be $archlibdir]) |
|
78 AC_MSG_RESULT([defining octfiledir to be $octfiledir]) |
|
79 AC_MSG_RESULT([defining localoctfiledir to be $localoctfiledir]) |
|
80 AC_MSG_RESULT([defining localoctfilepath to be $localoctfilepath]) |
|
81 AC_MSG_RESULT([defining fcnfilepath to be $fcnfilepath]) |
|
82 AC_MSG_RESULT([defining imagedir to be $imagedir]) |
|
83 AC_MSG_RESULT([defining imagepath to be $imagepath]) |
|
84 |
|
85 AC_SUBST(exec_prefix) |
|
86 AC_SUBST(bindir) |
|
87 AC_SUBST(datadir) |
|
88 AC_SUBST(libdir) |
1721
|
89 AC_SUBST(libexecdir) |
1667
|
90 AC_SUBST(includedir) |
|
91 AC_SUBST(mandir) |
|
92 AC_SUBST(infodir) |
|
93 AC_SUBST(fcnfiledir) |
|
94 AC_SUBST(localfcnfiledir) |
|
95 AC_SUBST(localfcnfilepath) |
|
96 AC_SUBST(archlibdir) |
|
97 AC_SUBST(octfiledir) |
|
98 AC_SUBST(localoctfiledir) |
|
99 AC_SUBST(localoctfilepath) |
|
100 AC_SUBST(fcnfilepath) |
|
101 AC_SUBST(imagedir) |
|
102 AC_SUBST(imagepath) |
|
103 |
|
104 ### Path separator. |
|
105 |
1679
|
106 AC_DEFINE(SEPCHAR, [':']) |
|
107 AC_DEFINE(SEPCHAR_STR, [":"]) |
1667
|
108 |
869
|
109 ### Allow the user to force us to use f2c. |
|
110 |
832
|
111 AC_ARG_WITH(f2c, |
|
112 [ --with-f2c use f2c even if Fortran compiler is available], |
1177
|
113 [if test $withval = no; then use_f2c=false; else use_f2c=true; fi], |
|
114 use_f2c=false) |
|
115 |
|
116 ### Allow the user to force us to use g77. |
|
117 |
|
118 AC_ARG_WITH(g77, |
|
119 [ --with-g77 use g77 to compile Fortran subroutines], |
|
120 [if test $withval = no; then use_g77=false; else use_g77=true; fi], |
|
121 use_g77=false) |
|
122 |
|
123 if $use_f2c && $use_g77; then |
|
124 AC_MSG_WARN([--with-f2c and --with-g77 both specified! Using g77...]) |
|
125 use_f2c=false |
|
126 fi |
869
|
127 |
1137
|
128 ### Allow the user disable support for GNU info. |
|
129 |
1261
|
130 INFO_DIR=info |
1137
|
131 USE_GNU_INFO=true |
1152
|
132 LIBINFO=../info/libinfo.a |
1137
|
133 AC_ARG_ENABLE(info, |
|
134 [ --enable-info use GNU info (default is yes)], |
1261
|
135 [if test $enableval = no; then |
|
136 USE_GNU_INFO=false; |
|
137 LIBINFO=""; |
|
138 INFO_DIR=""; |
|
139 fi], []) |
1264
|
140 if $USE_GNU_INFO; then |
|
141 AC_DEFINE(USE_GNU_INFO, 1) |
|
142 fi |
1145
|
143 AC_SUBST(LIBINFO) |
1261
|
144 AC_SUBST(INFO_DIR) |
|
145 |
1301
|
146 ### Allow the user disable support for plplot. |
|
147 |
1397
|
148 # USE_PLPLOT=true |
|
149 # PLPLOT_DIR=plplot |
|
150 # LIBPLPLOT=../plplot/libplplot.a |
|
151 USE_PLPLOT=false |
|
152 PLPLOT_DIR="" |
|
153 LIBPLPLOT="" |
1301
|
154 AC_ARG_ENABLE(plplot, |
|
155 [ --enable-plplot use plplot for plotting (default is yes)], |
|
156 [if test $enableval = no; then |
|
157 USE_PLPLOT=false; |
|
158 LIBPLPLOT=""; |
|
159 PLPLOT_DIR=""; |
|
160 fi], []) |
|
161 if $USE_PLPLOT; then |
|
162 AC_DEFINE(USE_PLPLOT, 1) |
|
163 fi |
|
164 AC_SUBST(LIBPLPLOT) |
|
165 AC_SUBST(PLPLOT_DIR) |
1137
|
166 |
1138
|
167 ### Allow the user disable support for command line editing using GNU |
|
168 ### readline. |
|
169 |
1261
|
170 READLINE_DIR=readline |
1138
|
171 USE_READLINE=true |
1679
|
172 LIBREADLINE=-lreadline |
1138
|
173 AC_ARG_ENABLE(readline, |
|
174 [ --enable-readline use readline library (default is yes)], |
1261
|
175 [if test "$enableval" = no; then |
|
176 USE_READLINE=false; |
|
177 LIBREADLINE=""; |
|
178 READLINE_DIR=""; |
|
179 fi], []) |
1264
|
180 if $USE_READLINE; then |
|
181 AC_DEFINE(USE_READLINE, 1) |
|
182 fi |
1145
|
183 AC_SUBST(LIBREADLINE) |
1261
|
184 AC_SUBST(READLINE_DIR) |
1138
|
185 |
2108
|
186 ### By default, Octave's internal array and matrix classes do bounds |
|
187 ### checking on element references. This slows some operations down a |
|
188 ### bit, so give the user the option of disabling it. |
|
189 |
|
190 BOUNDS_CHECKING=true |
|
191 AC_ARG_ENABLE(bounds-check, |
|
192 [ --enable-bounds-check for internal array classes (default is yes)], |
|
193 [if test "$enableval" = no; then BOUNDS_CHECKING=false; fi], []) |
|
194 if $BOUNDS_CHECKING; then |
|
195 AC_DEFINE(BOUNDS_CHECKING, 1) |
|
196 fi |
|
197 |
869
|
198 ### See which C++ compiler to use (we expect to find g++). |
|
199 |
1334
|
200 EXTERN_CXXFLAGS="$CXXFLAGS" |
|
201 |
405
|
202 AC_PROG_CXX |
|
203 AC_PROG_CXXCPP |
869
|
204 |
|
205 ### Do special things for g++. |
|
206 |
405
|
207 ADD_CXX_WALL=false |
759
|
208 NO_IMPLICIT_TEMPLATES= |
1207
|
209 gxx_version=`$CXX -v 2>&1 | grep "^.*g.. version" | sed 's/^.*g.. version *//'` |
405
|
210 case "$gxx_version" in |
832
|
211 changequote(,)dnl |
|
212 2.[6789].*|2.[123456789][0123456789].*) |
|
213 changequote([,])dnl |
1334
|
214 if test -z "$EXTERN_CXXFLAGS"; then |
1087
|
215 ADD_CXX_WALL=true |
|
216 fi |
759
|
217 NO_IMPLICIT_TEMPLATES="-fno-implicit-templates" |
832
|
218 AC_MSG_RESULT([defining NO_IMPLICIT_TEMPLATES to be $NO_IMPLICIT_TEMPLATES]) |
405
|
219 ;; |
832
|
220 changequote(,)dnl |
|
221 1.*|2.[012345].*) |
|
222 changequote([,])dnl |
1664
|
223 AC_MSG_ERROR([g++ version $gxx_version will not work to compile Octave]) |
405
|
224 ;; |
|
225 *) |
832
|
226 AC_MSG_WARN([Octave has only been tested with g++, and I can't find it]) |
405
|
227 ;; |
|
228 esac |
869
|
229 |
1018
|
230 HOST_CXXFLAGS= |
965
|
231 case "$gxx_version" in |
|
232 2.6.*) |
|
233 case "$canonical_host_type" in |
2063
|
234 rs6000-ibm-aix* | powerpc-ibm-aix*) |
1018
|
235 HOST_CXXFLAGS="-Wa,-u" |
|
236 AC_MSG_RESULT([defining HOST_CXXFLAGS to be $HOST_CXXFLAGS]) |
965
|
237 ;; |
|
238 esac |
|
239 ;; |
|
240 esac |
|
241 |
1894
|
242 CXX_VERSION= |
|
243 if test -n "$gxx_version"; then |
|
244 CXX_VERSION="$gxx_version" |
|
245 fi |
|
246 AC_SUBST(CXX_VERSION) |
|
247 |
1018
|
248 AC_SUBST(HOST_CXXFLAGS) |
1225
|
249 AC_SUBST(NO_IMPLICIT_TEMPLATES) |
1018
|
250 |
869
|
251 ### See which C compiler to use (we expect to find gcc). |
|
252 |
1334
|
253 EXTERN_CFLAGS="$CFLAGS" |
|
254 |
5
|
255 AC_PROG_CC |
405
|
256 AC_PROG_CPP |
832
|
257 AC_PROG_GCC_TRADITIONAL |
869
|
258 |
|
259 ### Do special things for gcc. |
|
260 |
405
|
261 ADD_CC_WALL=false |
1207
|
262 gcc_version=`$CC -v 2>&1 | grep "^.*gcc version" | sed 's/^.*gcc version *//'` |
405
|
263 case "$gcc_version" in |
|
264 2.*) |
1334
|
265 if test -z "$EXTERN_CFLAGS"; then |
1087
|
266 ADD_CC_WALL=true |
|
267 fi |
|
268 if test -z "$LDFLAGS"; then |
|
269 LDFLAGS="-g" |
|
270 AC_MSG_RESULT([defining LDFLAGS to be $LDFLAGS]) |
|
271 fi |
405
|
272 ;; |
|
273 1.*) |
832
|
274 AC_MSG_WARN([gcc version $gcc_version is likely to cause problems]) |
405
|
275 ;; |
5
|
276 *) |
832
|
277 AC_MSG_WARN([Octave has only been tested with gcc, and I can't find it]) |
405
|
278 ;; |
5
|
279 esac |
869
|
280 |
1894
|
281 CC_VERSION= |
|
282 if test -n "$gcc_version"; then |
|
283 CC_VERSION="$gcc_version" |
|
284 fi |
|
285 AC_SUBST(CC_VERSION) |
|
286 |
869
|
287 ### On Linux systems we need to compile with -mieee-fp to get full |
|
288 ### support for IEEE floating point. |
2020
|
289 ### |
|
290 ### On Alpha/OSF systems, wee need -mieee-with-inexact, but that also |
|
291 ### requires gcc 2.8.x or later. |
869
|
292 |
350
|
293 case "$canonical_host_type" in |
2022
|
294 changequote(,)dnl |
1667
|
295 i[345]86-*-linux) |
2022
|
296 changequote([,])dnl |
350
|
297 GCC_IEEE_FP_FLAG="-mieee-fp" |
832
|
298 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) |
324
|
299 ;; |
2020
|
300 alpha-dec-osf*) |
2022
|
301 case "$gcc_version" in |
|
302 changequote(,)dnl |
2020
|
303 1.* | 2.[01234567].*) |
2022
|
304 changequote([,])dnl |
2020
|
305 ;; |
|
306 *) |
|
307 GCC_IEEE_FP_FLAG="-mieee-with-inexact" |
|
308 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) |
|
309 ;; |
|
310 esac |
|
311 ;; |
324
|
312 esac |
1667
|
313 AC_SUBST(GCC_IEEE_FP_FLAG) |
869
|
314 |
1667
|
315 ### Use -static if compiling on Alpha OSF/1 1.3 systems. |
|
316 |
|
317 case "$canonical_host_type" in |
|
318 alpha-dec-osf1.3) |
|
319 LD_STATIC_FLAG=-static |
|
320 ;; |
|
321 esac |
1679
|
322 if test -n "$LD_STATIC_FLAG"; then |
|
323 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) |
|
324 fi |
|
325 AC_SUBST(LD_STATIC_FLAG) |
1667
|
326 |
|
327 ### Handle dynamic linking and shared library options. |
|
328 |
|
329 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. |
|
330 |
|
331 AC_ARG_ENABLE(dl, |
|
332 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)], |
1978
|
333 [if test $enableval = no; then WITH_DL=no; |
|
334 elif test $enableval = yes; then WITH_DL=yes; |
|
335 else WITH_DL=maybe; fi], |
|
336 WITH_DL=maybe) |
1667
|
337 |
|
338 ### Allow the user to experiment with dynamic linking using |
|
339 ### shl_load/shl_findsym (HP/UX only?). |
|
340 |
|
341 AC_ARG_ENABLE(shl, |
2108
|
342 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only)], |
1978
|
343 [if test $enableval = no; then WITH_SHL=no; |
|
344 elif test $enableval = yes; then WITH_SHL=yes; |
|
345 else WITH_SHL=maybe; fi], |
|
346 WITH_SHL=maybe) |
1679
|
347 |
1667
|
348 ### Enable creation of shared libraries. Currently only works with |
|
349 ### gcc on some systems. |
|
350 |
|
351 AC_ARG_ENABLE(shared, |
1902
|
352 [ --enable-shared create shared libraries (not all systems)], |
1679
|
353 [if test $enableval = no; then SHARED_LIBS=false; else SHARED_LIBS=true; fi], |
|
354 SHARED_LIBS=false) |
|
355 AC_SUBST(SHARED_LIBS) |
1667
|
356 |
2059
|
357 DLFCN_DIR= |
1679
|
358 if $SHARED_LIBS; then |
1667
|
359 CPICFLAG=-fPIC |
|
360 CXXPICFLAG=-fPIC |
|
361 FPICFLAG=-fPIC |
1679
|
362 SHLEXT=so |
1856
|
363 RLD_FLAG= |
1679
|
364 case "$canonical_host_type" in |
|
365 alpha-dec-osf*) |
|
366 CPICFLAG= |
|
367 CXXPICFLAG= |
|
368 FPICFLAG= |
1856
|
369 RLD_FLAG='-Xlinker -rpath -Xlinker $(libdir)' |
1679
|
370 ;; |
2059
|
371 rs6000-ibm-aix* | powerpc-ibm-aix*) |
1667
|
372 CPICFLAG= |
|
373 CXXPICFLAG= |
|
374 FPICFLAG= |
2059
|
375 DLFCN_DIR=dlfcn |
1667
|
376 ;; |
|
377 hppa*-hp-hpux*) |
|
378 FPICFLAG=+Z |
1679
|
379 SHLEXT=sl |
|
380 RLD_FLAG='-Xlinker +b -Xlinker $(libdir)' |
1667
|
381 ;; |
|
382 *-sgi-*) |
|
383 FPICFLAG=-KPIC |
|
384 ;; |
1679
|
385 sparc-sun-sunos4*) |
1667
|
386 FPICFLAG=-PIC |
1679
|
387 RLD_FLAG='-L $(libdir)' |
|
388 ;; |
|
389 sparc-sun-sunos5*) |
|
390 FPICFLAG=-PIC |
|
391 RLD_FLAG='-Xlinker -R -Xlinker $(libdir)' |
1667
|
392 ;; |
|
393 esac |
|
394 else |
|
395 FPICFLAG= |
|
396 CPICFLAG= |
|
397 CXXPICFLAG= |
1679
|
398 SHLEXT= |
|
399 RLD_FLAG= |
1667
|
400 fi |
|
401 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG]) |
|
402 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) |
|
403 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG]) |
1679
|
404 AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) |
2059
|
405 AC_MSG_RESULT([defining DLFCN_DIR to be $DLFCN_DIR]) |
1668
|
406 AC_SUBST(FPICFLAG) |
|
407 AC_SUBST(CPICFLAG) |
|
408 AC_SUBST(CXXPICFLAG) |
1679
|
409 AC_SUBST(SHLEXT) |
|
410 AC_SUBST(RLD_FLAG) |
2059
|
411 AC_SUBST(DLFCN_DIR) |
1667
|
412 |
|
413 ### Allow compilation of smaller kernel. This only works if some form |
|
414 ### of dynamic linking is also supported and used. |
|
415 |
|
416 AC_ARG_ENABLE(lite-kernel, |
|
417 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)], |
1679
|
418 [if test $enableval = no; then OCTAVE_LITE=false; else OCTAVE_LITE=true; fi], |
|
419 OCTAVE_LITE=false) |
|
420 if $OCTAVE_LITE; then |
1667
|
421 AC_DEFINE(OCTAVE_LITE, 1) |
|
422 fi |
1679
|
423 AC_SUBST(OCTAVE_LITE) |
1667
|
424 |
1679
|
425 ### special checks for odd OS specific things. |
869
|
426 |
405
|
427 AC_ISC_POSIX |
|
428 AC_MINIX |
|
429 AC_AIX |
832
|
430 AC_CHECK_LIB(sun, getpwnam) |
869
|
431 |
|
432 ### How big are ints and how are they oriented? These could probably |
|
433 ### be eliminated in favor of run-time checks. |
|
434 |
832
|
435 AC_CHECK_SIZEOF(short) |
|
436 AC_CHECK_SIZEOF(int) |
|
437 AC_CHECK_SIZEOF(long) |
869
|
438 |
|
439 ### Does the C compiler handle alloca() and const correctly? |
|
440 |
405
|
441 AC_ALLOCA |
832
|
442 AC_C_CONST |
869
|
443 |
1233
|
444 ### Get the list of libraries that the C++ compiler normally uses. |
|
445 |
|
446 OCTAVE_CXXLIBS |
|
447 |
869
|
448 ### If we haven't been forced to use f2c, try to find a Fortran compiler |
|
449 ### under any one of several common Un*x Fortran compiler names. |
|
450 ### Put fc last to avoid confusion with some vendor's /bin/sh fc |
|
451 ### builtin. |
|
452 ### |
|
453 ### xlf : IBM / AIX |
|
454 ### cf77 : Cray / Unicos |
|
455 ### g77 : GNU Fortran (someday...) |
|
456 ### fc : Convex |
|
457 ### |
|
458 ### I don't think the Cray compiler will ever work like f2c... |
1239
|
459 ### |
|
460 ### The optional arguments to --with-g77 or --with-f2c force g77 or |
|
461 ### f2c to be used. The optional argument to can be used to set the |
|
462 ### name of g77 or f2c. For example `--with-g77=/opt/gnu/bin/f77' |
|
463 ### says that we are using g77 but it is installed as |
|
464 ### /opt/gnu/bin/f77. |
|
465 ### |
|
466 ### If neither of those options are specified, look for a Fortran |
|
467 ### compiler. If one is found, see if it is compatible with our |
|
468 ### assumptions. If it is, use it. Otherwise, look for f2c. |
|
469 ### |
|
470 ### Issue a warning if we can't find a compatible fortran compiler or |
|
471 ### f2c. |
1233
|
472 |
1177
|
473 if $use_g77; then |
1239
|
474 if test "$with_g77" = "yes"; then |
|
475 F77=g77 |
|
476 else |
|
477 F77="$with_g77" |
|
478 fi |
|
479 AC_MSG_RESULT([defining F77 to be $F77]) |
1233
|
480 elif $use_f2c; then |
|
481 F77= |
1239
|
482 if test "$with_f2c" = "yes"; then |
1317
|
483 F2C=f2c |
1239
|
484 else |
|
485 F2C="$with_f2c" |
|
486 fi |
|
487 AC_MSG_RESULT([defining F2C to be $F2C]) |
5
|
488 else |
869
|
489 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) |
1233
|
490 fi |
5
|
491 |
1239
|
492 FUGLY= |
|
493 have_fortran_compiler=false |
|
494 have_f2c=false |
5
|
495 |
1239
|
496 if $use_g77; then |
|
497 FUGLY=-fugly |
|
498 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) |
1233
|
499 OCTAVE_FLIBS |
1239
|
500 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) |
|
501 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) |
|
502 have_fortran_compiler=true |
|
503 elif $use_f2c; then |
|
504 have_f2c=true |
|
505 else |
|
506 if test -n "$F77"; then |
|
507 OCTAVE_FLIBS |
|
508 OCTAVE_F77_APPEND_UNDERSCORE |
|
509 OCTAVE_F2C_F77_COMPAT |
|
510 if test "$octave_cv_f2c_f77_compat" = no; then |
|
511 F77= |
|
512 else |
|
513 if test -z "$FFLAGS"; then |
|
514 FFLAGS="-O" |
1316
|
515 fi |
|
516 case "$canonical_host_type" in |
|
517 alpha-dec-osf*) |
|
518 FFLAGS="-fpe1 $FFLAGS" |
|
519 ;; |
|
520 esac |
|
521 if test -n "$FFLAGS"; then |
1239
|
522 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) |
|
523 fi |
|
524 fi |
|
525 fi |
|
526 if test -n "$F77"; then |
|
527 have_fortran_compiler=true |
1233
|
528 else |
1239
|
529 AC_CHECK_PROG(F2C, f2c, f2c, []) |
|
530 if test -n "$F2C"; then |
|
531 have_f2c=true |
5
|
532 fi |
|
533 fi |
|
534 fi |
869
|
535 |
1679
|
536 f77_rules_frag=Makerules.f77 |
1239
|
537 if $have_fortran_compiler; then |
1679
|
538 changequote(,)dnl |
|
539 cat << \EOF > $f77_rules_frag |
1668
|
540 |
1753
|
541 %.c : %.f |
1668
|
542 |
1791
|
543 %.o : %.f |
1679
|
544 $(FC) -c $(ALL_FFLAGS) $< |
1668
|
545 |
1984
|
546 pic/%.o : %.f |
|
547 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o $@ |
|
548 |
1668
|
549 EOF |
1679
|
550 changequote([,])dnl |
1239
|
551 elif $have_f2c; then |
|
552 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) |
|
553 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) |
2040
|
554 AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, [], -lm) |
1462
|
555 if test -z "$FLIBS"; then |
2041
|
556 AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, [], -lm) |
1462
|
557 if test -n "$FLIBS"; then |
2041
|
558 AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", [], -lF77) |
5
|
559 fi |
|
560 fi |
1462
|
561 if test -z "$FLIBS"; then |
832
|
562 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) |
5
|
563 fi |
1679
|
564 f77_rules_frag=Makerules.f77 |
|
565 cat << \EOF > $f77_rules_frag |
1668
|
566 |
1824
|
567 %.c : %.f |
1668
|
568 cat $< | $(F2C) $(F2CFLAGS) > $(@F) |
|
569 |
1753
|
570 %.o : %.f |
1668
|
571 |
|
572 EOF |
5
|
573 else |
832
|
574 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
|
575 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) |
1664
|
576 AC_MSG_ERROR([See the file INSTALL for more information.]) |
5
|
577 fi |
869
|
578 |
1163
|
579 FC=$F77 |
|
580 AC_SUBST(FC) |
869
|
581 AC_SUBST(F77) |
|
582 AC_SUBST(FFLAGS) |
1177
|
583 AC_SUBST(FUGLY) |
869
|
584 AC_SUBST(FLIBS) |
|
585 AC_SUBST(F2C) |
|
586 AC_SUBST(F2CFLAGS) |
1679
|
587 AC_SUBST_FILE(f77_rules_frag) |
869
|
588 |
|
589 ### Extract libraries and directories from FLIBS and CXXLIBS. |
|
590 ### |
|
591 ### Leave only libraries, with -lfoo converted to libfoo.a: |
|
592 |
708
|
593 changequote(,)dnl |
843
|
594 FLIB_LIST=`echo " $FLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ |
1175
|
595 -e 's/ -[LR] *[^ ]*/ /g' \ |
843
|
596 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \ |
1068
|
597 -e 's/ [^ ]*\.o//g' \ |
832
|
598 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` |
869
|
599 |
843
|
600 CXXLIB_LIST=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ |
1175
|
601 -e 's/ -[LR] *[^ ]*/ /g' \ |
843
|
602 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \ |
1068
|
603 -e 's/ [^ ]*\.o//g' \ |
708
|
604 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` |
869
|
605 |
|
606 ### Leave only directories where libraries might be found: |
|
607 |
843
|
608 FLIB_PATH=`echo " $FLIBS " | sed \ |
|
609 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \ |
1175
|
610 -e 's/ -[LR] *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \ |
1069
|
611 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' \ |
|
612 -e 's/ [^ ]*\.o//g' \ |
|
613 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` |
869
|
614 |
843
|
615 CXXLIB_PATH=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ |
1175
|
616 -e 's/ -[LR] *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \ |
843
|
617 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \ |
1069
|
618 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' \ |
|
619 -e 's/ [^ ]*\.o//g' \ |
|
620 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` |
708
|
621 changequote([,])dnl |
869
|
622 |
832
|
623 AC_MSG_RESULT([defining FLIB_LIST to be $FLIB_LIST]) |
|
624 AC_MSG_RESULT([defining FLIB_PATH to be $FLIB_PATH]) |
869
|
625 |
832
|
626 AC_MSG_RESULT([defining CXXLIB_LIST to be $CXXLIB_LIST]) |
|
627 AC_MSG_RESULT([defining CXXLIB_PATH to be $CXXLIB_PATH]) |
869
|
628 |
|
629 AC_SUBST(FLIB_LIST) |
|
630 AC_SUBST(FLIB_PATH) |
|
631 |
|
632 AC_SUBST(CXXLIB_LIST) |
|
633 AC_SUBST(CXXLIB_PATH) |
|
634 |
|
635 ### Checks for header files. |
|
636 |
832
|
637 AC_HEADER_STDC |
|
638 AC_HEADER_DIRENT |
1377
|
639 AC_HEADER_TIME |
|
640 AC_HEADER_SYS_WAIT |
2097
|
641 |
|
642 AC_CHECK_HEADERS(assert.h curses.h fcntl.h float.h floatingpoint.h \ |
|
643 limits.h memory.h pwd.h sgtty.h stdlib.h string.h \ |
|
644 sys/param.h sys/resource.h sys/select.h sys/stat.h \ |
|
645 sys/time.h sys/times.h sys/types.h sys/utsname.h \ |
|
646 termcap.h termio.h termios.h unistd.h varargs.h) |
869
|
647 |
|
648 if test "$ac_cv_header_termios_h" = yes \ |
|
649 || test "$ac_cv_header_termio_h" = yes \ |
|
650 || test "$ac_cv_header_sgtty_h" = yes; then |
832
|
651 true |
|
652 else |
|
653 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) |
|
654 fi |
869
|
655 |
1667
|
656 ### See if the optional nonlinear programming code is present. |
|
657 |
|
658 AC_MSG_CHECKING([for npsol]) |
|
659 if test -f $srcdir/libcruft/npsol/npsol.f; then |
|
660 AC_MSG_RESULT(yes) |
|
661 else |
|
662 AC_MSG_RESULT(no) |
|
663 AC_DEFINE(NPSOL_MISSING, 1) |
|
664 fi |
|
665 |
|
666 AC_MSG_CHECKING([for qpsol]) |
|
667 if test -f $srcdir/libcruft/qpsol/qpsol.f; then |
|
668 AC_MSG_RESULT(yes) |
|
669 else |
|
670 AC_MSG_RESULT(no) |
|
671 AC_DEFINE(QPSOL_MISSING, 1) |
|
672 fi |
|
673 |
|
674 AC_MSG_CHECKING([for fsqp]) |
|
675 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then |
|
676 AC_MSG_RESULT(yes) |
|
677 else |
|
678 AC_MSG_RESULT(no) |
|
679 AC_DEFINE(FSQP_MISSING, 1) |
|
680 fi |
|
681 |
1788
|
682 ### Checks for functions and variables. |
869
|
683 |
2097
|
684 AC_CHECK_FUNCS(atexit bcopy bzero dup2 execvp fcntl fork getcwd \ |
|
685 gethostname getpgrp getpid getppid lstat memmove \ |
|
686 mkdir mkfifo on_exit pipe putenv rename rindex rmdir \ |
|
687 setvbuf sigaction sigpending sigprocmask sigsuspend \ |
|
688 stat strcasecmp strdup strerror stricmp strncasecmp \ |
|
689 strnicmp tempnam umask unlink vfprintf vsprintf \ |
|
690 waitpid) |
1300
|
691 |
1708
|
692 OCTAVE_SMART_PUTENV |
1788
|
693 OCTAVE_PROGRAM_INVOCATION_NAME |
1708
|
694 |
2064
|
695 LIBDLFCN= |
|
696 DLFCN_INCFLAGS= |
1978
|
697 if test "$WITH_DL" = yes || test "$WITH_DL" = maybe; then |
2063
|
698 case "$canonical_host_type" in |
|
699 rs6000-ibm-aix* | powerpc-ibm-aix*) |
2064
|
700 LIBDLFCN=-ldlfcn |
|
701 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' |
2063
|
702 WITH_DL=true |
|
703 ;; |
|
704 *) |
|
705 AC_CHECK_LIB(dl, dlopen) |
|
706 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) |
|
707 if test "$ac_cv_func_dlopen" = yes \ |
|
708 && test "$ac_cv_func_dlsym" = yes \ |
|
709 && test "$ac_cv_func_dlerror" = yes \ |
|
710 && test "$ac_cv_func_dlclose" = yes; then |
|
711 WITH_DL=true |
|
712 else |
|
713 if test "$WITH_DL" = yes; then |
|
714 AC_MSG_ERROR([--enable-dl specified, but functions are missing!]) |
|
715 fi |
|
716 WITH_DL=false |
|
717 fi |
|
718 ;; |
|
719 esac |
1978
|
720 if $WITH_DL; then |
|
721 AC_DEFINE(WITH_DL, 1) |
|
722 fi |
|
723 else |
|
724 WITH_DL=false |
1664
|
725 fi |
1978
|
726 AC_SUBST(WITH_DL) |
2064
|
727 AC_SUBST(LIBDLFCN) |
|
728 AC_SUBST(DLFCN_INCFLAGS) |
1664
|
729 |
1978
|
730 if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then |
|
731 AC_CHECK_LIB(dld, shl_load) |
|
732 AC_CHECK_FUNCS(shl_load shl_findsym) |
|
733 if test "$ac_cv_func_shl_load" = yes \ |
|
734 && test "$ac_cv_func_shl_findsym" = yes; then |
|
735 WITH_SHL=true |
|
736 else |
|
737 if test "$WITH_SHL" = yes; then |
|
738 AC_MSG_ERROR([--enable-shl specified, but functions are missing!]) |
|
739 fi |
|
740 WITH_SHL=false |
|
741 fi |
|
742 if $WITH_SHL; then |
|
743 AC_DEFINE(WITH_SHL, 1) |
|
744 fi |
|
745 else |
|
746 WITH_SHL=false |
1664
|
747 fi |
1978
|
748 AC_SUBST(WITH_SHL) |
1664
|
749 |
1901
|
750 ### Set WITH_DYNAMIC_LINKING after all the other shared library stuff |
|
751 ### has been determined. |
|
752 |
|
753 if $WITH_DL || $WITH_SHL; then |
|
754 AC_DEFINE(WITH_DYNAMIC_LINKING, 1) |
|
755 WITH_DYNAMIC_LINKING=true |
|
756 else |
|
757 WITH_DYNAMIC_LINKING=false |
|
758 fi |
|
759 AC_SUBST(WITH_DYNAMIC_LINKING) |
|
760 |
1300
|
761 ### There is more than one possible prototype for gettimeofday. See |
|
762 ### which one (if any) appears in sys/time.h. |
|
763 |
|
764 AC_CHECK_FUNC(gettimeofday, |
|
765 AC_TRY_COMPILE([#include <sys/time.h>], |
|
766 [gettimeofday ((struct timeval *) 0,(struct timezone *) 0);], |
|
767 [], AC_DEFINE(GETTIMEOFDAY_NO_TZ))) |
869
|
768 |
832
|
769 dnl Would like to get rid of this cruft, and just have |
|
770 dnl |
|
771 dnl AC_CHECK_FUNCS(finite isnan isinf) |
|
772 dnl |
|
773 dnl instead, but that used to fail on some systems... |
369
|
774 dnl |
832
|
775 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf |
|
776 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that |
369
|
777 dnl fails, we try again by including math.h and invoking the function |
|
778 dnl with an argument. |
869
|
779 |
|
780 ### Check to see if we have IEEE math functions, and if so, which ones. |
|
781 ### |
|
782 ### For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP |
|
783 ### functions, otherwise we may not find them. |
|
784 ### |
|
785 ### Also check for some additional trig functions that aren't ANSI but |
|
786 ### are often available. If they are missing, we try to replace them |
|
787 ### with functions from the BSD/NET2 math library. |
|
788 |
2050
|
789 AC_CHECK_LIB(sunmath, quiet_nan, , , -lm) |
1070
|
790 |
|
791 dnl This is bogus. We shouldn't have to explicitly add libc too! |
|
792 |
|
793 case "$canonical_host_type" in |
|
794 *-*-linux*) |
2034
|
795 AC_CHECK_LIB(m, sin, , , -lc) |
1070
|
796 ;; |
|
797 *) |
2034
|
798 AC_CHECK_LIB(m, sin) |
1070
|
799 ;; |
|
800 esac |
869
|
801 |
360
|
802 XCFLAGS="$CFLAGS" |
351
|
803 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG" |
869
|
804 |
1384
|
805 ### I am told that Inf and NaN don't work on m68k HP sytems. |
956
|
806 |
|
807 case "$canonical_host_type" in |
1384
|
808 m68k-hp-hpux*) |
956
|
809 ;; |
|
810 *) |
|
811 AC_CHECK_FUNCS(finite isnan isinf infinity quiet_nan) |
|
812 ;; |
|
813 esac |
|
814 |
1076
|
815 ### Check for nonstandard but common math functions that we need. |
|
816 |
1172
|
817 AC_CHECK_FUNCS(acosh asinh atanh erf erfc) |
869
|
818 |
360
|
819 CFLAGS="$XCFLAGS" |
869
|
820 |
|
821 ### Checks for OS specific cruft. |
|
822 |
1377
|
823 AC_STRUCT_ST_BLKSIZE |
|
824 AC_STRUCT_ST_BLOCKS |
|
825 AC_STRUCT_ST_RDEV |
405
|
826 AC_STRUCT_TM |
1186
|
827 AC_STRUCT_TIMEZONE |
1388
|
828 AC_FUNC_CLOSEDIR_VOID |
1225
|
829 |
405
|
830 TERMLIBS="" |
1462
|
831 for termlib in termcap terminfo curses termlib; do |
2034
|
832 AC_CHECK_LIB(${termlib}, tputs, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
405
|
833 case "${TERMLIBS}" in |
|
834 *-l${termlib}*) |
832
|
835 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS]) |
405
|
836 break |
|
837 ;; |
|
838 esac |
|
839 done |
1225
|
840 AC_SUBST(TERMLIBS) |
869
|
841 |
832
|
842 AC_MSG_CHECKING([for struct exception in math.h]) |
|
843 AC_TRY_LINK([#include <math.h>], |
|
844 [struct exception *x; x->type; x->name;], |
835
|
845 AC_MSG_RESULT(yes) |
832
|
846 AC_DEFINE(EXCEPTION_IN_MATH, 1), |
869
|
847 AC_MSG_RESULT(no)) |
|
848 |
|
849 ### Signal stuff. |
|
850 |
834
|
851 AC_TYPE_SIGNAL |
885
|
852 AC_DECL_SYS_SIGLIST |
|
853 AC_MSG_CHECKING([for sys_siglist variable]) |
|
854 AC_TRY_LINK([#include <stdio.h>], |
|
855 [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);], |
|
856 AC_MSG_RESULT(yes) |
|
857 AC_DEFINE(HAVE_SYS_SIGLIST, 1), |
|
858 AC_MSG_RESULT(no)) |
869
|
859 |
1762
|
860 ### Type stuff. |
|
861 |
|
862 AC_TYPE_MODE_T |
|
863 AC_TYPE_OFF_T |
2097
|
864 AC_TYPE_PID_T |
1762
|
865 AC_TYPE_SIZE_T |
|
866 AC_TYPE_UID_T |
|
867 AC_CHECK_TYPE(dev_t, short) |
|
868 AC_CHECK_TYPE(ino_t, unsigned long) |
|
869 AC_CHECK_TYPE(nlink_t, short) |
|
870 |
869
|
871 ### Define VOID_SIGHANDLER for readline. |
|
872 |
405
|
873 case "$RETSIGTYPE" in |
|
874 int) |
|
875 ;; |
|
876 *) |
|
877 VOID_SIGHANDLER="-DVOID_SIGHANDLER=1" |
832
|
878 AC_MSG_RESULT([defining VOID_SIGHANDLER to be 1]) |
405
|
879 ;; |
|
880 esac |
869
|
881 AC_SUBST(VOID_SIGHANDLER) |
|
882 |
2035
|
883 ### Try to make it possible to find getrusage on Solaris systems. |
|
884 |
|
885 case "$canonical_host_type" in |
|
886 *-*-solaris2*) |
|
887 UCBLIB=/usr/ucblib/libucb.a |
|
888 if test -f $UCBLIB; then |
|
889 LIBS="-lc $UCBLIB $LIBS" |
|
890 AC_MSG_RESULT([adding $UCBLIB to LIBS]) |
|
891 fi |
|
892 ;; |
|
893 esac |
|
894 |
|
895 AC_CHECK_FUNCS(getrusage times) |
|
896 |
869
|
897 ### Checks for other programs used for building, testing, installing, |
|
898 ### and running Octave. |
|
899 ### |
|
900 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in |
|
901 ### it, and it might not be installed. |
|
902 ### |
|
903 ### Also make sure that we generate an interactive scanner if we are |
|
904 ### using flex. |
|
905 |
405
|
906 AC_PROG_LEX |
|
907 case "$LEX" in |
|
908 flex*) |
|
909 LFLAGS="-t -I" |
832
|
910 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) |
405
|
911 LEXLIB= |
|
912 ;; |
|
913 *) |
|
914 LFLAGS="-t" |
832
|
915 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) |
|
916 AC_MSG_WARN([I didn't find flex, but that's only a problem]) |
|
917 AC_MSG_WARN([if you need to reconstruct lex.cc]) |
405
|
918 ;; |
|
919 esac |
869
|
920 AC_SUBST(LFLAGS) |
|
921 |
405
|
922 AC_PROG_YACC |
|
923 case "$YACC" in |
|
924 bison*) |
|
925 ;; |
|
926 *) |
832
|
927 AC_MSG_WARN([I didn't find bison, but that's only a problem]) |
|
928 AC_MSG_WARN([if you need to reconstruct parse.cc]) |
405
|
929 ;; |
|
930 esac |
869
|
931 |
1462
|
932 if test -z "$AR"; then |
|
933 AR=ar |
|
934 fi |
|
935 AC_SUBST(AR) |
|
936 |
|
937 if test -z "$ARFLAGS"; then |
|
938 ARFLAGS="rc" |
|
939 fi |
|
940 AC_SUBST(ARFLAGS) |
|
941 |
405
|
942 AC_PROG_RANLIB |
869
|
943 |
1722
|
944 AC_PROG_LN_S |
|
945 |
869
|
946 AC_CHECK_PROG(RUNTEST, runtest, runtest, []) |
|
947 AC_CHECK_PROG(EXPECT, expect, expect, []) |
1462
|
948 if test -z "$EXPECT"; then |
5
|
949 RUNTEST= |
|
950 fi |
869
|
951 AC_SUBST(RUNTEST) |
|
952 |
405
|
953 AC_PROG_INSTALL |
869
|
954 |
|
955 AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, []) |
1500
|
956 if test -n "$GNUPLOT_BINARY"; then |
|
957 AC_MSG_CHECKING([to see if your gnuplot supports multiplot]) |
1556
|
958 if test -z "`echo 'set term unknown; set multiplot' | \ |
|
959 $GNUPLOT_BINARY 2>&1`"; then |
1500
|
960 AC_MSG_RESULT([yes]) |
|
961 AC_DEFINE(GNUPLOT_HAS_MULTIPLOT, 1) |
|
962 else |
|
963 AC_MSG_RESULT([no]) |
|
964 fi |
|
965 else |
832
|
966 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
|
967 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) |
|
968 AC_MSG_WARN([plotting commands without it.]) |
|
969 AC_MSG_WARN([]) |
|
970 AC_MSG_WARN([If gnuplot is installed but it isn't in your path, you can]) |
|
971 AC_MSG_WARN([tell Octave where to find it by typing the command]) |
|
972 AC_MSG_WARN([]) |
|
973 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) |
|
974 AC_MSG_WARN([]) |
|
975 AC_MSG_WARN([at the Octave prompt.]) |
405
|
976 fi |
869
|
977 |
|
978 AC_CHECK_PROGS(DEFAULT_PAGER, less more page pg, []) |
405
|
979 if test -z "$DEFAULT_PAGER"; then |
832
|
980 AC_MSG_WARN([I couldn't find `less', `more', `page', or `pg']) |
405
|
981 fi |
869
|
982 |
2032
|
983 ### Even though we include config.h, we need to have the preprocessor |
|
984 ### defines available in a variable for the octave-bug script. Use |
|
985 ### UGLY_DEFS for that. |
|
986 |
|
987 AC_OUTPUT_MAKE_DEFS |
|
988 UGLY_DEFS="$DEFS" |
|
989 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) |
|
990 AC_SUBST(UGLY_DEFS) |
|
991 |
869
|
992 ### Maybe add -Wall to compiler flags now that we're done feature |
|
993 ### testing. |
|
994 ### |
|
995 ### To get gcc and g++ to be really picky, try these adding these |
|
996 ### options to CFLAGS and CXXFLAGS along with -Wall: |
|
997 ### |
|
998 ### -ansi |
|
999 ### -pedantic |
|
1000 ### -Wwrite-strings |
|
1001 ### -Wid-clash-31 |
|
1002 ### -Wpointer-arith |
|
1003 ### -Wcast-qual |
|
1004 ### -Wenum-clash |
|
1005 ### -Wcast-align |
|
1006 ### -Wtraditional |
|
1007 ### -Wstrict-prototypes |
|
1008 ### -Wmissing-prototypes |
|
1009 ### -Wnested-externs |
|
1010 ### -Woverloaded-virtual |
|
1011 ### -Winline |
|
1012 ### -felide-constructors |
|
1013 ### -fnonnull-objects |
|
1014 |
405
|
1015 if $ADD_CXX_WALL; then |
1481
|
1016 CXXFLAGS="$CXXFLAGS -Wall" |
832
|
1017 AC_MSG_RESULT([adding -Wall to CXXFLAGS]) |
405
|
1018 fi |
|
1019 if $ADD_CC_WALL; then |
1481
|
1020 CFLAGS="$CFLAGS -Wall" |
832
|
1021 AC_MSG_RESULT([adding -Wall to CFLAGS]) |
405
|
1022 fi |
869
|
1023 |
1146
|
1024 ### Run configure in subdirectories. |
|
1025 |
1304
|
1026 export CC |
|
1027 export CXX |
|
1028 export F77 |
|
1029 |
2064
|
1030 AC_CONFIG_SUBDIRS(glob kpathsea scripts $INFO_DIR $PLPLOT_DIR $READLINE_DIR) |
1146
|
1031 |
869
|
1032 ### Do the substitutions in all the Makefiles. |
|
1033 |
2064
|
1034 AC_OUTPUT(Makefile octMakefile Makeconf test/Makefile dlfcn/Makefile |
1998
|
1035 doc/Makefile doc/faq/Makefile doc/interpreter/Makefile |
|
1036 doc/liboctave/Makefile doc/refcard/Makefile |
1924
|
1037 liboctave/Makefile src/Makefile src/mk-oct-links |
1668
|
1038 libcruft/Makefile libcruft/Makerules libcruft/blas/Makefile |
|
1039 libcruft/balgen/Makefile libcruft/dassl/Makefile |
|
1040 libcruft/eispack/Makefile libcruft/fftpack/Makefile |
|
1041 libcruft/fsqp/Makefile libcruft/lapack/Makefile |
|
1042 libcruft/linpack/Makefile libcruft/minpack/Makefile |
|
1043 libcruft/misc/Makefile libcruft/npsol/Makefile |
|
1044 libcruft/odepack/Makefile libcruft/qpsol/Makefile |
|
1045 libcruft/quadpack/Makefile libcruft/ranlib/Makefile |
|
1046 libcruft/slatec-fn/Makefile libcruft/villad/Makefile) |
1225
|
1047 |
|
1048 ### Print a summary so that important information isn't missed. |
|
1049 |
|
1050 CXX_EXTRAS="$HOST_CXXFLAGS $NO_IMPLICIT_TEMPLATES $GCC_IEEE_FP_FLAG" |
|
1051 |
|
1052 if test -z "$F77"; then |
|
1053 FORT="$F2C $F2CFLAGS" |
|
1054 else |
|
1055 FORT="$F77 $FFLAGS $FUGLY" |
|
1056 fi |
|
1057 |
|
1058 AC_MSG_RESULT([ |
|
1059 |
|
1060 Octave is now configured for $canonical_host_type |
|
1061 |
1664
|
1062 Source directory: $srcdir |
|
1063 Installation prefix: $prefix |
|
1064 C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS |
|
1065 C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS |
|
1066 Fortran compiler: $FORT |
|
1067 Fortran libraries: $FLIBS |
|
1068 Use GNU readline: $USE_READLINE |
|
1069 Use GNU info reader: $USE_GNU_INFO |
|
1070 Default pager: $DEFAULT_PAGER |
|
1071 gnuplot: $GNUPLOT_BINARY |
|
1072 |
2108
|
1073 Do internal array bounds checking: $BOUNDS_CHECKING |
1679
|
1074 Build shared libraries: $SHARED_LIBS |
|
1075 Minimal kernel option: $OCTAVE_LITE |
|
1076 Dynamic Linking (dlopen/dlsym): $WITH_DL |
|
1077 Dynamic Linking (shl_load/shl_findsym): $WITH_SHL |
1225
|
1078 ]) |