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