Mercurial > octave
comparison configure.in @ 1233:be470fb54633
[project @ 1995-04-10 05:20:52 by jwe]
author | jwe |
---|---|
date | Mon, 10 Apr 1995 05:20:52 +0000 |
parents | b013cff15746 |
children | 6c77481483bb |
comparison
equal
deleted
inserted
replaced
1232:5f1bb459e99c | 1233:be470fb54633 |
---|---|
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.109 $) | 24 AC_REVISION($Revision: 1.110 $) |
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) |
278 | 278 |
279 AC_SUBST(HOST_CXXFLAGS) | 279 AC_SUBST(HOST_CXXFLAGS) |
280 AC_SUBST(CXXFLAGS) | 280 AC_SUBST(CXXFLAGS) |
281 AC_SUBST(NO_IMPLICIT_TEMPLATES) | 281 AC_SUBST(NO_IMPLICIT_TEMPLATES) |
282 | 282 |
283 ### See what libraries are used by the C++ compiler. Need this for | |
284 ### dynamic linking. | |
285 | |
286 AC_MSG_CHECKING([for C++ libraries]) | |
287 AC_CACHE_VAL(octave_cv_cxxlibs, | |
288 [if test -n "$CXX"; then | |
289 export CXX | |
290 fi | |
291 octave_cv_cxxlibs=`sh $srcdir/cxxlibs.sh`]) | |
292 AC_MSG_RESULT([$octave_cv_cxxlibs]) | |
293 CXXLIBS="$octave_cv_cxxlibs" | |
294 AC_SUBST(CXXLIBS) | |
295 | |
296 ### See which C compiler to use (we expect to find gcc). | 283 ### See which C compiler to use (we expect to find gcc). |
297 | 284 |
298 AC_PROG_CC | 285 AC_PROG_CC |
299 AC_PROG_CPP | 286 AC_PROG_CPP |
300 AC_PROG_GCC_TRADITIONAL | 287 AC_PROG_GCC_TRADITIONAL |
356 ### Does the C compiler handle alloca() and const correctly? | 343 ### Does the C compiler handle alloca() and const correctly? |
357 | 344 |
358 AC_ALLOCA | 345 AC_ALLOCA |
359 AC_C_CONST | 346 AC_C_CONST |
360 | 347 |
348 ### Get the list of libraries that the C++ compiler normally uses. | |
349 | |
350 OCTAVE_CXXLIBS | |
351 | |
361 ### If we haven't been forced to use f2c, try to find a Fortran compiler | 352 ### If we haven't been forced to use f2c, try to find a Fortran compiler |
362 ### under any one of several common Un*x Fortran compiler names. | 353 ### under any one of several common Un*x Fortran compiler names. |
363 ### Put fc last to avoid confusion with some vendor's /bin/sh fc | 354 ### Put fc last to avoid confusion with some vendor's /bin/sh fc |
364 ### builtin. | 355 ### builtin. |
365 ### | 356 ### |
368 ### g77 : GNU Fortran (someday...) | 359 ### g77 : GNU Fortran (someday...) |
369 ### fc : Convex | 360 ### fc : Convex |
370 ### | 361 ### |
371 ### I don't think the Cray compiler will ever work like f2c... | 362 ### I don't think the Cray compiler will ever work like f2c... |
372 | 363 |
364 ### XXX FIXME XXX -- I don't think the logic here is quite right if we | |
365 ### want to allow --with-g77 or --with-f2c to force them to be used | |
366 ### even if they aren't available or don't appear to work correctly. | |
367 | |
373 if $use_g77; then | 368 if $use_g77; then |
374 F77=g77 | 369 F77=g77 |
375 fi | 370 elif $use_f2c; then |
376 | 371 F77= |
377 if test -n "$F77"; then | |
378 export F77 | |
379 fi | |
380 | |
381 if $use_f2c; then | |
382 true | |
383 else | 372 else |
384 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) | 373 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) |
385 | 374 fi |
386 # If it looks like we have a Fortran compiler, try to determine | 375 |
387 # whether it might be compatible with f2c. | 376 # If it looks like we have a Fortran compiler, try to determine |
388 | 377 # whether it might be compatible with f2c. |
389 if test -n "$F77"; then | 378 |
390 AC_MSG_CHECKING([$F77/f2c compatibility]) | 379 if test -n "$F77"; then |
391 export F77 | 380 OCTAVE_FLIBS |
392 export CC | 381 OCTAVE_F77_APPEND_UNDERSCORE |
393 tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh` | 382 OCTAVE_F2C_F77_COMPAT |
394 status=$? | 383 |
395 octave_f77_f2c_compat=no | 384 if test "$octave_cv_f2c_f77_compat" = no; then |
396 if test $status -eq 0; then | 385 F77= |
397 octave_f77_f2c_compat=yes | 386 else |
398 fi | 387 if test -z "$FFLAGS"; then |
399 AC_MSG_RESULT([$octave_f77_f2c_compat]) | 388 FFLAGS="-O" |
400 if test "$octave_f77_f2c_compat" = yes; then | 389 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) |
401 if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then | |
402 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) | |
403 fi | |
404 else | |
405 F77= | |
406 fi | 390 fi |
407 fi | 391 fi |
408 fi | 392 fi |
409 | 393 |
410 ### If we can't find a Fortran compiler, or if it looks like it isn't | 394 ### If we can't find a Fortran compiler, or if it looks like it isn't |
412 | 396 |
413 if test -z "$F77"; then | 397 if test -z "$F77"; then |
414 AC_CHECK_PROG(F2C, f2c, f2c, []) | 398 AC_CHECK_PROG(F2C, f2c, f2c, []) |
415 fi | 399 fi |
416 | 400 |
417 if test -z "$F2CFLAGS"; then | 401 ### At this point, either F77, F2C, use_f2c, or use_g77 should be set. |
418 F2CFLAGS= | |
419 fi | |
420 | |
421 if test -z "$FFLAGS"; then | |
422 FFLAGS="-O" | |
423 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) | |
424 fi | |
425 | 402 |
426 if test -n "$F77"; then | 403 if test -n "$F77"; then |
427 if test "$F77" = "g77"; then | 404 if test "$F77" = "g77"; then |
428 FUGLY=-fugly | 405 FUGLY=-fugly |
429 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) | 406 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) |
430 fi | 407 fi |
431 AC_MSG_CHECKING([for Fortran librarires]) | |
432 AC_CACHE_VAL(octave_cv_flibs, | |
433 [export F77 | |
434 octave_cv_flibs=`sh $srcdir/flibs.sh`]) | |
435 FLIBS="$octave_cv_flibs" | |
436 AC_MSG_RESULT([$FLIBS]) | |
437 DOT_C_FROM_DOT_F_CMD= | 408 DOT_C_FROM_DOT_F_CMD= |
438 DOT_O_FROM_DOT_F_PAT='.f.o:' | 409 DOT_O_FROM_DOT_F_PAT='.f.o:' |
439 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' | 410 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' |
440 elif test -n "$F2C" || $use_f2c; then | 411 elif test -n "$F2C" || $use_f2c; then |
441 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) | 412 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) |
825 Source directory: $srcdir | 796 Source directory: $srcdir |
826 Installation prefix: $prefix | 797 Installation prefix: $prefix |
827 C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS | 798 C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS |
828 C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS | 799 C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS |
829 Fortran compiler: $FORT | 800 Fortran compiler: $FORT |
801 Fortran libraries: $FLIBS | |
830 Dynamic Linking: $use_dld | 802 Dynamic Linking: $use_dld |
831 Minimal kernel option: $lite_kernel | 803 Minimal kernel option: $lite_kernel |
832 Use GNU readline: $USE_READLINE | 804 Use GNU readline: $USE_READLINE |
833 Use GNU info reader: $USE_GNU_INFO | 805 Use GNU info reader: $USE_GNU_INFO |
834 Default pager: $DEFAULT_PAGER | 806 Default pager: $DEFAULT_PAGER |