mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-07 07:04:57 +00:00
Make sure configure recognizes FLANG
This commit is contained in:
@@ -3452,7 +3452,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
|
||||
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran
|
||||
for ac_prog in ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 flang-new ifort ifc nagfor gfortran
|
||||
do
|
||||
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
|
||||
@@ -3501,7 +3501,7 @@ fi
|
||||
fi
|
||||
if test -z "$FC"; then
|
||||
ac_ct_FC=$FC
|
||||
for ac_prog in ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran
|
||||
for ac_prog in ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 flang-new ifort ifc nagfor gfortran
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
@@ -3928,7 +3928,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in xlc pgcc icc gcc cc
|
||||
for ac_prog in xlc pgcc clang icc gcc cc
|
||||
do
|
||||
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
|
||||
@@ -3977,7 +3977,7 @@ fi
|
||||
fi
|
||||
if test -z "$CC"; then
|
||||
ac_ct_CC=$CC
|
||||
for ac_prog in xlc pgcc icc gcc cc
|
||||
for ac_prog in xlc pgcc clang icc gcc cc
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
@@ -4424,7 +4424,7 @@ if test -z "$CXX"; then
|
||||
CXX=$CCC
|
||||
else
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
for ac_prog in CC xlc++ icpc g++
|
||||
for ac_prog in CC xlc++ clang++ icpc g++
|
||||
do
|
||||
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
|
||||
@@ -4473,7 +4473,7 @@ fi
|
||||
fi
|
||||
if test -z "$CXX"; then
|
||||
ac_ct_CXX=$CXX
|
||||
for ac_prog in CC xlc++ icpc g++
|
||||
for ac_prog in CC xlc++ clang++ icpc g++
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
@@ -6874,10 +6874,12 @@ if test x"$psblas_cv_fc" == "x" ; then
|
||||
# Sun compiler detection
|
||||
|
||||
psblas_cv_fc="sun"
|
||||
elif eval "$MPIFC -V 2>&1 | grep Portland 2>/dev/null" ; then
|
||||
elif eval "$MPIFC --version 2>&1 | grep flang-new 2>/dev/null" ; then
|
||||
# Portland group compiler detection
|
||||
|
||||
psblas_cv_fc="pg"
|
||||
psblas_cv_fc="flang"
|
||||
psblas_cv_define_prepend=""
|
||||
FDEFINES="$psblas_cv_define_prepend-DFLANG $FDEFINES"
|
||||
elif eval "$MPIFC -V 2>&1 | grep Intel.*Fortran.*Compiler 2>/dev/null" ; then
|
||||
# Intel compiler identification
|
||||
|
||||
@@ -7301,6 +7303,9 @@ if test "X$FCOPT" == "X" ; then
|
||||
elif test "X$psblas_cv_fc" == X"pg" ; then
|
||||
# other compilers ..
|
||||
FCOPT="-fast $FCOPT"
|
||||
elif test "X$psblas_cv_fc" == X"flang" ; then
|
||||
# other compilers ..
|
||||
FCOPT="-O3"
|
||||
# NOTE : PG & Sun use -fast instead -O3
|
||||
elif test "X$psblas_cv_fc" == X"sun" ; then
|
||||
# other compilers ..
|
||||
|
||||
+10
-5
@@ -100,17 +100,17 @@ dnl We set our own FC flags, ignore those from AC_PROG_FC but not those from the
|
||||
dnl environment variable. Same for C
|
||||
dnl
|
||||
save_FCFLAGS="$FCFLAGS";
|
||||
AC_PROG_FC([ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran])
|
||||
AC_PROG_FC([ftn xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 flang-new ifort ifc nagfor gfortran])
|
||||
FCFLAGS="$save_FCFLAGS";
|
||||
save_CFLAGS="$CFLAGS";
|
||||
AC_PROG_CC([xlc pgcc icc gcc cc ])
|
||||
AC_PROG_CC([xlc pgcc clang icc gcc cc ])
|
||||
if test "x$ac_cv_prog_cc_stdc" == "xno" ; then
|
||||
AC_MSG_ERROR([Problem : Need a C99 compiler ! ])
|
||||
else
|
||||
C99OPT="$ac_cv_prog_cc_stdc";
|
||||
fi
|
||||
CFLAGS="$save_CFLAGS";
|
||||
AC_PROG_CXX([CC xlc++ icpc g++])
|
||||
AC_PROG_CXX([CC xlc++ clang++ icpc g++])
|
||||
|
||||
dnl AC_PROG_F90 doesn't exist, at the time of writing this !
|
||||
dnl AC_PROG_F90
|
||||
@@ -248,10 +248,12 @@ if test x"$psblas_cv_fc" == "x" ; then
|
||||
# Sun compiler detection
|
||||
|
||||
psblas_cv_fc="sun"
|
||||
elif eval "$MPIFC -V 2>&1 | grep Portland 2>/dev/null" ; then
|
||||
elif eval "$MPIFC --version 2>&1 | grep flang-new 2>/dev/null" ; then
|
||||
# Portland group compiler detection
|
||||
|
||||
psblas_cv_fc="pg"
|
||||
psblas_cv_fc="flang"
|
||||
psblas_cv_define_prepend=""
|
||||
FDEFINES="$psblas_cv_define_prepend-DFLANG $FDEFINES"
|
||||
elif eval "$MPIFC -V 2>&1 | grep Intel.*Fortran.*Compiler 2>/dev/null" ; then
|
||||
# Intel compiler identification
|
||||
|
||||
@@ -427,6 +429,9 @@ if test "X$FCOPT" == "X" ; then
|
||||
elif test "X$psblas_cv_fc" == X"pg" ; then
|
||||
# other compilers ..
|
||||
FCOPT="-fast $FCOPT"
|
||||
elif test "X$psblas_cv_fc" == X"flang" ; then
|
||||
# other compilers ..
|
||||
FCOPT="-O3"
|
||||
# NOTE : PG & Sun use -fast instead -O3
|
||||
elif test "X$psblas_cv_fc" == X"sun" ; then
|
||||
# other compilers ..
|
||||
|
||||
Reference in New Issue
Block a user