Mercurial > hg > octave-lyh
comparison configure.in @ 1239:cb032139cb9f
[project @ 1995-04-10 18:37:05 by jwe]
author | jwe |
---|---|
date | Mon, 10 Apr 1995 18:39:14 +0000 |
parents | 9d78b5687400 |
children | 345c21405c57 |
comparison
equal
deleted
inserted
replaced
1238:3c0e26a1387b | 1239:cb032139cb9f |
---|---|
18 ### | 18 ### |
19 ### You should have received a copy of the GNU General Public License | 19 ### You should have received a copy of the GNU General Public License |
20 ### along with Octave; see the file COPYING. If not, write to the Free | 20 ### along with Octave; see the file COPYING. If not, write to the Free |
21 ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 21 ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | 22 |
23 AC_REVISION($Revision: 1.113 $) | 23 AC_REVISION($Revision: 1.114 $) |
24 AC_PREREQ(2.0) | 24 AC_PREREQ(2.0) |
25 AC_INIT(src/octave.cc) | 25 AC_INIT(src/octave.cc) |
26 AC_CONFIG_HEADER(config.h) | 26 AC_CONFIG_HEADER(config.h) |
27 | 27 |
28 AC_DEFINE(OCTAVE_SOURCE, 1) | 28 AC_DEFINE(OCTAVE_SOURCE, 1) |
357 ### cf77 : Cray / Unicos | 357 ### cf77 : Cray / Unicos |
358 ### g77 : GNU Fortran (someday...) | 358 ### g77 : GNU Fortran (someday...) |
359 ### fc : Convex | 359 ### fc : Convex |
360 ### | 360 ### |
361 ### I don't think the Cray compiler will ever work like f2c... | 361 ### I don't think the Cray compiler will ever work like f2c... |
362 | 362 ### |
363 ### XXX FIXME XXX -- I don't think the logic here is quite right if we | 363 ### The optional arguments to --with-g77 or --with-f2c force g77 or |
364 ### want to allow --with-g77 or --with-f2c to force them to be used | 364 ### f2c to be used. The optional argument to can be used to set the |
365 ### even if they aren't available or don't appear to work correctly. | 365 ### name of g77 or f2c. For example `--with-g77=/opt/gnu/bin/f77' |
366 ### says that we are using g77 but it is installed as | |
367 ### /opt/gnu/bin/f77. | |
368 ### | |
369 ### If neither of those options are specified, look for a Fortran | |
370 ### compiler. If one is found, see if it is compatible with our | |
371 ### assumptions. If it is, use it. Otherwise, look for f2c. | |
372 ### | |
373 ### Issue a warning if we can't find a compatible fortran compiler or | |
374 ### f2c. | |
366 | 375 |
367 if $use_g77; then | 376 if $use_g77; then |
368 F77=g77 | 377 if test "$with_g77" = "yes"; then |
378 F77=g77 | |
379 else | |
380 F77="$with_g77" | |
381 fi | |
382 AC_MSG_RESULT([defining F77 to be $F77]) | |
369 elif $use_f2c; then | 383 elif $use_f2c; then |
370 F77= | 384 F77= |
385 if test "$with_f2c" = "yes"; then | |
386 F2C=g77 | |
387 else | |
388 F2C="$with_f2c" | |
389 fi | |
390 AC_MSG_RESULT([defining F2C to be $F2C]) | |
371 else | 391 else |
372 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) | 392 AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) |
373 fi | 393 fi |
374 | 394 |
375 # If it looks like we have a Fortran compiler, try to determine | 395 FUGLY= |
376 # whether it might be compatible with f2c. | 396 have_fortran_compiler=false |
377 | 397 have_f2c=false |
378 if test -n "$F77"; then | 398 |
399 if $use_g77; then | |
400 FUGLY=-fugly | |
401 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) | |
379 OCTAVE_FLIBS | 402 OCTAVE_FLIBS |
380 OCTAVE_F77_APPEND_UNDERSCORE | 403 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) |
381 OCTAVE_F2C_F77_COMPAT | 404 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) |
382 | 405 have_fortran_compiler=true |
383 if test "$octave_cv_f2c_f77_compat" = no; then | 406 elif $use_f2c; then |
384 F77= | 407 have_f2c=true |
385 else | 408 else |
386 if test -z "$FFLAGS"; then | 409 if test -n "$F77"; then |
387 FFLAGS="-O" | 410 OCTAVE_FLIBS |
388 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) | 411 OCTAVE_F77_APPEND_UNDERSCORE |
412 OCTAVE_F2C_F77_COMPAT | |
413 if test "$octave_cv_f2c_f77_compat" = no; then | |
414 F77= | |
415 else | |
416 if test -z "$FFLAGS"; then | |
417 FFLAGS="-O" | |
418 AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) | |
419 fi | |
389 fi | 420 fi |
390 fi | 421 fi |
391 fi | 422 if test -n "$F77"; then |
392 | 423 have_fortran_compiler=true |
393 ### If we can't find a Fortran compiler, or if it looks like it isn't | 424 else |
394 ### compatible with f2c, try to find f2c. | 425 AC_CHECK_PROG(F2C, f2c, f2c, []) |
395 | 426 if test -n "$F2C"; then |
396 if test -z "$F77"; then | 427 have_f2c=true |
397 AC_CHECK_PROG(F2C, f2c, f2c, []) | 428 fi |
398 fi | |
399 | |
400 ### At this point, either F77, F2C, use_f2c, or use_g77 should be set. | |
401 | |
402 if test -n "$F77"; then | |
403 if test "$F77" = "g77"; then | |
404 FUGLY=-fugly | |
405 AC_MSG_RESULT([defining FUGLY to be $FUGLY]) | |
406 fi | 429 fi |
430 fi | |
431 | |
432 if $have_fortran_compiler; then | |
407 DOT_C_FROM_DOT_F_CMD= | 433 DOT_C_FROM_DOT_F_CMD= |
408 DOT_O_FROM_DOT_F_PAT='.f.o:' | 434 DOT_O_FROM_DOT_F_PAT='.f.o:' |
409 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' | 435 DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' |
410 elif test -n "$F2C" || $use_f2c; then | 436 elif $have_f2c; then |
437 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) | |
438 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) | |
411 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) | 439 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) |
412 if test -z "$FLIBS" ; then | 440 if test -z "$FLIBS" ; then |
413 AC_CHECK_LIB(F77, main, FLIBS=-lF77, []) | 441 AC_CHECK_LIB(F77, main, FLIBS=-lF77, []) |
414 if test -n "$FLIBS" ; then | 442 if test -n "$FLIBS" ; then |
415 AC_CHECK_LIB(I77, main, FLIBS="$FLIBS -lI77", []) | 443 AC_CHECK_LIB(I77, main, FLIBS="$FLIBS -lI77", []) |
421 DOT_C_FROM_DOT_F_CMD=' cat $< | $(F2C) $(F2CFLAGS) > $(@F)' | 449 DOT_C_FROM_DOT_F_CMD=' cat $< | $(F2C) $(F2CFLAGS) > $(@F)' |
422 AC_MSG_RESULT([defining DOT_C_FROM_DOT_F_CMD to be $DOT_C_FROM_DOT_F_CMD]) | 450 AC_MSG_RESULT([defining DOT_C_FROM_DOT_F_CMD to be $DOT_C_FROM_DOT_F_CMD]) |
423 DOT_O_FROM_DOT_F_PAT='%.o : %.f' | 451 DOT_O_FROM_DOT_F_PAT='%.o : %.f' |
424 DOT_O_FROM_DOT_F_CMD= | 452 DOT_O_FROM_DOT_F_CMD= |
425 AC_MSG_RESULT([defining DOT_O_FROM_DOT_F_PAT to be $DOT_O_FROM_DOT_F_PAT]) | 453 AC_MSG_RESULT([defining DOT_O_FROM_DOT_F_PAT to be $DOT_O_FROM_DOT_F_PAT]) |
426 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) | |
427 else | 454 else |
428 AC_MSG_WARN([in order to build octave, you must have a compatible]) | 455 AC_MSG_WARN([in order to build octave, you must have a compatible]) |
429 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) | 456 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) |
430 AC_MSG_WARN([See the file INSTALL for more information.]) | 457 AC_MSG_WARN([See the file INSTALL for more information.]) |
431 AC_MSG_WARN([Continuing anyway...]) | 458 AC_MSG_WARN([Continuing anyway...]) |