Skip to content

Commit

Permalink
Merge pull request ESMCI#1685 from NCAR/ejh_fix_summary
Browse files Browse the repository at this point in the history
fixed libpio for autotools builds with fortran info, added FCFLAGS
  • Loading branch information
edwardhartnett authored Jul 29, 2020
2 parents 903fc75 + 9789048 commit dfc908e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
28 changes: 25 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,35 @@ else
fi
done
fi

if test -n "$cc_version_info"; then
CC_VERSION="$CC_VERSION ( $cc_version_info)"
fi

# Find and learn about the Fortran compiler.
AC_PROG_FC

# Compiler with version information. This consists of the full path
# name of the compiler and the reported version number.
AC_SUBST([FC_VERSION])
# Strip anything that looks like a flag off of $FC
FC_NOFLAGS=`echo $FC | sed 's/ -.*//'`

if `echo $FC_NOFLAGS | grep ^/ >/dev/null 2>&1`; then
FC_VERSION="$FC"
else
FC_VERSION="$FC";
for x in `echo $PATH | sed -e 's/:/ /g'`; do
if test -x $x/$FC_NOFLAGS; then
FC_VERSION="$x/$FC"
break
fi
done
fi
if test -n "$fc_version_info"; then
FC_VERSION="$FC_VERSION ( $fc_version_info)"
fi

# Always use malloc in autotools builds.
AC_DEFINE([PIO_USE_MALLOC], [1], [use malloc for memory])

Expand Down Expand Up @@ -363,10 +385,10 @@ AC_SUBST([enable_shared])
AC_SUBST([enable_static])
AC_SUBST([CFLAGS])
AC_SUBST([CPPFLAGS])
AC_SUBST([FFLAGS])
AC_SUBST([FCFLAGS])
AC_SUBST([LDFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([FPPFLAGS]) # ignored by autotools
AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
AC_SUBST(HAS_LOGGING, [$enable_logging])
AC_SUBST(HAS_SZIP_WRITE, [$have_szip_write])
Expand Down
1 change: 1 addition & 0 deletions libpio.settings.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Extra libraries: @LIBS@

Fortran Compiler: @FC_VERSION@
FFLAGS: @FFLAGS@
FCFLAGS: @FCFLAGS@
FPPFLAGS: @FPPFLAGS@

# Features
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ set(CPPFLAGS ${CPPFLAGS} PARENT_SCOPE)
if (PIO_ENABLE_FORTRAN)
add_subdirectory (flib)
set(FFLAGS ${FFLAGS} PARENT_SCOPE)
set(FCFLAGS ${FCFLAGS} PARENT_SCOPE)
set(FPPFLAGS ${FPPFLAGS} PARENT_SCOPE)
endif ()

0 comments on commit dfc908e

Please sign in to comment.