From c88f2abea5c4295cd20564fede8b3010933c0e6f Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 21 Apr 2015 08:44:30 -0500 Subject: [svn-r26860] Fixed sizeof checks. --- configure | 8 +++++++- configure.ac | 16 +++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/configure b/configure index b4be929..2bc0848 100755 --- a/configure +++ b/configure @@ -6534,21 +6534,27 @@ rm -f core conftest.err conftest.$ac_objext \ ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then as_fn_error $? "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE" "$LINENO" 5 fi + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_STORAGE_SIZE 1" >>confdefs.h + fi + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_C_SIZEOF 1" >>confdefs.h + fi + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then $as_echo "#define FORTRAN_HAVE_SIZEOF 1" >>confdefs.h + fi ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. diff --git a/configure.ac b/configure.ac index b78ac89..053f2e3 100644 --- a/configure.ac +++ b/configure.ac @@ -446,15 +446,21 @@ if test "X$HDF_FORTRAN" = "Xyes"; then PAC_PROG_FC_STORAGE_SIZE ## If neither intrinsic functions SIZEOF or STORAGE_SIZE is available then stop configure with an error - if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_C_SIZEOF_FORTRAN" = "Xno"; then + if test "X$HAVE_SIZEOF_FORTRAN" = "Xno" && test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xno"; then AC_MSG_ERROR([Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE]) fi + + if test "X$HAVE_STORAGE_SIZE_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) + fi - AC_DEFINE([FORTRAN_HAVE_STORAGE_SIZE], [1], [Define if we have Fortran intrinsic STORAGE_SIZE]) - - AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + if test "X$HAVE_C_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_C_SIZEOF], [1], [Define if we have Fortran intrinsic C_SIZEOF]) + fi - AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) + if test "X$HAVE_SIZEOF_FORTRAN" = "Xyes"; then + AC_DEFINE([FORTRAN_HAVE_SIZEOF], [1], [Define if we have Fortran intrinsic SIZEOF]) + fi ## Check to see if -r8 was specified to determine if we need to ## compile the DOUBLE PRECISION interfaces. -- cgit v0.12