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