comparison configure.in @ 869:05428c0044cc

[project @ 1994-11-02 16:26:12 by jwe]
author jwe
date Wed, 02 Nov 1994 16:26:12 +0000
parents 71e69f1b5be0
children f95973bfc664
comparison
equal deleted inserted replaced
868:3896bd1fdda4 869:05428c0044cc
2 dnl 2 dnl
3 dnl Process this file with autoconf to produce a configure script. 3 dnl Process this file with autoconf to produce a configure script.
4 dnl Requires GNU autoconf 1.8 or later. 4 dnl Requires GNU autoconf 1.8 or later.
5 dnl 5 dnl
6 dnl Copyright (C) 1992, 1993, 1994 John W. Eaton 6 dnl Copyright (C) 1992, 1993, 1994 John W. Eaton
7 dnl 7 ###
8 dnl This file is part of Octave. 8 ### This file is part of Octave.
9 dnl 9 ###
10 dnl Octave is free software; you can redistribute it and/or modify it 10 ### 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 11 ### 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 12 ### Free Software Foundation; either version 2, or (at your option) any
13 dnl later version. 13 ### later version.
14 dnl 14 ###
15 dnl Octave is distributed in the hope that it will be useful, but WITHOUT 15 ### 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 16 ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 dnl for more details. 18 ### for more details.
19 dnl 19 ###
20 dnl You should have received a copy of the GNU General Public License 20 ### 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 21 ### along with Octave; see the file COPYING. If not, write to the Free
22 dnl Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 dnl 23
24 AC_REVISION($Revision: 1.69 $)dnl 24 AC_REVISION($Revision: 1.70 $)
25 AC_PREREQ(2.0) 25 AC_PREREQ(2.0)
26 AC_INIT(src/octave.cc) 26 AC_INIT(src/octave.cc)
27 AC_CONFIG_HEADER(config.h kpathsea/c-auto.h) 27 AC_CONFIG_HEADER(config.h kpathsea/c-auto.h)
28 dnl 28
29 AC_DEFINE(OCTAVE_SOURCE, 1)dnl 29 AC_DEFINE(OCTAVE_SOURCE, 1)
30 dnl 30
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.
33 dnl
34 AC_CANONICAL_HOST 31 AC_CANONICAL_HOST
35 target_host_type=${host:=unknown} 32 target_host_type=${host:=unknown}
36 canonical_host_type=${host:=unknown} 33 canonical_host_type=${host:=unknown}
37 if test "$host" = "unknown"; then 34 if test "$host" = "unknown"; then
38 AC_MSG_WARN([configuring Octave for unknown system type 35 AC_MSG_WARN([configuring Octave for unknown system type
39 ]) 36 ])
40 fi 37 fi
41 AC_SUBST(target_host_type)dnl 38 AC_SUBST(target_host_type)
42 dnl 39
43 dnl Allow the user to force us to use f2c. 40 ### Allow the user to force us to use f2c.
44 dnl 41
45 AC_ARG_WITH(f2c, 42 AC_ARG_WITH(f2c,
46 [ --with-f2c use f2c even if Fortran compiler is available], 43 [ --with-f2c use f2c even if Fortran compiler is available],
47 use_f2c=true, use_f2c=false)dnl 44 use_f2c=true, use_f2c=false)
48 dnl 45
49 dnl Allow the user to experiment with dynamic linking using GNU dld. 46 ### Allow the user to experiment with dynamic linking using GNU dld.
50 dnl 47
51 AC_ARG_ENABLE(dld, 48 AC_ARG_ENABLE(dld,
52 [ --enable-dld use DLD for dynamic linking (not all systems)], 49 [ --enable-dld use DLD for dynamic linking (not all systems)],
53 use_dld=true, use_dld=false)dnl 50 use_dld=true, use_dld=false)
54 AC_SUBST(use_dld)dnl 51 AC_SUBST(use_dld)
55 dnl 52
56 dnl Allow compilation of smaller kernel. This only works if some form 53 ### Allow compilation of smaller kernel. This only works if some form
57 dnl of dynamic linking is also supported and used. 54 ### of dynamic linking is also supported and used.
58 dnl 55
59 AC_ARG_ENABLE(lite-kernel, 56 AC_ARG_ENABLE(lite-kernel,
60 [ --enable-lite-kernel compile smaller kernel (requires DLD)], 57 [ --enable-lite-kernel compile smaller kernel (requires DLD)],
61 lite_kernel=true, lite_kernel=false)dnl 58 lite_kernel=true, lite_kernel=false)
62 if $lite_kernel; then 59 if $lite_kernel; then
63 AC_DEFINE(OCTAVE_LITE, 1)dnl 60 AC_DEFINE(OCTAVE_LITE, 1)
64 fi 61 fi
65 AC_SUBST(lite_kernel)dnl 62 AC_SUBST(lite_kernel)
66 dnl 63
67 dnl some defaults 64 ### some defaults
68 dnl 65
69 AC_PREFIX_DEFAULT(/usr/local) 66 AC_PREFIX_DEFAULT(/usr/local)
70 dnl 67
71 exec_prefix='$(prefix)' 68 exec_prefix='$(prefix)'
72 bindir='$(exec_prefix)/bin' 69 bindir='$(exec_prefix)/bin'
73 datadir='$(prefix)/lib' 70 datadir='$(prefix)/lib'
74 libdir='$(exec_prefix)/lib' 71 libdir='$(exec_prefix)/lib'
75 includedir='$(prefix)/include/octave' 72 includedir='$(prefix)/include/octave'
83 localoctfiledir='$(datadir)/octave/site/oct/$(target_host_type)' 80 localoctfiledir='$(datadir)/octave/site/oct/$(target_host_type)'
84 localoctfilepath='$(localoctfiledir)//' 81 localoctfilepath='$(localoctfiledir)//'
85 fcnfilepath='.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//' 82 fcnfilepath='.:$(localoctfilepath):$(localfcnfilepath):$(octfiledir)//:$(fcnfiledir)//'
86 imagedir='$(datadir)/octave/$(version)/imagelib' 83 imagedir='$(datadir)/octave/$(version)/imagelib'
87 imagepath='.:$(imagedir)//' 84 imagepath='.:$(imagedir)//'
88 dnl 85
89 AC_MSG_RESULT([defining prefix to be $prefix]) 86 AC_MSG_RESULT([defining prefix to be $prefix])
90 AC_MSG_RESULT([defining exec_prefix to be $exec_prefix]) 87 AC_MSG_RESULT([defining exec_prefix to be $exec_prefix])
91 AC_MSG_RESULT([defining bindir to be $bindir]) 88 AC_MSG_RESULT([defining bindir to be $bindir])
92 AC_MSG_RESULT([defining datadir to be $datadir]) 89 AC_MSG_RESULT([defining datadir to be $datadir])
93 AC_MSG_RESULT([defining libdir to be $libdir]) 90 AC_MSG_RESULT([defining libdir to be $libdir])
119 AC_SUBST(localoctfiledir) 116 AC_SUBST(localoctfiledir)
120 AC_SUBST(localoctfilepath) 117 AC_SUBST(localoctfilepath)
121 AC_SUBST(fcnfilepath) 118 AC_SUBST(fcnfilepath)
122 AC_SUBST(imagedir) 119 AC_SUBST(imagedir)
123 AC_SUBST(imagepath) 120 AC_SUBST(imagepath)
124 dnl 121
125 dnl Do special stuff if using dld. 122 ### Do special stuff if using dld.
126 dnl 123
127 DLD_DIR= 124 DLD_DIR=
128 LIBDLD= 125 LIBDLD=
129 LIBOCTDLD='liboctdld.a' 126 LIBOCTDLD='liboctdld.a'
130 LD_STATIC_FLAG= 127 LD_STATIC_FLAG=
131 if $use_dld; then 128 if $use_dld; then
135 # requested. 132 # requested.
136 if $lite_kernel; then 133 if $lite_kernel; then
137 LIBOCTDLD= 134 LIBOCTDLD=
138 fi 135 fi
139 LD_STATIC_FLAG=-static 136 LD_STATIC_FLAG=-static
140 AC_DEFINE(WITH_DLD, 1)dnl 137 AC_DEFINE(WITH_DLD, 1)
141 fi 138 fi
142 dnl 139
143 dnl Also use -static if compiling on Alpha OSF/1 1.3 systems. 140 ### Also use -static if compiling on Alpha OSF/1 1.3 systems.
144 dnl 141
145 case "$canonical_host_type" in 142 case "$canonical_host_type" in
146 alpha-dec-osf1.3) 143 alpha-dec-osf1.3)
147 LD_STATIC_FLAG=-static 144 LD_STATIC_FLAG=-static
148 ;; 145 ;;
149 esac 146 esac
150 dnl 147
151 if test -n "$DLD_DIR"; then 148 if test -n "$DLD_DIR"; then
152 AC_MSG_RESULT([defining DLD_DIR to be $DLD_DIR]) 149 AC_MSG_RESULT([defining DLD_DIR to be $DLD_DIR])
153 fi 150 fi
154 if test -n "$LIBDLD"; then 151 if test -n "$LIBDLD"; then
155 AC_MSG_RESULT([defining LIBDLD to be $LIBDLD]) 152 AC_MSG_RESULT([defining LIBDLD to be $LIBDLD])
158 AC_MSG_RESULT([defining LIBOCTDLD to be $LIBOCTDLD]) 155 AC_MSG_RESULT([defining LIBOCTDLD to be $LIBOCTDLD])
159 fi 156 fi
160 if test -n "$LD_STATIC_FLAG"; then 157 if test -n "$LD_STATIC_FLAG"; then
161 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG]) 158 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG])
162 fi 159 fi
163 AC_SUBST(DLD_DIR)dnl 160 AC_SUBST(DLD_DIR)
164 AC_SUBST(LIBDLD)dnl 161 AC_SUBST(LIBDLD)
165 AC_SUBST(LIBOCTDLD)dnl 162 AC_SUBST(LIBOCTDLD)
166 AC_SUBST(LD_STATIC_FLAG)dnl 163 AC_SUBST(LD_STATIC_FLAG)
167 dnl 164
168 dnl See if the optional nonlinear programming code is present. 165 ### See if the optional nonlinear programming code is present.
169 dnl 166
170 AC_MSG_CHECKING([for npsol]) 167 AC_MSG_CHECKING([for npsol])
171 if test -f $srcdir/libcruft/npsol/npsol.f; then 168 if test -f $srcdir/libcruft/npsol/npsol.f; then
172 AC_MSG_RESULT([yes]) 169 AC_MSG_RESULT([yes])
173 else 170 else
174 AC_MSG_RESULT([no]) 171 AC_MSG_RESULT([no])
175 AC_DEFINE(NPSOL_MISSING, 1)dnl 172 AC_DEFINE(NPSOL_MISSING, 1)
176 fi 173 fi
177 dnl 174
178 AC_MSG_CHECKING([for qpsol]) 175 AC_MSG_CHECKING([for qpsol])
179 if test -f $srcdir/libcruft/qpsol/qpsol.f; then 176 if test -f $srcdir/libcruft/qpsol/qpsol.f; then
180 AC_MSG_RESULT([yes]) 177 AC_MSG_RESULT([yes])
181 else 178 else
182 AC_MSG_RESULT([no]) 179 AC_MSG_RESULT([no])
183 AC_DEFINE(QPSOL_MISSING, 1)dnl 180 AC_DEFINE(QPSOL_MISSING, 1)
184 fi 181 fi
185 dnl 182
186 AC_MSG_CHECKING([for fsqp]) 183 AC_MSG_CHECKING([for fsqp])
187 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then 184 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then
188 AC_MSG_RESULT([yes]) 185 AC_MSG_RESULT([yes])
189 else 186 else
190 AC_MSG_RESULT([no]) 187 AC_MSG_RESULT([no])
191 AC_DEFINE(FSQP_MISSING, 1)dnl 188 AC_DEFINE(FSQP_MISSING, 1)
192 fi 189 fi
193 dnl 190
194 dnl See which C++ compiler to use (we expect to find g++). 191 ### See which C++ compiler to use (we expect to find g++).
195 dnl 192
196 AC_PROG_CXX 193 AC_PROG_CXX
197 AC_PROG_CXXCPP 194 AC_PROG_CXXCPP
198 dnl 195
199 dnl Do special things for g++. 196 ### Do special things for g++.
200 dnl 197
201 ADD_CXX_WALL=false 198 ADD_CXX_WALL=false
202 NO_IMPLICIT_TEMPLATES= 199 NO_IMPLICIT_TEMPLATES=
203 gxx_version=`$CXX -v 2>&1 | grep "^g.. version" | sed 's/^g.. version *//'` 200 gxx_version=`$CXX -v 2>&1 | grep "^g.. version" | sed 's/^g.. version *//'`
204 case "$gxx_version" in 201 case "$gxx_version" in
205 changequote(,)dnl 202 changequote(,)dnl
218 ;; 215 ;;
219 *) 216 *)
220 AC_MSG_WARN([Octave has only been tested with g++, and I can't find it]) 217 AC_MSG_WARN([Octave has only been tested with g++, and I can't find it])
221 ;; 218 ;;
222 esac 219 esac
223 dnl 220
224 dnl See what libraries are used by the C++ compiler. Need this for 221 ### See what libraries are used by the C++ compiler. Need this for
225 dnl dynamic linking. 222 ### dynamic linking.
226 dnl 223
227 CXXLIBS=`sh $srcdir/cxxlibs.sh` 224 CXXLIBS=`sh $srcdir/cxxlibs.sh`
228 AC_MSG_RESULT([defining CXXLIBS to be $CXXLIBS]) 225 AC_MSG_RESULT([defining CXXLIBS to be $CXXLIBS])
229 dnl 226
230 AC_SUBST(CXXFLAGS)dnl 227 AC_SUBST(CXXFLAGS)
231 AC_SUBST(NO_IMPLICIT_TEMPLATES)dnl 228 AC_SUBST(NO_IMPLICIT_TEMPLATES)
232 AC_SUBST(CXXLIBS)dnl 229 AC_SUBST(CXXLIBS)
233 dnl 230
234 dnl See which C compiler to use (we expect to find gcc). 231 ### See which C compiler to use (we expect to find gcc).
235 dnl 232
236 AC_PROG_CC 233 AC_PROG_CC
237 AC_PROG_CPP 234 AC_PROG_CPP
238 AC_PROG_GCC_TRADITIONAL 235 AC_PROG_GCC_TRADITIONAL
239 dnl 236
240 dnl Do special things for gcc. 237 ### Do special things for gcc.
241 dnl 238
242 ADD_CC_WALL=false 239 ADD_CC_WALL=false
243 gcc_version=`$CC -v 2>&1 | grep "^gcc version" | sed 's/^gcc version *//'` 240 gcc_version=`$CC -v 2>&1 | grep "^gcc version" | sed 's/^gcc version *//'`
244 case "$gcc_version" in 241 case "$gcc_version" in
245 2.*) 242 2.*)
246 CFLAGS="-g -O" 243 CFLAGS="-g -O"
254 ;; 251 ;;
255 *) 252 *)
256 AC_MSG_WARN([Octave has only been tested with gcc, and I can't find it]) 253 AC_MSG_WARN([Octave has only been tested with gcc, and I can't find it])
257 ;; 254 ;;
258 esac 255 esac
259 dnl 256
260 AC_SUBST(CFLAGS)dnl 257 AC_SUBST(CFLAGS)
261 AC_SUBST(LDFLAGS)dnl 258 AC_SUBST(LDFLAGS)
262 dnl 259
263 dnl On Linux systems we need to compile with -mieee-fp to get full 260 ### On Linux systems we need to compile with -mieee-fp to get full
264 dnl support for IEEE floating point. 261 ### support for IEEE floating point.
265 dnl 262
266 case "$canonical_host_type" in 263 case "$canonical_host_type" in
267 i386-*-linux | i486-*-linux | i586-*-linux) 264 i386-*-linux | i486-*-linux | i586-*-linux)
268 GCC_IEEE_FP_FLAG="-mieee-fp" 265 GCC_IEEE_FP_FLAG="-mieee-fp"
269 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) 266 AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG])
270 ;; 267 ;;
271 esac 268 esac
272 dnl 269
273 AC_SUBST(GCC_IEEE_FP_FLAG)dnl 270 AC_SUBST(GCC_IEEE_FP_FLAG)
274 dnl 271
275 dnl Special checks for odd OS specific things. 272 ### Special checks for odd OS specific things.
276 dnl 273
277 AC_ISC_POSIX 274 AC_ISC_POSIX
278 AC_MINIX 275 AC_MINIX
279 AC_AIX 276 AC_AIX
280 AC_FUNC_STRFTIME 277 AC_FUNC_STRFTIME
281 AC_CHECK_LIB(sun, getpwnam) 278 AC_CHECK_LIB(sun, getpwnam)
282 dnl 279
283 dnl How big are ints and how are they oriented? These could probably 280 ### How big are ints and how are they oriented? These could probably
284 dnl be eliminated in favor of run-time checks. 281 ### be eliminated in favor of run-time checks.
285 dnl 282
286 AC_CHECK_SIZEOF(short) 283 AC_CHECK_SIZEOF(short)
287 AC_CHECK_SIZEOF(int) 284 AC_CHECK_SIZEOF(int)
288 AC_CHECK_SIZEOF(long) 285 AC_CHECK_SIZEOF(long)
289 AC_C_BIGENDIAN 286 AC_C_BIGENDIAN
290 dnl 287
291 dnl Try to determine the floating point format. This could probably 288 ### Try to determine the floating point format. This could probably
292 dnl be eliminated in favor of run-time checks. 289 ### be eliminated in favor of run-time checks.
293 dnl 290
294 AC_MSG_CHECKING([floating point format]) 291 AC_MSG_CHECKING([floating point format])
295 changequote(,)dnl 292 changequote(,)dnl
296 XCFLAGS=`echo $CFLAGS | sed 's/-O[^ \t]*//'` 293 XCFLAGS=`echo $CFLAGS | sed 's/-O[^ \t]*//'`
297 changequote([,])dnl 294 changequote([,])dnl
298 ${CC-cc} -DDP $XCFLAGS $LDFLAGS $srcdir/float-type.c -o conftest >/dev/null 2>&1 295 ${CC-cc} -DDP $XCFLAGS $LDFLAGS $srcdir/float-type.c -o conftest >/dev/null 2>&1
299 FLOAT_FORMAT=`./conftest` 296 FLOAT_FORMAT=`./conftest`
300 case "$FLOAT_FORMAT" in 297 case "$FLOAT_FORMAT" in
301 IEEE_BIG_ENDIAN) 298 IEEE_BIG_ENDIAN)
302 AC_MSG_RESULT([IEEE big endian]) 299 AC_MSG_RESULT([IEEE big endian])
303 AC_DEFINE(IEEE_BIG_ENDIAN, 1)dnl 300 AC_DEFINE(IEEE_BIG_ENDIAN, 1)
304 ;; 301 ;;
305 IEEE_LITTLE_ENDIAN) 302 IEEE_LITTLE_ENDIAN)
306 AC_MSG_RESULT([IEEE little endian]) 303 AC_MSG_RESULT([IEEE little endian])
307 AC_DEFINE(IEEE_LITTLE_ENDIAN, 1)dnl 304 AC_DEFINE(IEEE_LITTLE_ENDIAN, 1)
308 ;; 305 ;;
309 VAX_D_FLOAT) 306 VAX_D_FLOAT)
310 AC_MSG_RESULT([VAX D floating]) 307 AC_MSG_RESULT([VAX D floating])
311 AC_DEFINE(VAX_D_FLOAT, 1)dnl 308 AC_DEFINE(VAX_D_FLOAT, 1)
312 ;; 309 ;;
313 VAX_G_FLOAT) 310 VAX_G_FLOAT)
314 AC_MSG_RESULT([VAX G floating]) 311 AC_MSG_RESULT([VAX G floating])
315 AC_DEFINE(VAX_G_FLOAT, 1)dnl 312 AC_DEFINE(VAX_G_FLOAT, 1)
316 ;; 313 ;;
317 *) 314 *)
318 AC_MSG_RESULT() 315 AC_MSG_RESULT()
319 AC_MSG_WARN("unrecognized floating point format!") 316 AC_MSG_WARN("unrecognized floating point format!")
320 ;; 317 ;;
321 esac 318 esac
322 dnl 319
323 dnl Does the C compiler handle alloca() and const correctly? 320 ### Does the C compiler handle alloca() and const correctly?
324 dnl 321
325 AC_ALLOCA 322 AC_ALLOCA
326 dnl 323
327 dnl This one is for kpathsea. 324 ### This one is for kpathsea.
328 dnl 325 ###
329 dnl It would be nicer to test for the requisite putenv features directly, 326 ### It would be nicer to test for the requisite putenv features directly,
330 dnl but can't figure out how to do that. 327 ### but can't figure out how to do that.
331 dnl 328
332 if test "`(uname) 2>/dev/null`" = NetBSD \ 329 if test "`(uname) 2>/dev/null`" = NetBSD \
333 || test "`(uname) 2>/dev/null`" = FreeBSD; then 330 || test "`(uname) 2>/dev/null`" = FreeBSD; then
334 AC_DEFINE(SMART_PUTENV) 331 AC_DEFINE(SMART_PUTENV)
335 fi 332 fi
336 dnl 333
337 AC_C_CONST 334 AC_C_CONST
338 dnl 335
339 dnl If we haven't been forced to use f2c, try to find a Fortran compiler 336 ### If we haven't been forced to use f2c, try to find a Fortran compiler
340 dnl under any one of several common Un*x Fortran compiler names. 337 ### under any one of several common Un*x Fortran compiler names.
341 dnl Put fc last to avoid confusion with some vendor's /bin/sh fc 338 ### Put fc last to avoid confusion with some vendor's /bin/sh fc
342 dnl builtin. 339 ### builtin.
343 dnl 340 ###
344 dnl xlf : IBM / AIX 341 ### xlf : IBM / AIX
345 dnl cf77 : Cray / Unicos 342 ### cf77 : Cray / Unicos
346 dnl g77 : GNU Fortran (someday...) 343 ### g77 : GNU Fortran (someday...)
347 dnl fc : Convex 344 ### fc : Convex
348 dnl 345 ###
349 dnl I don't think the Cray compiler will ever work like f2c... 346 ### I don't think the Cray compiler will ever work like f2c...
350 dnl 347
351 if $use_f2c; then 348 if $use_f2c; then
352 true 349 true
353 else 350 else
354 F77= 351 F77=
355 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc)dnl 352 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc)
356 353
357 # If it looks like we have a Fortran compiler, try to determine 354 # If it looks like we have a Fortran compiler, try to determine
358 # whether it might be compatible with f2c. 355 # whether it might be compatible with f2c.
359 356
360 if test -n "$F77"; then 357 if test -n "$F77"; then
364 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh` 361 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh`
365 status=$? 362 status=$?
366 if test $status -eq 0; then 363 if test $status -eq 0; then
367 AC_MSG_RESULT([yes]) 364 AC_MSG_RESULT([yes])
368 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then 365 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then
369 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)dnl 366 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)
370 fi 367 fi
371 else 368 else
372 AC_MSG_RESULT([no]) 369 AC_MSG_RESULT([no])
373 F77= 370 F77=
374 fi 371 fi
375 fi 372 fi
376 fi 373 fi
377 dnl 374
378 dnl If we can't find a Fortran compiler, or if it looks like it isn't 375 ### If we can't find a Fortran compiler, or if it looks like it isn't
379 dnl compatible with f2c, try to find f2c. 376 ### compatible with f2c, try to find f2c.
380 dnl 377
381 if test -z "$F77"; then 378 if test -z "$F77"; then
382 AC_CHECK_PROG(F2C, f2c, f2c, [])dnl 379 AC_CHECK_PROG(F2C, f2c, f2c, [])
383 fi 380 fi
384 dnl 381
385 F2CFLAGS= 382 F2CFLAGS=
386 FFLAGS="-O" 383 FFLAGS="-O"
387 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) 384 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS])
388 if test -n "$F77"; then 385 if test -n "$F77"; then
389 export F77 386 export F77
394 DOT_O_DOT_F_C3= 391 DOT_O_DOT_F_C3=
395 DOT_O_DOT_F_C4= 392 DOT_O_DOT_F_C4=
396 DEFAULT_DOT_C_FROM_DOT_F= 393 DEFAULT_DOT_C_FROM_DOT_F=
397 DEFAULT_DOT_O_FROM_DOT_F= 394 DEFAULT_DOT_O_FROM_DOT_F=
398 elif test -n "$F2C" || $use_f2c; then 395 elif test -n "$F2C" || $use_f2c; then
399 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, [])dnl 396 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, [])
400 if test -z "$FLIBS" ; then 397 if test -z "$FLIBS" ; then
401 AC_CHECK_LIB(F77, main, FLIBS=-lF77, [])dnl 398 AC_CHECK_LIB(F77, main, FLIBS=-lF77, [])
402 if test -n "$FLIBS" ; then 399 if test -n "$FLIBS" ; then
403 AC_CHECK_LIB(I77, main, FLIBS="$FLIBS -lI77", [])dnl 400 AC_CHECK_LIB(I77, main, FLIBS="$FLIBS -lI77", [])
404 fi 401 fi
405 fi 402 fi
406 if test -z "$FLIBS" ; then 403 if test -z "$FLIBS" ; then
407 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) 404 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a])
408 fi 405 fi
414 \%.c : \%.f\ 411 \%.c : \%.f\
415 cat $< | $(F2C) $(F2CFLAGS) > $(@F)' 412 cat $< | $(F2C) $(F2CFLAGS) > $(@F)'
416 AC_MSG_RESULT([defining DEFAULT_DOT_C_FROM_DOT_F to be $DEFAULT_DOT_C_FROM_DOT_F]) 413 AC_MSG_RESULT([defining DEFAULT_DOT_C_FROM_DOT_F to be $DEFAULT_DOT_C_FROM_DOT_F])
417 DEFAULT_DOT_O_FROM_DOT_F='\%.o : \%.f' 414 DEFAULT_DOT_O_FROM_DOT_F='\%.o : \%.f'
418 AC_MSG_RESULT([defining DEFAULT_DOT_O_FROM_DOT_F to be $DEFAULT_DOT_O_FROM_DOT_F]) 415 AC_MSG_RESULT([defining DEFAULT_DOT_O_FROM_DOT_F to be $DEFAULT_DOT_O_FROM_DOT_F])
419 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)dnl 416 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)
420 else 417 else
421 AC_MSG_WARN([in order to build octave, you must have a compatible]) 418 AC_MSG_WARN([in order to build octave, you must have a compatible])
422 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) 419 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.])
423 AC_MSG_WARN([See the file INSTALL for more information.]) 420 AC_MSG_WARN([See the file INSTALL for more information.])
424 AC_MSG_WARN([Continuing anyway...]) 421 AC_MSG_WARN([Continuing anyway...])
425 fi 422 fi
426 dnl 423
427 AC_SUBST(F77)dnl 424 AC_SUBST(F77)
428 AC_SUBST(FFLAGS)dnl 425 AC_SUBST(FFLAGS)
429 AC_SUBST(FLIBS)dnl 426 AC_SUBST(FLIBS)
430 AC_SUBST(F2C)dnl 427 AC_SUBST(F2C)
431 AC_SUBST(F2CFLAGS)dnl 428 AC_SUBST(F2CFLAGS)
432 AC_SUBST(DEFAULT_DOT_C_FROM_DOT_F)dnl 429 AC_SUBST(DEFAULT_DOT_C_FROM_DOT_F)
433 AC_SUBST(DEFAULT_DOT_O_FROM_DOT_F)dnl 430 AC_SUBST(DEFAULT_DOT_O_FROM_DOT_F)
434 dnl 431
435 dnl Extract libraries and directories from FLIBS and CXXLIBS. 432 ### Extract libraries and directories from FLIBS and CXXLIBS.
436 dnl 433 ###
437 dnl Leave only libraries, with -lfoo converted to libfoo.a: 434 ### Leave only libraries, with -lfoo converted to libfoo.a:
438 dnl 435
439 changequote(,)dnl 436 changequote(,)dnl
440 FLIB_LIST=`echo " $FLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ 437 FLIB_LIST=`echo " $FLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
441 -e 's/ -L *[^ ]*/ /g' \ 438 -e 's/ -L *[^ ]*/ /g' \
442 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \ 439 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \
443 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` 440 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'`
444 dnl 441
445 CXXLIB_LIST=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ 442 CXXLIB_LIST=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
446 -e 's/ -L *[^ ]*/ /g' \ 443 -e 's/ -L *[^ ]*/ /g' \
447 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \ 444 -e 's/ -l *\([^ ]*\)/ lib\1.a/g' -e 's/ -u *[^ ]*/ /g' \
448 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'` 445 -e 's/^ *//' -e 's/ *$//' -e 's/ */:/g'`
449 dnl 446
450 dnl Leave only directories where libraries might be found: 447 ### Leave only directories where libraries might be found:
451 dnl 448
452 FLIB_PATH=`echo " $FLIBS " | sed \ 449 FLIB_PATH=`echo " $FLIBS " | sed \
453 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \ 450 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \
454 -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \ 451 -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \
455 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' -e 's/^ *//' \ 452 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' -e 's/^ *//' \
456 -e 's/ *$//' -e 's/ */:/g'` 453 -e 's/ *$//' -e 's/ */:/g'`
457 dnl 454
458 CXXLIB_PATH=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \ 455 CXXLIB_PATH=`echo " $CXXLIBS " | sed -e 's/ -Xlinker *[^ ]*/ /g' \
459 -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \ 456 -e 's/ -L *\([^ ]*\)/ \1/g' -e 's, /[^ ]*\.a , ,g' \
460 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \ 457 -e 's/ / /g' -e 's/ -Xlinker *[^ ]*/ /g' \
461 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' -e 's/^ *//' \ 458 -e 's/ -l *[^ ]*/ /g' -e 's/ -u *[^ ]*/ /g' -e 's/^ *//' \
462 -e 's/ *$//' -e 's/ */:/g'` 459 -e 's/ *$//' -e 's/ */:/g'`
463 changequote([,])dnl 460 changequote([,])dnl
464 dnl 461
465 AC_MSG_RESULT([defining FLIB_LIST to be $FLIB_LIST]) 462 AC_MSG_RESULT([defining FLIB_LIST to be $FLIB_LIST])
466 AC_MSG_RESULT([defining FLIB_PATH to be $FLIB_PATH]) 463 AC_MSG_RESULT([defining FLIB_PATH to be $FLIB_PATH])
467 dnl 464
468 AC_MSG_RESULT([defining CXXLIB_LIST to be $CXXLIB_LIST]) 465 AC_MSG_RESULT([defining CXXLIB_LIST to be $CXXLIB_LIST])
469 AC_MSG_RESULT([defining CXXLIB_PATH to be $CXXLIB_PATH]) 466 AC_MSG_RESULT([defining CXXLIB_PATH to be $CXXLIB_PATH])
470 dnl 467
471 AC_SUBST(FLIB_LIST)dnl 468 AC_SUBST(FLIB_LIST)
472 AC_SUBST(FLIB_PATH)dnl 469 AC_SUBST(FLIB_PATH)
473 dnl 470
474 AC_SUBST(CXXLIB_LIST)dnl 471 AC_SUBST(CXXLIB_LIST)
475 AC_SUBST(CXXLIB_PATH)dnl 472 AC_SUBST(CXXLIB_PATH)
476 dnl 473
477 dnl Checks for header files. 474 ### Checks for header files.
478 dnl 475
479 AC_HEADER_STDC 476 AC_HEADER_STDC
480 AC_CHECK_HEADERS(assert.h float.h limits.h memory.h pwd.h stdlib.h)dnl 477 AC_CHECK_HEADERS(assert.h float.h limits.h memory.h pwd.h stdlib.h)
481 AC_CHECK_HEADERS(string.h varargs.h unistd.h floatingpoint.h)dnl 478 AC_CHECK_HEADERS(string.h varargs.h unistd.h floatingpoint.h)
482 AC_CHECK_HEADERS(sys/utsname.h sys/time.h sys/fcntl.h)dnl 479 AC_CHECK_HEADERS(sys/utsname.h sys/time.h sys/fcntl.h)
483 AC_CHECK_HEADERS(sys/ttold.h sys/ptem.h sys/select.h)dnl 480 AC_CHECK_HEADERS(sys/ttold.h sys/ptem.h sys/select.h)
484 AC_HEADER_DIRENT 481 AC_HEADER_DIRENT
485 AC_TIME_WITH_SYS_TIME 482 AC_TIME_WITH_SYS_TIME
486 dnl 483
487 dnl Use sgtty on Ultrix so that using DEC Migrate to convert a Mips 484 ### Use sgtty on Ultrix so that using DEC Migrate to convert a Mips
488 dnl binary to an Alpha binary will work. Also on Alpha/OSF to avoid 485 ### binary to an Alpha binary will work. Also on Alpha/OSF to avoid
489 dnl a readline bug. 486 ### a readline bug.
490 dnl 487
491 OCTAVE_HAVE_TERM_HEADER=false
492 case "$canonical_host_type" in 488 case "$canonical_host_type" in
493 mips-dec-ultrix* | alpha-dec-osf*) 489 mips-dec-ultrix* | alpha-dec-osf*)
494 AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H, 1) 490 AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H, 1)], [])
495 OCTAVE_HAVE_TERM_HEADER=true], []) 491
496 ;; 492 if test "$ac_cv_header_sgtty_h" = no; then
497 esac 493 AC_CHECK_HEADERS(termios.h termio.h sgtty.h, [break], [])
498 dnl 494 fi
499 if $OCTAVE_HAVE_TERM_HEADER; then 495 ;;
500 true 496 *)
501 else 497 AC_CHECK_HEADERS(termios.h termio.h sgtty.h, [break], [])
502 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS_H, 1) 498 ;;
503 OCTAVE_HAVE_TERM_HEADER=true], 499 esac
504 AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO_H, 1) 500
505 OCTAVE_HAVE_TERM_HEADER=true], 501 if test "$ac_cv_header_termios_h" = yes \
506 AC_CHECK_HEADER(sgtty.h, [AC_DEFINE(HAVE_SGTTY_H, 1) 502 || test "$ac_cv_header_termio_h" = yes \
507 OCTAVE_HAVE_TERM_HEADER=true], []))) 503 || test "$ac_cv_header_sgtty_h" = yes; then
508 fi
509 if $OCTAVE_HAVE_TERM_HEADER; then
510 true 504 true
511 else 505 else
512 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!]) 506 AC_MSG_ERROR([I couldn't find termios.h, termio.h, or sgtty.h!])
513 fi 507 fi
514 dnl 508
515 dnl Checks for functions. 509 ### Checks for functions.
516 dnl 510
517 AC_CHECK_FUNCS(setvbuf getcwd gethostname bzero rindex vfprintf vsprintf)dnl 511 AC_CHECK_FUNCS(setvbuf getcwd gethostname bzero rindex vfprintf vsprintf)
518 AC_CHECK_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror)dnl 512 AC_CHECK_FUNCS(stricmp strnicmp strcasecmp strncasecmp strerror)
519 AC_CHECK_FUNCS(atexit on_exit tempnam memmove putenv gettimeofday)dnl 513 AC_CHECK_FUNCS(atexit on_exit tempnam memmove putenv gettimeofday)
520 dnl 514
521 dnl Would like to get rid of this cruft, and just have 515 dnl Would like to get rid of this cruft, and just have
522 dnl 516 dnl
523 dnl AC_CHECK_FUNCS(finite isnan isinf) 517 dnl AC_CHECK_FUNCS(finite isnan isinf)
524 dnl 518 dnl
525 dnl instead, but that used to fail on some systems... 519 dnl instead, but that used to fail on some systems...
526 dnl 520 dnl
527 dnl Check to see if we have IEEE math functions, and if so, which ones.
528 dnl
529 dnl For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP
530 dnl functions, otherwise we may not find them.
531 dnl
532 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf 521 dnl Also just using AC_CHECK_FUNCS doesn't seem to work to find isinf
533 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that 522 dnl and isnan on Linux systems, so we use AC_CHECK_FUNC, and if that
534 dnl fails, we try again by including math.h and invoking the function 523 dnl fails, we try again by including math.h and invoking the function
535 dnl with an argument. 524 dnl with an argument.
536 dnl 525
537 dnl Also check for some additional trig functions that aren't ANSI but 526 ### Check to see if we have IEEE math functions, and if so, which ones.
538 dnl are often available. If they are missing, we try to replace them 527 ###
539 dnl with functions from the BSD/NET2 math library. 528 ### For Linux: add -mieee-fp flag to CFLAGS when checking for IEEE FP
540 dnl 529 ### functions, otherwise we may not find them.
541 AC_CHECK_LIB(sunmath, main)dnl 530 ###
542 AC_CHECK_LIB(m, main)dnl 531 ### Also check for some additional trig functions that aren't ANSI but
543 dnl 532 ### are often available. If they are missing, we try to replace them
533 ### with functions from the BSD/NET2 math library.
534
535 AC_CHECK_LIB(sunmath, main)
536 AC_CHECK_LIB(m, main)
537
544 XCFLAGS="$CFLAGS" 538 XCFLAGS="$CFLAGS"
545 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG" 539 CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG"
546 dnl 540
547 AC_CHECK_FUNCS(finite isnan isinf infinity quiet_nan erf erfc lgamma)dnl 541 AC_CHECK_FUNCS(finite isnan isinf infinity quiet_nan erf erfc lgamma)
548 dnl 542
549 AC_MSG_CHECKING([for signgam declaration in math.h]) 543 AC_MSG_CHECKING([for signgam declaration in math.h])
550 AC_TRY_LINK([#include <math.h>], 544 AC_TRY_LINK([#include <math.h>],
551 [int foo = signgam + 1;], 545 [int foo = signgam + 1;],
552 AC_MSG_RESULT(yes) 546 AC_MSG_RESULT(yes)
553 AC_DEFINE(SIGNGAM_DECLARED, 1), 547 AC_DEFINE(SIGNGAM_DECLARED, 1),
554 AC_MSG_RESULT(no))dnl 548 AC_MSG_RESULT(no))
555 dnl 549
556 CFLAGS="$XCFLAGS" 550 CFLAGS="$XCFLAGS"
557 dnl 551
558 dnl Check for nonstandard but common trig functions that we need. 552 ### Check for nonstandard but common trig functions that we need.
559 dnl If they are missing, we replace them using functions from the BSD 553 ### If they are missing, we replace them using functions from the BSD
560 dnl math library, and we may need to replace some other functions too. 554 ### math library, and we may need to replace some other functions too.
561 dnl 555
562 AC_REPLACE_FUNCS(acosh asinh atanh) 556 AC_REPLACE_FUNCS(acosh asinh atanh)
563 dnl 557
564 if test -n "$LIBOBJS"; then 558 if test -n "$LIBOBJS"; then
565 for func in $LIBOBJS 559 for func in $LIBOBJS
566 do 560 do
567 case "$func" in 561 case "$func" in
568 *acosh.o*) 562 *acosh.o*)
569 AC_DEFINE(ACOSH_MISSING, 1)dnl 563 AC_DEFINE(ACOSH_MISSING, 1)
570 ;; 564 ;;
571 *asinh.o*) 565 *asinh.o*)
572 AC_DEFINE(ASINH_MISSING, 1)dnl 566 AC_DEFINE(ASINH_MISSING, 1)
573 ;; 567 ;;
574 *atanh.o*) 568 *atanh.o*)
575 AC_DEFINE(ATANH_MISSING, 1)dnl 569 AC_DEFINE(ATANH_MISSING, 1)
576 ;; 570 ;;
577 esac 571 esac
578 done 572 done
579 case $LIBOBJS in 573 case $LIBOBJS in
580 *acosh.o* | *asinh.o*) 574 *acosh.o* | *asinh.o*)
600 *copysign* | *finite* | *log1p*) 594 *copysign* | *finite* | *log1p*)
601 AC_REPLACE_FUNCS(logb scalb) 595 AC_REPLACE_FUNCS(logb scalb)
602 ;; 596 ;;
603 esac 597 esac
604 fi 598 fi
605 dnl 599
606 dnl Checks for OS specific cruft. 600 ### Checks for OS specific cruft.
607 dnl 601
608 AC_STRUCT_TM 602 AC_STRUCT_TM
609 AC_FUNC_SETVBUF_REVERSED 603 AC_FUNC_SETVBUF_REVERSED
610 TERMLIBS="" 604 TERMLIBS=""
611 for termlib in termcap terminfo curses termlib ; do 605 for termlib in termcap terminfo curses termlib ; do
612 AC_CHECK_LIB(${termlib}, main, [TERMLIBS="${TERMLIBS} -l${termlib}"]) 606 AC_CHECK_LIB(${termlib}, main, [TERMLIBS="${TERMLIBS} -l${termlib}"])
615 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS]) 609 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS])
616 break 610 break
617 ;; 611 ;;
618 esac 612 esac
619 done 613 done
620 dnl 614
621 AC_MSG_CHECKING([for struct exception in math.h]) 615 AC_MSG_CHECKING([for struct exception in math.h])
622 AC_TRY_LINK([#include <math.h>], 616 AC_TRY_LINK([#include <math.h>],
623 [struct exception *x; x->type; x->name;], 617 [struct exception *x; x->type; x->name;],
624 AC_MSG_RESULT(yes) 618 AC_MSG_RESULT(yes)
625 AC_DEFINE(EXCEPTION_IN_MATH, 1), 619 AC_DEFINE(EXCEPTION_IN_MATH, 1),
626 AC_MSG_RESULT(no))dnl 620 AC_MSG_RESULT(no))
627 dnl 621
628 AC_SUBST(TERMLIBS) 622 AC_SUBST(TERMLIBS)
629 dnl 623
630 dnl Signal stuff. 624 ### Signal stuff.
631 dnl 625
632 AC_TYPE_SIGNAL 626 AC_TYPE_SIGNAL
633 AC_SYS_SIGLIST_DECLARED 627 AC_SYS_SIGLIST_DECLARED
634 dnl 628
635 dnl Define VOID_SIGHANDLER for readline. 629 ### Define VOID_SIGHANDLER for readline.
636 dnl 630
637 case "$RETSIGTYPE" in 631 case "$RETSIGTYPE" in
638 int) 632 int)
639 ;; 633 ;;
640 *) 634 *)
641 VOID_SIGHANDLER="-DVOID_SIGHANDLER=1" 635 VOID_SIGHANDLER="-DVOID_SIGHANDLER=1"
642 AC_MSG_RESULT([defining VOID_SIGHANDLER to be 1]) 636 AC_MSG_RESULT([defining VOID_SIGHANDLER to be 1])
643 ;; 637 ;;
644 esac 638 esac
645 AC_SUBST(VOID_SIGHANDLER)dnl 639 AC_SUBST(VOID_SIGHANDLER)
646 dnl 640
647 dnl Checks for other programs used for building, testing, installing, 641 ### Checks for other programs used for building, testing, installing,
648 dnl and running Octave. 642 ### and running Octave.
649 dnl 643 ###
650 dnl For now, don't define LEXLIB to be -lfl -- we don't use anything in 644 ### For now, don't define LEXLIB to be -lfl -- we don't use anything in
651 dnl it, and it might not be installed. 645 ### it, and it might not be installed.
652 dnl 646 ###
653 dnl Also make sure that we generate an interactive scanner if we are 647 ### Also make sure that we generate an interactive scanner if we are
654 dnl using flex. 648 ### using flex.
655 dnl 649
656 AC_PROG_LEX 650 AC_PROG_LEX
657 case "$LEX" in 651 case "$LEX" in
658 flex*) 652 flex*)
659 LFLAGS="-t -I" 653 LFLAGS="-t -I"
660 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) 654 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
665 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) 659 AC_MSG_RESULT([defining LFLAGS to be $LFLAGS])
666 AC_MSG_WARN([I didn't find flex, but that's only a problem]) 660 AC_MSG_WARN([I didn't find flex, but that's only a problem])
667 AC_MSG_WARN([if you need to reconstruct lex.cc]) 661 AC_MSG_WARN([if you need to reconstruct lex.cc])
668 ;; 662 ;;
669 esac 663 esac
670 AC_SUBST(LFLAGS)dnl 664 AC_SUBST(LFLAGS)
671 dnl 665
672 AC_PROG_YACC 666 AC_PROG_YACC
673 case "$YACC" in 667 case "$YACC" in
674 bison*) 668 bison*)
675 ;; 669 ;;
676 *) 670 *)
677 AC_MSG_WARN([I didn't find bison, but that's only a problem]) 671 AC_MSG_WARN([I didn't find bison, but that's only a problem])
678 AC_MSG_WARN([if you need to reconstruct parse.cc]) 672 AC_MSG_WARN([if you need to reconstruct parse.cc])
679 ;; 673 ;;
680 esac 674 esac
681 dnl 675
682 AC_PROG_RANLIB 676 AC_PROG_RANLIB
683 dnl 677
684 AC_CHECK_PROG(RUNTEST, runtest, runtest, [])dnl 678 AC_CHECK_PROG(RUNTEST, runtest, runtest, [])
685 AC_CHECK_PROG(EXPECT, expect, expect, [])dnl 679 AC_CHECK_PROG(EXPECT, expect, expect, [])
686 if test -z "$EXPECT" ; then 680 if test -z "$EXPECT" ; then
687 RUNTEST= 681 RUNTEST=
688 fi 682 fi
689 AC_SUBST(RUNTEST)dnl 683 AC_SUBST(RUNTEST)
690 dnl 684
691 AC_PROG_INSTALL 685 AC_PROG_INSTALL
692 dnl 686
693 AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, [])dnl 687 AC_CHECK_PROG(GNUPLOT_BINARY, gnuplot, gnuplot, [])
694 if test -z "$GNUPLOT_BINARY"; then 688 if test -z "$GNUPLOT_BINARY"; then
695 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot]) 689 AC_MSG_WARN([I didn't find gnuplot. It isn't necessary to have gnuplot])
696 AC_MSG_WARN([installed, but you won't be able to use any of Octave's]) 690 AC_MSG_WARN([installed, but you won't be able to use any of Octave's])
697 AC_MSG_WARN([plotting commands without it.]) 691 AC_MSG_WARN([plotting commands without it.])
698 AC_MSG_WARN([]) 692 AC_MSG_WARN([])
701 AC_MSG_WARN([]) 695 AC_MSG_WARN([])
702 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) 696 AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"])
703 AC_MSG_WARN([]) 697 AC_MSG_WARN([])
704 AC_MSG_WARN([at the Octave prompt.]) 698 AC_MSG_WARN([at the Octave prompt.])
705 fi 699 fi
706 dnl 700
707 AC_CHECK_PROGS(DEFAULT_PAGER, less more page pg, [])dnl 701 AC_CHECK_PROGS(DEFAULT_PAGER, less more page pg, [])
708 if test -z "$DEFAULT_PAGER"; then 702 if test -z "$DEFAULT_PAGER"; then
709 AC_MSG_WARN([I couldn't find `less', `more', `page', or `pg']) 703 AC_MSG_WARN([I couldn't find `less', `more', `page', or `pg'])
710 elif test "$DEFAULT_PAGER" = less; then 704 elif test "$DEFAULT_PAGER" = less; then
711 DEFAULT_PAGER="less -e" 705 DEFAULT_PAGER="less -e"
712 AC_MSG_RESULT([defining DEFAULT_PAGER to be $DEFAULT_PAGER]) 706 AC_MSG_RESULT([defining DEFAULT_PAGER to be $DEFAULT_PAGER])
713 fi 707 fi
714 dnl 708
715 dnl Even though we include config.h in most files, some need to be 709 ### Even though we include config.h in most files, some need to be
716 dnl compiled with the -D options on the compiler command line. Use 710 ### compiled with the -D options on the compiler command line. Use
717 dnl UGLY_DEFS for that. 711 ### UGLY_DEFS for that.
718 dnl 712
719 AC_OUTPUT_MAKE_DEFS 713 AC_OUTPUT_MAKE_DEFS
720 UGLY_DEFS="$DEFS" 714 UGLY_DEFS="$DEFS"
721 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS]) 715 AC_MSG_RESULT([defining UGLY_DEFS to be $UGLY_DEFS])
722 AC_SUBST(UGLY_DEFS)dnl 716 AC_SUBST(UGLY_DEFS)
723 dnl 717
724 dnl Maybe add -Wall to compiler flags now that we're done feature 718 ### Maybe add -Wall to compiler flags now that we're done feature
725 dnl testing. 719 ### testing.
726 dnl 720 ###
727 dnl To get gcc and g++ to be really picky, try these adding these 721 ### To get gcc and g++ to be really picky, try these adding these
728 dnl options to CFLAGS and CXXFLAGS along with -Wall: 722 ### options to CFLAGS and CXXFLAGS along with -Wall:
729 dnl 723 ###
730 dnl -ansi 724 ### -ansi
731 dnl -pedantic 725 ### -pedantic
732 dnl -Wwrite-strings 726 ### -Wwrite-strings
733 dnl -Wid-clash-31 727 ### -Wid-clash-31
734 dnl -Wpointer-arith 728 ### -Wpointer-arith
735 dnl -Wcast-qual 729 ### -Wcast-qual
736 dnl -Wenum-clash 730 ### -Wenum-clash
737 dnl -Wcast-align 731 ### -Wcast-align
738 dnl -Wtraditional 732 ### -Wtraditional
739 dnl -Wstrict-prototypes 733 ### -Wstrict-prototypes
740 dnl -Wmissing-prototypes 734 ### -Wmissing-prototypes
741 dnl -Wnested-externs 735 ### -Wnested-externs
742 dnl -Woverloaded-virtual 736 ### -Woverloaded-virtual
743 dnl -Winline 737 ### -Winline
744 dnl -felide-constructors 738 ### -felide-constructors
745 dnl -fnonnull-objects 739 ### -fnonnull-objects
746 dnl 740
747 if $ADD_CXX_WALL; then 741 if $ADD_CXX_WALL; then
748 CXXFLAGS="$CXXFLAGS -Wall" 742 CXXFLAGS="$CXXFLAGS -Wall"
749 AC_MSG_RESULT([adding -Wall to CXXFLAGS]) 743 AC_MSG_RESULT([adding -Wall to CXXFLAGS])
750 fi 744 fi
751 if $ADD_CC_WALL; then 745 if $ADD_CC_WALL; then
752 CFLAGS="$CFLAGS -Wall" 746 CFLAGS="$CFLAGS -Wall"
753 AC_MSG_RESULT([adding -Wall to CFLAGS]) 747 AC_MSG_RESULT([adding -Wall to CFLAGS])
754 fi 748 fi
755 dnl 749
756 dnl Do the substitutions in all the Makefiles. 750 ### Do the substitutions in all the Makefiles.
757 dnl 751
758 define([tmpA], [Makefile octMakefile Makeconf])dnl 752 define([tmpA], [Makefile octMakefile Makeconf])dnl
759 define([tmpB], [libcruft/Makefile libcruft/Makerules])dnl 753 define([tmpB], [libcruft/Makefile libcruft/Makerules])dnl
760 define([tmpC], [liboctave/Makefile src/Makefile dld/Makefile])dnl 754 define([tmpC], [liboctave/Makefile src/Makefile dld/Makefile])dnl
761 define([tmpD], [info/Makefile readline/Makefile readline/doc/Makefile])dnl 755 define([tmpD], [info/Makefile readline/Makefile readline/doc/Makefile])dnl
762 define([tmpE], [readline/examples/Makefile doc/Makefile])dnl 756 define([tmpE], [readline/examples/Makefile doc/Makefile])dnl
763 define([tmpF], [test/Makefile kpathsea/Makefile])dnl 757 define([tmpF], [test/Makefile kpathsea/Makefile])dnl
764 define([srcdirs], [tmpA tmpB tmpC tmpD tmpE tmpF])dnl 758 define([srcdirs], [tmpA tmpB tmpC tmpD tmpE tmpF])dnl
765 dnl 759
766 define([tmpa], [libcruft/blas/Makefile libcruft/balgen/Makefile])dnl 760 define([tmpa], [libcruft/blas/Makefile libcruft/balgen/Makefile])dnl
767 define([tmpb], [libcruft/dassl/Makefile libcruft/eispack/Makefile])dnl 761 define([tmpb], [libcruft/dassl/Makefile libcruft/eispack/Makefile])dnl
768 define([tmpc], [libcruft/fftpack/Makefile libcruft/fsqp/Makefile])dnl 762 define([tmpc], [libcruft/fftpack/Makefile libcruft/fsqp/Makefile])dnl
769 define([tmpd], [libcruft/lapack/Makefile libcruft/linpack/Makefile])dnl 763 define([tmpd], [libcruft/lapack/Makefile libcruft/linpack/Makefile])dnl
770 define([tmpe], [libcruft/minpack/Makefile libcruft/misc/Makefile])dnl 764 define([tmpe], [libcruft/minpack/Makefile libcruft/misc/Makefile])dnl
771 define([tmpf], [libcruft/npsol/Makefile libcruft/odepack/Makefile])dnl 765 define([tmpf], [libcruft/npsol/Makefile libcruft/odepack/Makefile])dnl
772 define([tmpg], [libcruft/qpsol/Makefile libcruft/quadpack/Makefile])dnl 766 define([tmpg], [libcruft/qpsol/Makefile libcruft/quadpack/Makefile])dnl
773 define([tmph], [libcruft/ranlib/Makefile libcruft/villad/Makefile])dnl 767 define([tmph], [libcruft/ranlib/Makefile libcruft/villad/Makefile])dnl
774 dnl 768
775 define([cruftdirs], [tmpa tmpb tmpc tmpd tmpe tmpf tmpg tmph])dnl 769 define([cruftdirs], [tmpa tmpb tmpc tmpd tmpe tmpf tmpg tmph])dnl
776 define([tmpSA], [scripts/Makefile scripts/control/Makefile])dnl 770 define([tmpSA], [scripts/Makefile scripts/control/Makefile])dnl
777 define([tmpSB], [scripts/general/Makefile scripts/image/Makefile])dnl 771 define([tmpSB], [scripts/general/Makefile scripts/image/Makefile])
778 define([tmpSC], [scripts/linear-algebra/Makefile])dnl 772 define([tmpSC], [scripts/linear-algebra/Makefile])dnl
779 define([tmpSD], [scripts/miscellaneous/Makefile scripts/plot/Makefile])dnl 773 define([tmpSD], [scripts/miscellaneous/Makefile scripts/plot/Makefile])dnl
780 define([tmpSE], [scripts/polynomial/Makefile scripts/set/Makefile])dnl 774 define([tmpSE], [scripts/polynomial/Makefile scripts/set/Makefile])dnl
781 define([tmpSF], [scripts/signal/Makefile scripts/special-matrix/Makefile])dnl 775 define([tmpSF], [scripts/signal/Makefile scripts/special-matrix/Makefile])dnl
782 define([tmpSG], [scripts/startup/Makefile scripts/statistics/Makefile])dnl 776 define([tmpSG], [scripts/startup/Makefile scripts/statistics/Makefile])dnl
783 define([tmpSH], [scripts/elfun/Makefile scripts/specfun/Makefile])dnl 777 define([tmpSH], [scripts/elfun/Makefile scripts/specfun/Makefile])dnl
784 define([scriptdirs], [tmpSA tmpSB tmpSC tmpSD tmpSE tmpSF tmpSG tmpSH])dnl 778 define([scriptdirs], [tmpSA tmpSB tmpSC tmpSD tmpSE tmpSF tmpSG tmpSH])dnl
785 dnl 779
786 AC_OUTPUT([srcdirs cruftdirs scriptdirs])dnl 780 AC_OUTPUT([srcdirs cruftdirs scriptdirs])