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