dnl -*- shell-script -*- dnl dnl Copyright (c) 2004-2005 The Trustees of Indiana University. dnl All rights reserved. dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee. dnl All rights reserved. dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, dnl University of Stuttgart. All rights reserved. dnl Copyright (c) 2004-2005 The Regents of the University of California. dnl All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow dnl dnl $HEADER$ dnl AC_DEFUN([OMPI_F77_GET_VALUE_TRUE],[ # Determine the value of .TRUE. of this FORTRAN compiler. AC_MSG_CHECKING([FORTRAN value for .TRUE. logical type]) if test "$1" = "none" -o "$OMPI_WANT_F77_BINDINGS" = "0"; then OMPI_FORTRAN_VALUE_TRUE=0 AC_MSG_RESULT([no Fortran 77 bindings -- skipped]) else if test "x$ompi_ac_doubleunder" = xy || test "x$ompi_ac_singleunder" = xy; then ompi_ac_print_logical_fn=print_ else if test "x$ompi_ac_nounder" = xy; then ompi_ac_print_logical_fn=print else if test "x$ompi_ac_caps" = xy; then ompi_ac_print_logical_fn=PRINT else AC_MSG_WARN([*** FORTRAN external naming convention undefined]) AC_MSG_ERROR([*** Cannot continue.]) fi fi fi # # C module # We really need the confdefs.h Header file for # the ompi_fortran_logical_t definition # if test \! -f confdefs.h ; then AC_MSG_WARN([*** Problem running configure test!]) AC_MSG_WARN([*** Cannot find confdefs.h file for config test]) AC_MSG_WARN([*** See config.log for details.]) AC_MSG_ERROR([*** Cannot continue.]) fi cat > conftest.c < #include #include "confdefs.h" #ifdef __cplusplus extern "C" { #endif void $ompi_ac_print_logical_fn(ompi_fortran_logical_t * logical); void $ompi_ac_print_logical_fn(ompi_fortran_logical_t * logical) { int result = 0; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); if( SIZEOF_INT >= sizeof(ompi_fortran_logical_t) ) { fprintf(f, "%d\n", (int)*logical); } else { exit(1); } } #ifdef __cplusplus } #endif EOF cat > conftestf.f <