405
|
1 dnl configure.in |
|
2 dnl |
5
|
3 dnl Process this file with autoconf to produce a configure script. |
405
|
4 dnl Requires GNU autoconf 1.8 or later. |
5
|
5 dnl |
405
|
6 dnl Copyright (C) 1992, 1993, 1994 John W. Eaton |
|
7 dnl |
|
8 dnl This file is part of Octave. |
|
9 dnl |
|
10 dnl Octave is free software; you can redistribute it and/or modify it |
|
11 dnl under the terms of the GNU General Public License as published by the |
|
12 dnl Free Software Foundation; either version 2, or (at your option) any |
|
13 dnl later version. |
|
14 dnl |
|
15 dnl Octave is distributed in the hope that it will be useful, but WITHOUT |
|
16 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
17 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
18 dnl for more details. |
|
19 dnl |
|
20 dnl You should have received a copy of the GNU General Public License |
|
21 dnl along with Octave; see the file COPYING. If not, write to the Free |
|
22 dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
23 dnl |
468
|
24 AC_REVISION($Revision: 1.32 $)dnl |
405
|
25 AC_PREREQ(1.8)dnl |
|
26 AC_INIT(src/octave.cc) |
424
|
27 AC_CONFIG_HEADER(config.h) |
369
|
28 dnl |
236
|
29 AC_DEFINE(OCTAVE_SOURCE, 1)dnl |
369
|
30 dnl |
405
|
31 dnl See if we were given the target host type. If not, use |
|
32 dnl config.guess to try to guess the target host type. |
369
|
33 dnl |
5
|
34 if test $# -gt 0; then |
|
35 TARGET=`eval echo $\{\`echo $#\`\}` |
|
36 case $TARGET in |
405
|
37 -*) |
|
38 target_host_type= |
|
39 ;; |
|
40 *) |
|
41 target_host_type=$TARGET |
|
42 ;; |
5
|
43 esac |
|
44 fi |
369
|
45 dnl |
5
|
46 if test -z "$target_host_type" -o "$target_host_type" = unknown; then |
|
47 target_host_type=`sh $srcdir/config.guess` |
|
48 if test -z "$target_host_type"; then |
405
|
49 AC_WARN([unable to guess system type]) |
5
|
50 target_host_type=unknown |
|
51 fi |
|
52 fi |
369
|
53 dnl |
405
|
54 dnl Use config.sub to come up with a standard vendor-host-os triple. |
|
55 dnl |
294
|
56 canonical_host_type=`sh $srcdir/config.sub $target_host_type 2>&1` |
|
57 status=$? |
|
58 if test $status -eq 0; then |
|
59 echo "configuring Octave for a $target_host_type" |
|
60 else |
|
61 canonical_host_type=unknown |
405
|
62 AC_WARN([configuring Octave for an unknown system type]) |
294
|
63 fi |
5
|
64 AC_SUBST(target_host_type)dnl |
405
|
65 AC_VERBOSE([target_host_type is $target_host_type]) |
|
66 AC_VERBOSE([canonical_host_type is $canonical_host_type]) |
369
|
67 dnl |
405
|
68 dnl Allow the user to force us to use f2c. |
369
|
69 dnl |
5
|
70 AC_WITH(f2c, use_f2c=true, use_f2c=false)dnl |
405
|
71 dnl |
|
72 dnl Allow the user to experiment with dynamic linking using GNU dld. |
|
73 dnl |
|
74 AC_ENABLE(dld, use_dld=true, use_dld=false)dnl |
369
|
75 dnl |
424
|
76 dnl Makes Octave look for info and function files in the same |
|
77 dnl directory tree as the sources |
|
78 dnl |
|
79 AC_ENABLE(run-in-place, run_in_place=true, run_in_place=false)dnl |
425
|
80 OCTAVE_HOME=/usr/local |
|
81 if test -n "$prefix"; then |
|
82 OCTAVE_HOME=$prefix |
424
|
83 fi |
425
|
84 OCTAVE_LIB_DIR= |
|
85 OCTAVE_INFO_DIR= |
|
86 if $run_in_place; then |
424
|
87 AC_DEFINE(RUN_IN_PLACE, 1)dnl |
425
|
88 case "$srcdir" in |
|
89 /*) |
|
90 absolute_srcdir=$srcdir |
|
91 ;; |
|
92 *) |
|
93 AC_WARN([making OCTAVE_HOME absolute -- may lose with automounter]) |
|
94 absolute_srcdir=`(cd $srcdir; pwd)` |
|
95 ;; |
|
96 esac |
|
97 OCTAVE_HOME=$absolute_srcdir |
|
98 OCTAVE_LIB_DIR=$absolute_srcdir/scripts |
|
99 OCTAVE_INFO_DIR=$absolute_srcdir/doc |
424
|
100 fi |
425
|
101 AC_VERBOSE([setting OCTAVE_HOME to $OCTAVE_HOME]) |
|
102 AC_VERBOSE([setting OCTAVE_LIB_DIR to $OCTAVE_LIB_DIR]) |
|
103 AC_VERBOSE([setting OCTAVE_INFO_DIR to $OCTAVE_INFO_DIR]) |
|
104 AC_SUBST(OCTAVE_HOME)dnl |
|
105 AC_SUBST(OCTAVE_LIB_DIR)dnl |
|
106 AC_SUBST(OCTAVE_INFO_DIR)dnl |
424
|
107 dnl |
5
|
108 DYNAMIC_LD_OBJ= |
|
109 DLD_DIR= |
|
110 LIBDLD= |
|
111 DLD_OBJECTS='$(DLD_OBJECTS)' |
|
112 LD_STATIC_FLAG= |
|
113 if $use_dld; then |
|
114 DYNAMIC_LD_OBJ='dynamic-ld.o' |
405
|
115 AC_VERBOSE([setting DYNAMIC_LD_OBJ to $DYNAMIC_LD_OBJ]) |
5
|
116 DLD_DIR=dld |
405
|
117 AC_VERBOSE([setting DLD_DIR to $DLD_DIR]) |
5
|
118 LIBDLD='../libdld.a' |
405
|
119 AC_VERBOSE([setting LIBDLD to $LIBDLD]) |
5
|
120 DLD_OBJECTS= : # don't link them in if doing dynamic linking |
405
|
121 AC_VERBOSE([setting DLD_OBJECTS to $DLD_OBJECTS]) |
|
122 LD_STATIC_FLAG=-static |
|
123 AC_VERBOSE([setting LD_STATIC_FLAG to $LD_STATIC_FLAG]) |
236
|
124 AC_DEFINE(WITH_DLD, 1)dnl |
5
|
125 fi |
|
126 AC_SUBST(DYNAMIC_LD_OBJ)dnl |
|
127 AC_SUBST(DLD_DIR)dnl |
|
128 AC_SUBST(LIBDLD)dnl |
|
129 AC_SUBST(DLD_OBJECTS)dnl |
|
130 AC_SUBST(LD_STATIC_FLAG)dnl |
369
|
131 dnl |
405
|
132 dnl See if the optional nonlinear programming code is present. |
|
133 dnl |
|
134 AC_CHECKING([for npsol]) |
5
|
135 if test -f $srcdir/libcruft/npsol/npsol.f; then |
|
136 : |
|
137 else |
236
|
138 AC_DEFINE(NPSOL_MISSING, 1)dnl |
5
|
139 fi |
369
|
140 dnl |
405
|
141 AC_CHECKING([for qpsol]) |
5
|
142 if test -f $srcdir/libcruft/qpsol/qpsol.f; then |
|
143 : |
|
144 else |
236
|
145 AC_DEFINE(QPSOL_MISSING, 1)dnl |
5
|
146 fi |
369
|
147 dnl |
405
|
148 AC_CHECKING([for fsqp]) |
5
|
149 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then |
|
150 : |
|
151 else |
236
|
152 AC_DEFINE(FSQP_MISSING, 1)dnl |
5
|
153 fi |
369
|
154 dnl |
405
|
155 dnl See which C++ compiler to use (we expect to find g++). |
|
156 dnl |
|
157 AC_PROG_CXX |
|
158 AC_PROG_CXXCPP |
|
159 dnl |
|
160 dnl Do special things for g++. |
|
161 dnl |
|
162 ADD_CXX_WALL=false |
|
163 gxx_version=`$CXX -v 2>&1 | grep "^g.. version" | sed 's/^g.. version *//'` |
|
164 case "$gxx_version" in |
|
165 2.5.*|2.6.*|2.7.*|2.8.*|2.9.*) |
|
166 CXXFLAGS="-g -O" |
|
167 AC_VERBOSE([setting CXXFLAGS to $CXXFLAGS]) |
|
168 EXTERNAL_TEMPLATES="-fexternal-templates" |
|
169 AC_VERBOSE([setting EXTERNAL_TEMPLATES to $EXTERNAL_TEMPLATES]) |
|
170 ADD_CXX_WALL=true |
|
171 AC_DEFINE(USE_EXTERNAL_TEMPLATES, 1)dnl |
|
172 ;; |
|
173 1.*) |
|
174 AC_WARN([g++ version $gxx_version will not work to compile Octave]) |
|
175 ;; |
|
176 *) |
|
177 AC_WARN([Octave has only been tested with g++, and I can't find it]) |
|
178 ;; |
|
179 esac |
|
180 dnl |
|
181 AC_SUBST(CXXFLAGS)dnl |
|
182 AC_SUBST(EXTERNAL_TEMPLATES)dnl |
|
183 dnl |
|
184 dnl See which C compiler to use (we expect to find gcc). |
|
185 dnl |
5
|
186 AC_PROG_CC |
405
|
187 AC_PROG_CPP |
5
|
188 AC_GCC_TRADITIONAL |
369
|
189 dnl |
|
190 dnl Do special things for gcc. |
|
191 dnl |
405
|
192 ADD_CC_WALL=false |
|
193 gcc_version=`$CC -v 2>&1 | grep "^gcc version" | sed 's/^gcc version *//'` |
|
194 case "$gcc_version" in |
|
195 2.*) |
|
196 CFLAGS="-g -O" |
|
197 AC_VERBOSE([setting CFLAGS to $CFLAGS]) |
5
|
198 LDFLAGS="-g -O" |
405
|
199 AC_VERBOSE([setting LDFLAGS to $LDFLAGS]) |
|
200 ADD_CC_WALL=true |
|
201 ;; |
|
202 1.*) |
|
203 AC_WARN([gcc version $gcc_version is likely to cause problems]) |
|
204 ;; |
5
|
205 *) |
405
|
206 AC_WARN([Octave has only been tested with gcc, and I can't find it]) |
|
207 ;; |
5
|
208 esac |
405
|
209 dnl |
5
|
210 AC_SUBST(CFLAGS)dnl |
|
211 AC_SUBST(LDFLAGS)dnl |
369
|
212 dnl |
405
|
213 dnl On Linux systems we need to compile with -mieee-fp to get full |
|
214 dnl support for IEEE floating point. |
369
|
215 dnl |
350
|
216 case "$canonical_host_type" in |
|
217 i386-*-linux | i486-*-linux | i586-*-linux) |
|
218 GCC_IEEE_FP_FLAG="-mieee-fp" |
405
|
219 AC_VERBOSE([setting GCC_IEEE_FP_FLAG to $GCC_IEEE_FP_FLAG]) |
324
|
220 ;; |
|
221 esac |
405
|
222 dnl |
324
|
223 AC_SUBST(GCC_IEEE_FP_FLAG)dnl |
369
|
224 dnl |
405
|
225 dnl Special checks for odd OS specific things. |
|
226 dnl |
|
227 AC_ISC_POSIX |
|
228 AC_MINIX |
|
229 AC_AIX |
|
230 AC_DYNIX_SEQ |
|
231 AC_IRIX_SUN |
|
232 AC_SCO_INTL |
|
233 AC_XENIX_DIR |
|
234 dnl |
|
235 dnl Does the C compiler handle alloca() and const correctly? |
|
236 dnl |
|
237 AC_ALLOCA |
|
238 AC_CONST |
|
239 dnl |
369
|
240 dnl If we haven't been forced to use f2c, try to find a Fortran compiler |
|
241 dnl under any one of several common Un*x Fortran compiler names. |
|
242 dnl Put fc last to avoid confusion with some vendor's /bin/sh fc |
|
243 dnl builtin. |
|
244 dnl |
|
245 dnl xlf : IBM / AIX |
|
246 dnl cf77 : Cray / Unicos |
405
|
247 dnl g77 : GNU Fortran (someday...) |
369
|
248 dnl fc : Convex |
|
249 dnl |
|
250 dnl I don't think the Cray compiler will ever work like f2c... |
|
251 dnl |
5
|
252 if $use_f2c; then |
|
253 true |
|
254 else |
|
255 F77= |
405
|
256 AC_PROGRAMS_CHECK(F77, xlf cf77 f77 g77 fc)dnl |
5
|
257 |
|
258 # If it looks like we have a Fortran compiler, try to determine |
|
259 # whether it might be compatible with f2c. |
|
260 |
|
261 if test -n "$F77"; then |
405
|
262 AC_CHECKING([$F77/f2c compatibility]) |
5
|
263 export F77 |
|
264 export CC |
|
265 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh` |
|
266 status=$? |
|
267 if test $status -eq 0; then |
|
268 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then |
236
|
269 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)dnl |
5
|
270 fi |
|
271 else |
|
272 F77= |
|
273 fi |
|
274 fi |
|
275 fi |
369
|
276 dnl |
|
277 dnl If we can't find a Fortran compiler, or if it looks like it isn't |
|
278 dnl compatible with f2c, try to find f2c. |
|
279 dnl |
5
|
280 if test -z "$F77"; then |
|
281 AC_PROGRAM_CHECK(F2C, f2c, f2c, [])dnl |
|
282 fi |
369
|
283 dnl |
5
|
284 F2CFLAGS= |
405
|
285 AC_VERBOSE([setting F2CFLAGS to $F2CFLAGS]) |
5
|
286 FFLAGS="-O" |
405
|
287 AC_VERBOSE([setting FFLAGS to $FFLAGS]) |
5
|
288 if test -n "$F77"; then |
|
289 export F77 |
|
290 FLIBS=`sh $srcdir/flibs.sh` |
405
|
291 AC_VERBOSE([setting FLIBS to $FLIBS]) |
5
|
292 DOT_O_DOT_F_C1= |
|
293 DOT_O_DOT_F_C2= |
|
294 DOT_O_DOT_F_C3= |
|
295 DOT_O_DOT_F_C4= |
|
296 DEFAULT_DOT_C_FROM_DOT_F= |
|
297 DEFAULT_DOT_O_FROM_DOT_F= |
|
298 elif test -n "$F2C" || $use_f2c; then |
|
299 AC_HAVE_LIBRARY(f2c, FLIBS=-lf2c, [])dnl |
|
300 if test -z "$FLIBS" ; then |
|
301 AC_HAVE_LIBRARY(F77, FLIBS=-lF77, [])dnl |
|
302 if test -n "$FLIBS" ; then |
|
303 AC_HAVE_LIBRARY(I77, FLIBS="$FLIBS -lI77", [])dnl |
|
304 fi |
|
305 fi |
|
306 if test -z "$FLIBS" ; then |
405
|
307 AC_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) |
5
|
308 fi |
|
309 DEFAULT_DOT_C_FROM_DOT_F='# A rule for making C source from Fortran source.\ |
|
310 # If we are using f2c we should also turn off the default rule for\ |
|
311 # making objects from .f files so that we do not invoke the fortran\ |
|
312 # compiler by mistake.\ |
|
313 \ |
|
314 \%.c : \%.f\ |
|
315 cat $< | $(F2C) $(F2CFLAGS) > $(@F)' |
405
|
316 AC_VERBOSE([setting DEFAULT_DOT_C_FROM_DOT_F to $DEFAULT_DOT_C_FROM_DOT_F]) |
5
|
317 DEFAULT_DOT_O_FROM_DOT_F='\%.o : \%.f' |
405
|
318 AC_VERBOSE([setting DEFAULT_DOT_O_FROM_DOT_F to $DEFAULT_DOT_O_FROM_DOT_F]) |
236
|
319 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)dnl |
5
|
320 else |
405
|
321 AC_WARN([in order to build octave, you must have a compatible]) |
|
322 AC_WARN([Fortran compiler or f2c installed and in your path.]) |
|
323 AC_WARN([See the file INSTALL for more information.]) |
|
324 AC_WARN([Continuing anyway...]) |
5
|
325 fi |
369
|
326 dnl |
5
|
327 AC_SUBST(FFLAGS)dnl |
|
328 AC_SUBST(FLIBS)dnl |
|
329 AC_SUBST(F2C)dnl |
|
330 AC_SUBST(F2CFLAGS)dnl |
|
331 AC_SUBST(DEFAULT_DOT_C_FROM_DOT_F)dnl |
|
332 AC_SUBST(DEFAULT_DOT_O_FROM_DOT_F)dnl |
369
|
333 dnl |
405
|
334 dnl Checks for header files. |
|
335 dnl |
5
|
336 AC_STDC_HEADERS |
402
|
337 AC_HAVE_HEADERS(string.h varargs.h unistd.h floatingpoint.h)dnl |
|
338 AC_HAVE_HEADERS(sys/utsname.h sys/time.h sys/fcntl.h)dnl |
|
339 AC_HAVE_HEADERS(sys/ttold.h sys/ptem.h sys/select.h)dnl |
5
|
340 AC_DIR_HEADER |
369
|
341 dnl |
|
342 dnl Use sgtty on Ultrix so that using DEC Migrate to convert a Mips |
|
343 dnl binary to an Alpha binary will work. |
|
344 dnl |
294
|
345 case "$canonical_host_type" in |
|
346 mips-dec-ultrix*) |
405
|
347 AC_HEADER_CHECK(sgtty.h, AC_DEFINE(HAVE_SGTTY_H, 1), []) |
294
|
348 ;; |
|
349 esac |
369
|
350 dnl |
5
|
351 case "$DEFS" in |
294
|
352 *HAVE_SGTTY_H*) |
5
|
353 ;; |
|
354 *) |
294
|
355 AC_HEADER_CHECK(termios.h, AC_DEFINE(HAVE_TERMIOS_H, 1), |
|
356 AC_HEADER_CHECK(termio.h, AC_DEFINE(HAVE_TERMIO_H, 1), |
405
|
357 AC_HEADER_CHECK(sgtty.h, AC_DEFINE(HAVE_SGTTY_H, 1), []))) |
5
|
358 ;; |
|
359 esac |
405
|
360 case "$DEFS" in |
|
361 *HAVE_TERMIOS_H* | *HAVE_TERMIO_H* | *HAVE_SGTTY_H*) |
|
362 ;; |
|
363 *) |
|
364 AC_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) |
|
365 ;; |
|
366 esac |
|
367 dnl |
|
368 dnl Checks for functions. |
|
369 dnl |
|
370 AC_HAVE_FUNCS(setvbuf getcwd gethostname bzero rindex vfprintf vsprintf)dnl |
|
371 AC_HAVE_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror)dnl |
|
372 AC_HAVE_FUNCS(atexit on_exit)dnl |
369
|
373 dnl |
|
374 dnl Check to see if we have IEEE math functions, and if so, which ones. |
|
375 dnl |
|
376 dnl For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP |
|
377 dnl functions, otherwise we may not find them. |
|
378 dnl |
|
379 dnl Also just using AC_HAVE_FUNCS doesn't seem to work to find isinf |
|
380 dnl and isnan on Linux systems, so we use AC_FUNC_CHECK, and if that |
|
381 dnl fails, we try again by including math.h and invoking the function |
|
382 dnl with an argument. |
|
383 dnl |
|
384 dnl Also check for some additional trig functions that aren't ANSI but |
|
385 dnl are often available. If they are missing, we try to replace them |
|
386 dnl with functions from the BSD/NET2 math library. |
|
387 dnl |
28
|
388 AC_HAVE_LIBRARY(-lm)dnl |
405
|
389 dnl |
360
|
390 XCFLAGS="$CFLAGS" |
351
|
391 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG" |
369
|
392 for func in finite isnan isinf |
|
393 do |
|
394 trfunc=`echo $func | tr '[a-z]' '[A-Z]'` |
|
395 AC_FUNC_CHECK([$func], |
|
396 AC_DEFINE(HAVE_[$trfunc], 1), |
|
397 AC_COMPILE_CHECK([$func], [#include <math.h>], [ |
|
398 /* The GNU C library defines this for functions which it implements |
|
399 to always fail with ENOSYS. Some functions are actually named |
|
400 something starting with __ and the normal name is an alias. */ |
|
401 #if defined (__stub_$func) || defined (__stub___$func) |
|
402 choke me |
|
403 #else |
|
404 /* Override any gcc2 internal prototype to avoid an error. */ |
|
405 $func (1.0); |
|
406 #endif |
|
407 ], |
|
408 AC_DEFINE(HAVE_[$trfunc], 1), []))dnl |
|
409 done |
|
410 dnl |
468
|
411 AC_HAVE_FUNCS(infinity quiet_nan)dnl |
|
412 dnl |
360
|
413 CFLAGS="$XCFLAGS" |
405
|
414 dnl |
|
415 dnl Check for nonstandard but common trig functions that we need. |
|
416 dnl If they are missing, we replace them using functions from the BSD |
|
417 dnl math library, and we may need to replace some other functions too. |
|
418 dnl |
|
419 AC_REPLACE_FUNCS(acosh asinh atanh) |
369
|
420 dnl |
5
|
421 if test -n "$LIBOBJS"; then |
|
422 for func in $LIBOBJS |
|
423 do |
|
424 case "$func" in |
|
425 *acosh.o*) |
236
|
426 AC_DEFINE(ACOSH_MISSING, 1)dnl |
405
|
427 ;; |
5
|
428 *asinh.o*) |
236
|
429 AC_DEFINE(ASINH_MISSING, 1)dnl |
405
|
430 ;; |
5
|
431 *atanh.o*) |
236
|
432 AC_DEFINE(ATANH_MISSING, 1)dnl |
405
|
433 ;; |
5
|
434 esac |
|
435 done |
|
436 case $LIBOBJS in |
|
437 *acosh.o* | *asinh.o*) |
405
|
438 AC_REPLACE_FUNCS(copysign) |
|
439 ;; |
5
|
440 esac |
|
441 case $LIBOBJS in |
|
442 *acosh.o* | *asinh.o* | *atanh.o*) |
405
|
443 AC_REPLACE_FUNCS(log1p) |
|
444 ;; |
5
|
445 esac |
|
446 case $LIBOBJS in |
|
447 *log1p*) |
405
|
448 AC_REPLACE_FUNCS(log__L) |
|
449 ;; |
5
|
450 esac |
|
451 case $LIBOBJS in |
|
452 *log1p*) |
405
|
453 AC_REPLACE_FUNCS(finite) |
|
454 ;; |
5
|
455 esac |
|
456 case $LIBOBJS in |
|
457 *copysign* | *finite* | *log1p*) |
405
|
458 AC_REPLACE_FUNCS(logb scalb) |
|
459 ;; |
5
|
460 esac |
|
461 fi |
369
|
462 dnl |
405
|
463 dnl Checks for OS specific cruft. |
|
464 dnl |
|
465 AC_STRUCT_TM |
|
466 AC_SETVBUF_REVERSED |
|
467 TERMLIBS="" |
|
468 for termlib in termcap terminfo curses termlib ; do |
|
469 AC_HAVE_LIBRARY(${termlib}, [TERMLIBS="${TERMLIBS} -l${termlib}"]) |
|
470 case "${TERMLIBS}" in |
|
471 *-l${termlib}*) |
|
472 AC_VERBOSE([setting TERMLIBS to $TERMLIBS]) |
|
473 break |
|
474 ;; |
|
475 esac |
|
476 done |
|
477 AC_SUBST(TERMLIBS) |
|
478 dnl |
|
479 dnl Define VOID_SIGHANDLER for readline. |
|
480 dnl |
|
481 AC_RETSIGTYPE |
|
482 case "$RETSIGTYPE" in |
|
483 int) |
|
484 ;; |
|
485 *) |
|
486 VOID_SIGHANDLER="-DVOID_SIGHANDLER=1" |
|
487 AC_VERBOSE([defining VOID_SIGHANDLER to be 1]) |
|
488 ;; |
|
489 esac |
|
490 AC_SUBST(VOID_SIGHANDLER)dnl |
|
491 dnl |
|
492 dnl Checks for other programs used for building, testing, installing, |
|
493 dnl and running Octave. |
369
|
494 dnl |
405
|
495 dnl For now, don't define LEXLIB to be -lfl -- we don't use anything in |
|
496 dnl it, and it might not be installed. |
|
497 dnl |
|
498 dnl Also make sure that we generate an interactive scanner if we are |
|
499 dnl using flex. |
|
500 dnl |
|
501 AC_PROG_LEX |
|
502 case "$LEX" in |
|
503 flex*) |
|
504 LFLAGS="-t -I" |
|
505 AC_VERBOSE([setting LFLAGS to be $LFLAGS]) |
|
506 LEXLIB= |
|
507 ;; |
|
508 *) |
|
509 LFLAGS="-t" |
|
510 AC_VERBOSE([setting LFLAGS to be $LFLAGS]) |
|
511 AC_WARN([I didn't find flex, but that's only a problem]) |
|
512 AC_WARN([if you need to reconstruct lex.cc]) |
|
513 ;; |
|
514 esac |
|
515 AC_SUBST(LFLAGS)dnl |
|
516 dnl |
|
517 AC_PROG_YACC |
|
518 case "$YACC" in |
|
519 bison*) |
|
520 ;; |
|
521 *) |
|
522 AC_WARN([I didn't find bison, but that's only a problem]) |
|
523 AC_WARN([if you need to reconstruct parse.cc]) |
|
524 ;; |
|
525 esac |
|
526 dnl |
|
527 AC_PROG_RANLIB |
369
|
528 dnl |
5
|
529 AC_PROGRAM_CHECK(RUNTEST, runtest, runtest, [])dnl |
|
530 AC_PROGRAM_CHECK(EXPECT, expect, expect, [])dnl |
|
531 if test -z "$EXPECT" ; then |
|
532 RUNTEST= |
|
533 fi |
|
534 AC_SUBST(RUNTEST)dnl |
369
|
535 dnl |
405
|
536 AC_PROG_INSTALL |
|
537 dnl |
|
538 AC_PROGRAM_CHECK(GNUPLOT_BINARY, gnuplot, gnuplot, [])dnl |
|
539 if test -z "$GNUPLOT_BINARY"; then |
|
540 AC_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) |
|
541 AC_WARN([installed, but you won't be able to use any of Octave's]) |
|
542 AC_WARN([plotting commands without it.]) |
|
543 AC_WARN([]) |
|
544 AC_WARN([If gnuplot is installed but it isn't in your path, you can]) |
|
545 AC_WARN([tell Octave where to find it by typing the command]) |
|
546 AC_WARN([]) |
|
547 AC_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) |
|
548 AC_WARN([]) |
|
549 AC_WARN([at the Octave prompt.]) |
|
550 fi |
|
551 dnl |
|
552 AC_PROGRAMS_CHECK(DEFAULT_PAGER, less more page pg, [])dnl |
|
553 if test -z "$DEFAULT_PAGER"; then |
|
554 AC_WARN([I couldn't find `less', `more', `page', or `pg']) |
|
555 elif test "$DEFAULT_PAGER" = less; then |
|
556 DEFAULT_PAGER="less -e" |
|
557 AC_VERBOSE([setting DEFAULT_PAGER to be $DEFAULT_PAGER]) |
|
558 fi |
|
559 dnl |
|
560 dnl Even though we include config.h in most files, some need to be |
|
561 dnl compiled with the -D options on the compiler command line. Use |
|
562 dnl UGLY_DEFS for that. |
|
563 dnl |
236
|
564 UGLY_DEFS="$DEFS" |
405
|
565 AC_VERBOSE([setting UGLY_DEFS to be $UGLY_DEFS]) |
236
|
566 AC_SUBST(UGLY_DEFS)dnl |
369
|
567 dnl |
405
|
568 dnl Maybe add -Wall to compiler flags now that we're done feature |
|
569 dnl testing. |
|
570 dnl |
|
571 if $ADD_CXX_WALL; then |
|
572 CXXFLAGS="$CXXFLAGS -Wall" |
|
573 AC_VERBOSE([adding -Wall to CXXFLAGS]) |
|
574 fi |
|
575 if $ADD_CC_WALL; then |
|
576 CFLAGS="$CFLAGS -Wall" |
|
577 AC_VERBOSE([adding -Wall to CFLAGS]) |
|
578 fi |
|
579 dnl |
|
580 dnl Do the substitutions in all the Makefiles. |
|
581 dnl |
39
|
582 define([tmpa], [libcruft/blas/Makefile libcruft/balgen/Makefile])dnl |
80
|
583 define([tmpb], [libcruft/dassl/Makefile libcruft/eispack/Makefile])dnl |
|
584 define([tmpc], [libcruft/fftpack/Makefile libcruft/fsqp/Makefile])dnl |
|
585 define([tmpd], [libcruft/lapack/Makefile libcruft/linpack/Makefile])dnl |
|
586 define([tmpe], [libcruft/minpack/Makefile libcruft/misc/Makefile])dnl |
|
587 define([tmpf], [libcruft/npsol/Makefile libcruft/odepack/Makefile])dnl |
|
588 define([tmpg], [libcruft/qpsol/Makefile libcruft/quadpack/Makefile])dnl |
|
589 define([tmph], [libcruft/ranlib/Makefile libcruft/villad/Makefile])dnl |
5
|
590 define([cruftdirs], [tmpa tmpb tmpc tmpd tmpe tmpf tmpg tmph])dnl |
|
591 define([tmpA], [Makefile Makeconf libcruft/Makefile libcruft/Makerules])dnl |
179
|
592 define([tmpB], [liboctave/Makefile src/Makefile dld/Makefile])dnl |
|
593 define([tmpC], [info/Makefile readline/Makefile readline/doc/Makefile])dnl |
5
|
594 define([tmpD], [readline/examples/Makefile doc/Makefile])dnl |
|
595 define([tmpE], [scripts/Makefile test/Makefile])dnl |
196
|
596 define([srcdirs], [tmpA tmpB tmpC tmpD tmpE])dnl |
5
|
597 AC_OUTPUT([srcdirs cruftdirs])dnl |