cat > conftest.c <<EOF
#if defined(__EMSCRIPTEN__)
emcc
+#elif defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
+ icx
#elif defined(__INTEL_COMPILER) || defined(__ICC)
icc
#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
CXX="$ac_cv_path_CXX"
fi
;;
- clang) if test -n "$ac_tool_prefix"; then
+ clang) if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
set dummy ${ac_tool_prefix}clang++; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
CXX="$ac_cv_path_CXX"
fi
;;
- icc) if test -n "$ac_tool_prefix"; then
+ icx) if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}icpx", so it can be a program name with args.
+set dummy ${ac_tool_prefix}icpx; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) case $CXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac ;;
+esac
+fi
+CXX=$ac_cv_path_CXX
+if test -n "$CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+printf "%s\n" "$CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CXX"; then
+ ac_pt_CXX=$CXX
+ # Extract the first word of "icpx", so it can be a program name with args.
+set dummy icpx; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) case $ac_pt_CXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac ;;
+esac
+fi
+ac_pt_CXX=$ac_cv_path_ac_pt_CXX
+if test -n "$ac_pt_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
+printf "%s\n" "$ac_pt_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_CXX" = x; then
+ CXX="notfound"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_pt_CXX
+ fi
+else
+ CXX="$ac_cv_path_CXX"
+fi
+ ;;
+ icc) if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
set dummy ${ac_tool_prefix}icpc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
LLVM_PROF_ERR=no
case "$ac_cv_cc_name" in
- clang)
+ clang|icx)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
mpicc)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;
+icx)
+ # ICX needs fp-model=precise (the default in clang) or floats behave badly
+ CFLAGS_NODIST="$CFLAGS_NODIST -ffp-model=precise"
+ ;;
icc)
# ICC needs -fp-model strict or floats behave badly
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
# rounding precision of 64 bits. For gcc/x86, we can fix this by
# using inline assembler to get and set the x87 FPU control word.
-# This inline assembler syntax may also work for suncc and icc,
-# so we try it on all platforms.
+# This inline assembler syntax works for icx and may also work for
+# suncc and icc, so we try it on all platforms.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
cat > conftest.c <<EOF
#if defined(__EMSCRIPTEN__)
emcc
+#elif defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
+ icx
#elif defined(__INTEL_COMPILER) || defined(__ICC)
icc
#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
case "$ac_cv_cc_name" in
gcc) AC_PATH_TOOL([CXX], [g++], [notfound]) ;;
cc) AC_PATH_TOOL([CXX], [c++], [notfound]) ;;
- clang) AC_PATH_TOOL([CXX], [clang++], [notfound]) ;;
- icc) AC_PATH_TOOL([CXX], [icpc], [notfound]) ;;
+ clang) AC_PATH_TOOL([CXX], [clang++], [notfound]) ;;
+ icx) AC_PATH_TOOL([CXX], [icpx], [notfound]) ;;
+ icc) AC_PATH_TOOL([CXX], [icpc], [notfound]) ;;
esac
if test "$CXX" = "notfound"
then
LLVM_PROF_ERR=no
case "$ac_cv_cc_name" in
- clang)
+ clang|icx)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
PGO_PROF_USE_FLAG="-fprofile-instr-use=\"\$(shell pwd)/code.profclangd\""
mpicc)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;
+icx)
+ # ICX needs fp-model=precise (the default in clang) or floats behave badly
+ CFLAGS_NODIST="$CFLAGS_NODIST -ffp-model=precise"
+ ;;
icc)
# ICC needs -fp-model strict or floats behave badly
CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
# rounding precision of 64 bits. For gcc/x86, we can fix this by
# using inline assembler to get and set the x87 FPU control word.
-# This inline assembler syntax may also work for suncc and icc,
-# so we try it on all platforms.
+# This inline assembler syntax works for icx and may also work for
+# suncc and icc, so we try it on all platforms.
AC_CACHE_CHECK([whether we can use gcc inline assembler to get and set x87 control word], [ac_cv_gcc_asm_for_x87], [
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[