Commit a6f9a6a9 authored by vijaysm's avatar vijaysm
Browse files

Fix autreconf errors and re-organize flags

parent d0b2b178
......@@ -139,8 +139,6 @@ fi
FATHOM_SET_MPI_COMPILER([F77],[$F77_LIST],[$COMPILERPATHS])
AC_PROG_FC
AC_PROG_F77
AC_FC_PP_DEFINE
AC_FC_PP_SRCEXT
fi
]) # FATHOM_CHECK_COMPILERS
......@@ -251,6 +249,8 @@ if (test "x$ENABLE_FORTRAN" != "xno"); then
if test "xyes" = "x$enable_f77_optimize"; then
FFLAGS="$FFLAGS -O2"
fi
AC_FC_PP_DEFINE
AC_FC_PP_SRCEXT
fi
# Check for 32/64 bit.
......@@ -612,25 +612,25 @@ case "$cxx_compiler:$host_cpu" in
GNU:sparc*)
FATHOM_CXX_32BIT=-m32
FATHOM_CXX_64BIT=-m64
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
;;
GNU:powerpc*)
FATHOM_CXX_32BIT=-m32
FATHOM_CXX_64BIT=-m64
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
;;
GNU:i?86|GNU:x86_64)
FATHOM_CXX_32BIT=-m32
FATHOM_CXX_64BIT=-m64
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
;;
GNU:mips*)
FATHOM_CXX_32BIT="-mips32 -mabi=32"
FATHOM_CXX_64BIT="-mips64 -mabi=64"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
;;
GNU:*)
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
;;
Intel:*)
FATHOM_CXX_32BIT=-m32
......@@ -663,7 +663,7 @@ case "$cxx_compiler:$host_cpu" in
FATHOM_CXX_64BIT=-xarch=generic64
;;
Clang:*)
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CXX_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_CXX_32BIT=-m32
FATHOM_CXX_64BIT=-m64
;;
......@@ -758,35 +758,35 @@ case "$cc_compiler:$host_cpu" in
GNU:sparc*)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
;;
GNU:powerpc*)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
;;
GNU:i?86|GNU:x86_64)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
;;
Intel:*)
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
FATHOM_CC_SPECIAL="$EXTRA_INTEL_FLAGS -wd981 -wd279 -wd1418 -wd383 -wd1572"
FATHOM_FC_SPECIAL="$EXTRA_INTEL_FLAGS -wd981 -wd279 -wd1418 -wd383 -wd1572"
FATHOM_FC_SPECIAL="$EXTRA_INTEL_FLAGS -wd981 -wd279 -wd1418 -wd383 -wd1572 $EXTRA_INTEL_FFLAGS"
;;
GNU:mips*)
FATHOM_CC_32BIT="-mips32 -mabi=32"
FATHOM_CC_64BIT="-mips64 -mabi=64"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
;;
GNU:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
;;
VisualAge:*)
......@@ -826,7 +826,7 @@ case "$cc_compiler:$host_cpu" in
FATHOM_FC_SPECIAL=-LANG:std
;;
Clang:*)
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_SPECIAL="$EXTRA_GNU_FLAGS $EXTRA_GNU_CXX_FLAGS"
FATHOM_FC_SPECIAL="$EXTRA_GNU_FLAGS"
FATHOM_CC_32BIT=-m32
FATHOM_CC_64BIT=-m64
......
......@@ -32,8 +32,10 @@ if (test "x$enable_fortran" != "xno"); then
fi
AC_SUBST(ENABLE_FORTRAN)
DISTCHECK_CONFIGURE_FLAGS="$DISTCHECK_CONFIGURE_FLAGS --enable-fortran=$ENABLE_FORTRAN"
EXTRA_GNU_FLAGS='-Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -Wno-variadic-macros'
EXTRA_GNU_CXX_FLAGS='-Wno-long-long -Wpointer-arith -Wformat -Wformat-security -Wno-variadic-macros'
EXTRA_GNU_FLAGS='-Wall -pipe -pedantic -Wextra -Wcast-align -Wshadow -Wunused-parameter'
EXTRA_INTEL_FLAGS='-Wall'
EXTRA_INTEL_FFLAGS='-check all'
EXTRA_BG_FLAGS='-qarch=auto -qtune=auto -qpic=large'
# Find out the appropriate compiler based on user 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