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