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