Commit a948d64c authored by vijaysm's avatar vijaysm
Browse files

Move BG/Q inspection to the compiler flags stage. And remove use of FCDefs...

Move BG/Q inspection to the compiler flags stage. And remove use of FCDefs since this is already available from MOABConfig.h
parent 7c4a5ec2
......@@ -303,6 +303,14 @@ fi
# Distcheck flags for 32-bit and 64-bit builds
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-32bit=$enable_32bit --enable-64bit=$enable_64bit"
# Check if platform is BlueGene
AC_MSG_CHECKING([if platform is IBM BlueGene])
FATHOM_TRY_COMPILER_DEFINE([__bg__],
[MB_DEFS="$MB_DEFS -DBLUEGENE"
MB_BLUEGENE_CONF=yes],
[MB_BLUEGENE_CONF=no])
AC_MSG_RESULT([$MB_BLUEGENE_CONF])
# Special overrides for flags
if (test "x$enable_static" != "xno" && test "x$MB_BLUEGENE_CONF" != "xno"); then
LDFLAGS="$LDFLAGS -qnostaticlink -qnostaticlink=libgcc"
......@@ -775,19 +783,19 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
;;
GNU:powerpc*)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
;;
GNU:i?86|GNU:x86_64)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
;;
Intel:*)
FATHOM_CC_32BIT=-m32
......@@ -799,11 +807,11 @@ case "$cc_compiler:$host_cpu" in
FATHOM_CC_32BIT="-mips32 -mabi=32"
FATHOM_CC_64BIT="-mips64 -mabi=64"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
;;
GNU:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
;;
VisualAge:*)
case "$target_vendor" in
......@@ -843,7 +851,7 @@ case "$cc_compiler:$host_cpu" in
;;
Clang:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS -Wno-unused-parameter"
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
;;
......
......@@ -33,7 +33,7 @@ fi
AC_SUBST(ENABLE_FORTRAN)
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-fortran=$ENABLE_FORTRAN"
EXTRA_GNU_CXX_FLAGS='-Wno-long-long -Wpointer-arith -Wformat -Wformat-security -pedantic -Wextra -Wno-variadic-macros'
EXTRA_GNU_FLAGS='-Wall -pipe -Wcast-align -Wshadow -Wunused-parameter'
EXTRA_GNU_FLAGS='-Wall -pipe -Wcast-align -Wshadow'
EXTRA_INTEL_FLAGS='-Wall'
EXTRA_INTEL_FFLAGS='-check all'
EXTRA_BG_FLAGS='-qarch=auto -qtune=auto -qpic=large'
......@@ -41,14 +41,6 @@ EXTRA_BG_FLAGS='-qarch=auto -qtune=auto -qpic=large'
MB_CPPFLAGS=""
MB_DEFS=""
# Check if platform is BlueGene
AC_MSG_CHECKING([if platform is IBM BlueGene])
FATHOM_TRY_COMPILER_DEFINE([__bg__],
[MB_DEFS="$MB_DEFS -DBLUEGENE"
MB_BLUEGENE_CONF=yes],
[MB_BLUEGENE_CONF=no])
AC_MSG_RESULT([$MB_BLUEGENE_CONF])
# Find out the appropriate compiler based on user options
FATHOM_CHECK_COMPILERS([yes],[yes],[$ENABLE_FORTRAN])
AM_CONDITIONAL(PARALLEL,[test "x$enablempi" != "xno"])
......@@ -1329,7 +1321,6 @@ AC_ARG_VAR([FC], [FORTRAN compiler command])
AC_CONFIG_HEADERS([src/moab/Version.h
src/moab/EntityHandle.hpp
src/parallel/moab_mpi_config.h
src/FCDefs.h
src/moab/MOABConfig.h:config/MOABConfig.h.in])
AX_PREFIX_CONFIG_H([src/moab/MOABConfig.h],[MOAB],[src/moab/MOABConfig.h])
......@@ -1339,7 +1330,6 @@ AC_CONFIG_FILES([Makefile
examples/makefile
examples/old/deform_mesh/makefile
src/Makefile
src/MBCN_protos.h
src/io/Makefile
src/io/mhdf/Makefile
src/LocalDiscretization/Makefile
......@@ -1382,8 +1372,6 @@ AC_CONFIG_FILES([Makefile
MeshFiles/unittest/h5file/Makefile
MeshFiles/examples/Makefile
])
AC_CONFIG_COMMANDS([src/MOAB_FCDefs.h],
[sed -e "s/FC_FUNC/MOAB_FC_FUNC/" src/FCDefs.h >src/MOAB_FCDefs.h])
# DISTCHECK_CONFIGURE_FLAGS="$USER_CONFIGURE_CMD"
# make distcheck will use this DISTCHECK_CONFIGURE_FLAGS
......
/* Define to a macro mangling the given C identifier (in lower and upper
case), which must not contain underscores, for linking with Fortran. */
#undef FC_FUNC
/* As FC_FUNC, but for C identifiers containing underscores. */
#undef FC_FUNC_
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