@@ -801,6 +801,7 @@ with_universal_archs
801801with_framework_name
802802enable_framework
803803with_gcc
804+ with_icc
804805with_cxx_main
805806with_suffix
806807enable_shared
@@ -1480,6 +1481,7 @@ Optional Packages:
14801481 specify an alternate name of the framework built
14811482 with --enable-framework
14821483 --without-gcc never use gcc
1484+ --with-icc build with icc
14831485 --with-cxx-main=<compiler>
14841486 compile main() and link python executable with C++
14851487 compiler
@@ -3549,6 +3551,29 @@ fi
35493551{ $as_echo " $as_me :${as_lineno-$LINENO } : result: $without_gcc " >&5
35503552$as_echo " $without_gcc " >&6 ; }
35513553
3554+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for --with-icc" >&5
3555+ $as_echo_n " checking for --with-icc... " >&6 ; }
3556+
3557+ # Check whether --with-icc was given.
3558+ if test " ${with_icc+set} " = set ; then :
3559+ withval=$with_icc ;
3560+ case $withval in
3561+ no) CC=${CC:- cc}
3562+ with_icc=no;;
3563+ yes) CC=icc
3564+ CXX=icpc
3565+ with_icc=yes;;
3566+ * ) CC=$withval
3567+ with_icc=$withval ;;
3568+ esac
3569+ else
3570+
3571+ with_icc=no
3572+ fi
3573+
3574+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $with_icc " >&5
3575+ $as_echo " $with_icc " >&6 ; }
3576+
35523577# If the user switches compilers, we can't believe the cache
35533578if test ! -z " $ac_cv_prog_CC " -a ! -z " $CC " -a " $CC " ! = " $ac_cv_prog_CC "
35543579then
@@ -4934,6 +4959,104 @@ yes:)
49344959{ $as_echo " $as_me :${as_lineno-$LINENO } : WARNING: using cross tools not prefixed with host triplet" >&5
49354960$as_echo " $as_me : WARNING: using cross tools not prefixed with host triplet" >&2 ; }
49364961ac_tool_warned=yes ;;
4962+ esac
4963+ CXX=$ac_pt_CXX
4964+ fi
4965+ else
4966+ CXX=" $ac_cv_path_CXX "
4967+ fi
4968+ ;;
4969+ icc|* /icc) if test -n " $ac_tool_prefix " ; then
4970+ # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4971+ set dummy ${ac_tool_prefix} icpc; ac_word=$2
4972+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
4973+ $as_echo_n " checking for $ac_word ... " >&6 ; }
4974+ if ${ac_cv_path_CXX+: } false ; then :
4975+ $as_echo_n " (cached) " >&6
4976+ else
4977+ case $CXX in
4978+ [\\ /]* | ? :[\\ /]* )
4979+ ac_cv_path_CXX=" $CXX " # Let the user override the test with a path.
4980+ ;;
4981+ * )
4982+ as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
4983+ for as_dir in notfound
4984+ do
4985+ IFS=$as_save_IFS
4986+ test -z " $as_dir " && as_dir=.
4987+ for ac_exec_ext in ' ' $ac_executable_extensions ; do
4988+ if as_fn_executable_p " $as_dir /$ac_word$ac_exec_ext " ; then
4989+ ac_cv_path_CXX=" $as_dir /$ac_word$ac_exec_ext "
4990+ $as_echo " $as_me :${as_lineno-$LINENO } : found $as_dir /$ac_word$ac_exec_ext " >&5
4991+ break 2
4992+ fi
4993+ done
4994+ done
4995+ IFS=$as_save_IFS
4996+
4997+ ;;
4998+ esac
4999+ fi
5000+ CXX=$ac_cv_path_CXX
5001+ if test -n " $CXX " ; then
5002+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $CXX " >&5
5003+ $as_echo " $CXX " >&6 ; }
5004+ else
5005+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
5006+ $as_echo " no" >&6 ; }
5007+ fi
5008+
5009+
5010+ fi
5011+ if test -z " $ac_cv_path_CXX " ; then
5012+ ac_pt_CXX=$CXX
5013+ # Extract the first word of "icpc", so it can be a program name with args.
5014+ set dummy icpc; ac_word=$2
5015+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
5016+ $as_echo_n " checking for $ac_word ... " >&6 ; }
5017+ if ${ac_cv_path_ac_pt_CXX+: } false ; then :
5018+ $as_echo_n " (cached) " >&6
5019+ else
5020+ case $ac_pt_CXX in
5021+ [\\ /]* | ? :[\\ /]* )
5022+ ac_cv_path_ac_pt_CXX=" $ac_pt_CXX " # Let the user override the test with a path.
5023+ ;;
5024+ * )
5025+ as_save_IFS=$IFS ; IFS=$PATH_SEPARATOR
5026+ for as_dir in notfound
5027+ do
5028+ IFS=$as_save_IFS
5029+ test -z " $as_dir " && as_dir=.
5030+ for ac_exec_ext in ' ' $ac_executable_extensions ; do
5031+ if as_fn_executable_p " $as_dir /$ac_word$ac_exec_ext " ; then
5032+ ac_cv_path_ac_pt_CXX=" $as_dir /$ac_word$ac_exec_ext "
5033+ $as_echo " $as_me :${as_lineno-$LINENO } : found $as_dir /$ac_word$ac_exec_ext " >&5
5034+ break 2
5035+ fi
5036+ done
5037+ done
5038+ IFS=$as_save_IFS
5039+
5040+ ;;
5041+ esac
5042+ fi
5043+ ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5044+ if test -n " $ac_pt_CXX " ; then
5045+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_pt_CXX " >&5
5046+ $as_echo " $ac_pt_CXX " >&6 ; }
5047+ else
5048+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
5049+ $as_echo " no" >&6 ; }
5050+ fi
5051+
5052+ if test " x$ac_pt_CXX " = x; then
5053+ CXX=" icpc"
5054+ else
5055+ case $cross_compiling :$ac_tool_warned in
5056+ yes:)
5057+ { $as_echo " $as_me :${as_lineno-$LINENO } : WARNING: using cross tools not prefixed with host triplet" >&5
5058+ $as_echo " $as_me : WARNING: using cross tools not prefixed with host triplet" >&2 ; }
5059+ ac_tool_warned=yes ;;
49375060esac
49385061 CXX=$ac_pt_CXX
49395062 fi
@@ -6438,6 +6561,12 @@ fi
64386561
64396562
64406563# Enable PGO flags.
6564+
6565+
6566+
6567+
6568+
6569+
64416570# Extract the first word of "llvm-profdata", so it can be a program name with args.
64426571set dummy llvm-profdata; ac_word=$2
64436572{ $as_echo " $as_me :${as_lineno-$LINENO } : checking for $ac_word " >&5
@@ -6509,6 +6638,12 @@ case $CC in
65096638 ;;
65106639 esac
65116640 ;;
6641+ * icc* )
6642+ PGO_PROF_GEN_FLAG=" -prof-gen"
6643+ PGO_PROF_USE_FLAG=" -prof-use"
6644+ LLVM_PROF_MERGER=" true"
6645+ LLVM_PROF_FILE=" "
6646+ ;;
65126647esac
65136648
65146649# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
@@ -6655,6 +6790,13 @@ $as_echo "$ac_cv_no_strict_aliasing" >&6; }
66556790 BASECFLAGS=" $BASECFLAGS -fno-strict-aliasing"
66566791 fi
66576792
6793+ # ICC doesn't recognize the option, but only emits a warning
6794+ # # XXX does it emit an unused result warning and can it be disabled?
6795+ case " $CC " in
6796+ * icc* )
6797+ ac_cv_disable_unused_result_warning=no
6798+ ;;
6799+ * )
66586800 { $as_echo " $as_me :${as_lineno-$LINENO } : checking if we can turn off $CC unused result warning" >&5
66596801$as_echo_n " checking if we can turn off $CC unused result warning... " >&6 ; }
66606802 ac_save_cc=" $CC "
66926834 CC=" $ac_save_cc "
66936835 { $as_echo " $as_me :${as_lineno-$LINENO } : result: $ac_cv_disable_unused_result_warning " >&5
66946836$as_echo " $ac_cv_disable_unused_result_warning " >&6 ; }
6837+ ;;
6838+ esac
66956839
66966840 if test $ac_cv_disable_unused_result_warning = yes
66976841 then
@@ -6981,6 +7125,13 @@ $as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
69817125 ;;
69827126esac
69837127
7128+ # ICC needs -fp-model strict or floats behave badly
7129+ case " $CC " in
7130+ * icc* )
7131+ CFLAGS_NODIST=" $CFLAGS_NODIST -fp-model strict"
7132+ ;;
7133+ esac
7134+
69847135if test " $Py_DEBUG " = ' true' ; then
69857136 :
69867137else
0 commit comments