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