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