Commit c686edbe authored by vijaysm's avatar vijaysm
Browse files

Updates for compilation flags and fortran name mangling.

* Clang does not like -ftree-vectorize and ifort does not like -pipe.
* Remove long-long for fortran and update the wrapper routines.
* Update the name mangling configuration
parent b1dc20b3
......@@ -174,11 +174,11 @@ AC_ARG_ENABLE( optimize, AS_HELP_STRING([--enable-optimize],[Compile optimized (
if (test "x$enable_debug" != "xno"); then # debug flags
# GNU
EXTRA_GNU_CXXFLAGS="-Wall -pipe -pedantic -Wshadow -Wunused-parameter -Wpointer-arith -Wformat -Wformat-security -Wextra -Wno-variadic-macros -Wno-unknown-pragmas"
EXTRA_GNU_FCFLAGS="-fcheck=all -pipe -pedantic -Wextra -ffree-line-length-0 -Wno-long-long"
EXTRA_GNU_CXXFLAGS="-Wall -Wno-long-long -pipe -pedantic -Wshadow -Wunused-parameter -Wpointer-arith -Wformat -Wformat-security -Wextra -Wno-variadic-macros -Wno-unknown-pragmas"
EXTRA_GNU_FCFLAGS="-fcheck=all -pipe -pedantic -Wextra -ffree-line-length-0"
# Intel
EXTRA_INTEL_CXXFLAGS="-pipe -C"
EXTRA_INTEL_FCFLAGS="-pipe -C"
EXTRA_INTEL_FCFLAGS="-C"
# PGI
EXTRA_PGI_CXXFLAGS="-traceback -Mfree -C"
EXTRA_PGI_FCFLAGS="-traceback -Mfree -C -freeform -extend-source"
......@@ -189,8 +189,12 @@ fi
if (test "x$enable_cxx_optimize" != "xno"); then # optimization flags
#GNU
EXTRA_GNU_CXXFLAGS="$EXTRA_GNU_CXXFLAGS -finline-functions -ftree-vectorize -finline-functions -march=native"
EXTRA_GNU_FCFLAGS="$EXTRA_GNU_FCFLAGS -ffree-line-length-0 -ftree-vectorize -finline-functions -march=native"
EXTRA_GNU_CXXFLAGS="$EXTRA_GNU_CXXFLAGS -finline-functions -finline-functions -march=native"
EXTRA_GNU_FCFLAGS="$EXTRA_GNU_FCFLAGS -ffree-line-length-0 -finline-functions -march=native"
if (test "x$GXX" = "xyes"); then
EXTRA_GNU_CXXFLAGS="$EXTRA_GNU_CXXFLAGS -ftree-vectorize"
EXTRA_GNU_FCFLAGS="$EXTRA_GNU_FCFLAGS -ftree-vectorize"
fi
# Intel
EXTRA_INTEL_CXXFLAGS="$EXTRA_INTEL_CXXFLAGS -xHost -ip -no-prec-div" # -fast
EXTRA_INTEL_FCFLAGS="$EXTRA_INTEL_FCFLAGS -xHost -ip -no-prec-div" # -fast
......@@ -341,15 +345,10 @@ fi
# Check if we are using new Darwin kernels with Clang -- needs libc++ instead of libstdc++
if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
AC_LANG_PUSH([Fortran 77])
FAC_FC_WRAPPERS
AC_F77_MAIN
AC_LANG_POP([Fortran 77])
# check how to link against C++ runtime for fortran programs correctly
AC_LANG_PUSH([Fortran])
FAC_FC_WRAPPERS
AC_F77_MAIN
AC_FC_MAIN
AC_FC_WRAPPERS
fcxxlinkage=no
# Check if we are on IBM ANL BG/Q system
......@@ -405,8 +404,6 @@ if (test "x$ENABLE_FORTRAN" != "xno" && test "x$CHECK_FC" != "xno"); then
fi
AC_LANG_POP([Fortran])
fi
AC_SUBST(FLIBS)
......
......@@ -373,20 +373,6 @@ if test "xyes" = "x$enablempi"; then
test "xyes" != "x$WITH_MPE" || MB_DEFS="$MB_DEFS -DUSE_MPE"
fi
# Check for curl
AC_MSG_CHECKING([for curl libraries])
CURLPATH=`which curl-config`
if (test "x$CURLPATH" != "x"); then
CURL_LIBS=`$CURLPATH --libs`
if (test "x$CURL_LIBS" != "x"); then
AC_MSG_RESULT($CURL_LIBS)
LIBS="$CURL_LIBS $LIBS"
else
AC_MSG_RESULT(not found)
fi
else
AC_MSG_RESULT(not found)
fi
################################################################################
# HDF5 OPTIONS
################################################################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment