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