comparison configure.in @ 1225:b013cff15746

[project @ 1995-04-10 00:34:21 by jwe]
author jwe
date Mon, 10 Apr 1995 00:34:21 +0000
parents 3431a4febc98
children be470fb54633
comparison
equal deleted inserted replaced
1224:cb2cd18010d1 1225:b013cff15746
19 ### 19 ###
20 ### 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 ### 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 ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23 23
24 AC_REVISION($Revision: 1.108 $) 24 AC_REVISION($Revision: 1.109 $)
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) 27 AC_CONFIG_HEADER(config.h)
28 28
29 AC_DEFINE(OCTAVE_SOURCE, 1) 29 AC_DEFINE(OCTAVE_SOURCE, 1)
208 208
209 ### See if the optional nonlinear programming code is present. 209 ### See if the optional nonlinear programming code is present.
210 210
211 AC_MSG_CHECKING([for npsol]) 211 AC_MSG_CHECKING([for npsol])
212 if test -f $srcdir/libcruft/npsol/npsol.f; then 212 if test -f $srcdir/libcruft/npsol/npsol.f; then
213 AC_MSG_RESULT([yes]) 213 AC_MSG_RESULT(yes)
214 else 214 else
215 AC_MSG_RESULT([no]) 215 AC_MSG_RESULT(no)
216 AC_DEFINE(NPSOL_MISSING, 1) 216 AC_DEFINE(NPSOL_MISSING, 1)
217 fi 217 fi
218 218
219 AC_MSG_CHECKING([for qpsol]) 219 AC_MSG_CHECKING([for qpsol])
220 if test -f $srcdir/libcruft/qpsol/qpsol.f; then 220 if test -f $srcdir/libcruft/qpsol/qpsol.f; then
221 AC_MSG_RESULT([yes]) 221 AC_MSG_RESULT(yes)
222 else 222 else
223 AC_MSG_RESULT([no]) 223 AC_MSG_RESULT(no)
224 AC_DEFINE(QPSOL_MISSING, 1) 224 AC_DEFINE(QPSOL_MISSING, 1)
225 fi 225 fi
226 226
227 AC_MSG_CHECKING([for fsqp]) 227 AC_MSG_CHECKING([for fsqp])
228 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then 228 if test -f $srcdir/libcruft/fsqp/fsqpd.f; then
229 AC_MSG_RESULT([yes]) 229 AC_MSG_RESULT(yes)
230 else 230 else
231 AC_MSG_RESULT([no]) 231 AC_MSG_RESULT(no)
232 AC_DEFINE(FSQP_MISSING, 1) 232 AC_DEFINE(FSQP_MISSING, 1)
233 fi 233 fi
234 234
235 ### See which C++ compiler to use (we expect to find g++). 235 ### See which C++ compiler to use (we expect to find g++).
236 236
275 esac 275 esac
276 ;; 276 ;;
277 esac 277 esac
278 278
279 AC_SUBST(HOST_CXXFLAGS) 279 AC_SUBST(HOST_CXXFLAGS)
280 AC_SUBST(CXXFLAGS)
281 AC_SUBST(NO_IMPLICIT_TEMPLATES)
280 282
281 ### See what libraries are used by the C++ compiler. Need this for 283 ### See what libraries are used by the C++ compiler. Need this for
282 ### dynamic linking. 284 ### dynamic linking.
283 285
284 if test -n "$CXX"; then 286 AC_MSG_CHECKING([for C++ libraries])
287 AC_CACHE_VAL(octave_cv_cxxlibs,
288 [if test -n "$CXX"; then
285 export CXX 289 export CXX
286 fi 290 fi
287 CXXLIBS=`sh $srcdir/cxxlibs.sh` 291 octave_cv_cxxlibs=`sh $srcdir/cxxlibs.sh`])
288 AC_MSG_RESULT([defining CXXLIBS to be $CXXLIBS]) 292 AC_MSG_RESULT([$octave_cv_cxxlibs])
289 293 CXXLIBS="$octave_cv_cxxlibs"
290 AC_SUBST(CXXFLAGS)
291 AC_SUBST(NO_IMPLICIT_TEMPLATES)
292 AC_SUBST(CXXLIBS) 294 AC_SUBST(CXXLIBS)
293 295
294 ### See which C compiler to use (we expect to find gcc). 296 ### See which C compiler to use (we expect to find gcc).
295 297
296 AC_PROG_CC 298 AC_PROG_CC
349 AC_CHECK_SIZEOF(short) 351 AC_CHECK_SIZEOF(short)
350 AC_CHECK_SIZEOF(int) 352 AC_CHECK_SIZEOF(int)
351 AC_CHECK_SIZEOF(long) 353 AC_CHECK_SIZEOF(long)
352 AC_C_BIGENDIAN 354 AC_C_BIGENDIAN
353 355
354 ### Try to determine the floating point format. This could probably
355 ### be eliminated in favor of run-time checks.
356
357 AC_MSG_CHECKING([floating point format])
358 changequote(,)dnl
359 XCFLAGS=`echo $CFLAGS | sed 's/-O[^ \t]*//'`
360 changequote([,])dnl
361 ${CC-cc} -DDP $XCFLAGS $LDFLAGS $srcdir/float-type.c -o conftest >/dev/null 2>&1
362 FLOAT_FORMAT=`./conftest`
363 case "$FLOAT_FORMAT" in
364 IEEE_BIG_ENDIAN)
365 AC_MSG_RESULT([IEEE big endian])
366 AC_DEFINE(IEEE_BIG_ENDIAN, 1)
367 ;;
368 IEEE_LITTLE_ENDIAN)
369 AC_MSG_RESULT([IEEE little endian])
370 AC_DEFINE(IEEE_LITTLE_ENDIAN, 1)
371 ;;
372 VAX_D_FLOAT)
373 AC_MSG_RESULT([VAX D floating])
374 AC_DEFINE(VAX_D_FLOAT, 1)
375 ;;
376 VAX_G_FLOAT)
377 AC_MSG_RESULT([VAX G floating])
378 AC_DEFINE(VAX_G_FLOAT, 1)
379 ;;
380 *)
381 AC_MSG_RESULT()
382 AC_MSG_WARN("unrecognized floating point format!")
383 ;;
384 esac
385
386 ### Does the C compiler handle alloca() and const correctly? 356 ### Does the C compiler handle alloca() and const correctly?
387 357
388 AC_ALLOCA 358 AC_ALLOCA
389 AC_C_CONST 359 AC_C_CONST
390 360
420 AC_MSG_CHECKING([$F77/f2c compatibility]) 390 AC_MSG_CHECKING([$F77/f2c compatibility])
421 export F77 391 export F77
422 export CC 392 export CC
423 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh` 393 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh`
424 status=$? 394 status=$?
395 octave_f77_f2c_compat=no
425 if test $status -eq 0; then 396 if test $status -eq 0; then
426 AC_MSG_RESULT([yes]) 397 octave_f77_f2c_compat=yes
398 fi
399 AC_MSG_RESULT([$octave_f77_f2c_compat])
400 if test "$octave_f77_f2c_compat" = yes; then
427 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then 401 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then
428 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) 402 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)
429 fi 403 fi
430 else 404 else
431 AC_MSG_RESULT([no])
432 F77= 405 F77=
433 fi 406 fi
434 fi 407 fi
435 fi 408 fi
436 409
453 if test -n "$F77"; then 426 if test -n "$F77"; then
454 if test "$F77" = "g77"; then 427 if test "$F77" = "g77"; then
455 FUGLY=-fugly 428 FUGLY=-fugly
456 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) 429 AC_MSG_RESULT([defining FUGLY to be $FUGLY])
457 fi 430 fi
458 export F77 431 AC_MSG_CHECKING([for Fortran librarires])
459 FLIBS=`sh $srcdir/flibs.sh` 432 AC_CACHE_VAL(octave_cv_flibs,
460 AC_MSG_RESULT([defining FLIBS to be $FLIBS]) 433 [export F77
434 octave_cv_flibs=`sh $srcdir/flibs.sh`])
435 FLIBS="$octave_cv_flibs"
436 AC_MSG_RESULT([$FLIBS])
461 DOT_C_FROM_DOT_F_CMD= 437 DOT_C_FROM_DOT_F_CMD=
462 DOT_O_FROM_DOT_F_PAT='.f.o:' 438 DOT_O_FROM_DOT_F_PAT='.f.o:'
463 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' 439 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<'
464 elif test -n "$F2C" || $use_f2c; then 440 elif test -n "$F2C" || $use_f2c; then
465 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) 441 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, [])
640 ### Checks for OS specific cruft. 616 ### Checks for OS specific cruft.
641 617
642 AC_STRUCT_TM 618 AC_STRUCT_TM
643 AC_STRUCT_TIMEZONE 619 AC_STRUCT_TIMEZONE
644 AC_FUNC_SETVBUF_REVERSED 620 AC_FUNC_SETVBUF_REVERSED
621
645 TERMLIBS="" 622 TERMLIBS=""
646 for termlib in termcap terminfo curses termlib ; do 623 for termlib in termcap terminfo curses termlib ; do
647 AC_CHECK_LIB(${termlib}, main, [TERMLIBS="${TERMLIBS} -l${termlib}"]) 624 AC_CHECK_LIB(${termlib}, main, [TERMLIBS="${TERMLIBS} -l${termlib}"])
648 case "${TERMLIBS}" in 625 case "${TERMLIBS}" in
649 *-l${termlib}*) 626 *-l${termlib}*)
650 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS]) 627 AC_MSG_RESULT([defining TERMLIBS to be $TERMLIBS])
651 break 628 break
652 ;; 629 ;;
653 esac 630 esac
654 done 631 done
632 AC_SUBST(TERMLIBS)
655 633
656 AC_MSG_CHECKING([for struct exception in math.h]) 634 AC_MSG_CHECKING([for struct exception in math.h])
657 AC_TRY_LINK([#include <math.h>], 635 AC_TRY_LINK([#include <math.h>],
658 [struct exception *x; x->type; x->name;], 636 [struct exception *x; x->type; x->name;],
659 AC_MSG_RESULT(yes) 637 AC_MSG_RESULT(yes)
660 AC_DEFINE(EXCEPTION_IN_MATH, 1), 638 AC_DEFINE(EXCEPTION_IN_MATH, 1),
661 AC_MSG_RESULT(no)) 639 AC_MSG_RESULT(no))
662
663 AC_SUBST(TERMLIBS)
664 640
665 ### Signal stuff. 641 ### Signal stuff.
666 642
667 AC_TYPE_SIGNAL 643 AC_TYPE_SIGNAL
668 AC_DECL_SYS_SIGLIST 644 AC_DECL_SYS_SIGLIST
829 define([tmpSH], [scripts/elfun/Makefile scripts/specfun/Makefile])dnl 805 define([tmpSH], [scripts/elfun/Makefile scripts/specfun/Makefile])dnl
830 define([tmpSI], [scripts/strings/Makefile scripts/time/Makefile])dnl 806 define([tmpSI], [scripts/strings/Makefile scripts/time/Makefile])dnl
831 define([mdirs], [tmpSA tmpSB tmpSC tmpSD tmpSE tmpSF tmpSG tmpSH tmpSI])dnl 807 define([mdirs], [tmpSA tmpSB tmpSC tmpSD tmpSE tmpSF tmpSG tmpSH tmpSI])dnl
832 808
833 AC_OUTPUT([srcdirs cruftdirs mdirs]) 809 AC_OUTPUT([srcdirs cruftdirs mdirs])
810
811 ### Print a summary so that important information isn't missed.
812
813 CXX_EXTRAS="$HOST_CXXFLAGS $NO_IMPLICIT_TEMPLATES $GCC_IEEE_FP_FLAG"
814
815 if test -z "$F77"; then
816 FORT="$F2C $F2CFLAGS"
817 else
818 FORT="$F77 $FFLAGS $FUGLY"
819 fi
820
821 AC_MSG_RESULT([
822
823 Octave is now configured for $canonical_host_type
824
825 Source directory: $srcdir
826 Installation prefix: $prefix
827 C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS
828 C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS
829 Fortran compiler: $FORT
830 Dynamic Linking: $use_dld
831 Minimal kernel option: $lite_kernel
832 Use GNU readline: $USE_READLINE
833 Use GNU info reader: $USE_GNU_INFO
834 Default pager: $DEFAULT_PAGER
835 gnuplot: $GNUPLOT_BINARY
836 ])