Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: configure.ac

Issue 25827: Support ICC in configure
Patch Set: Created 4 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | .gitignore » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dnl *********************************************** 1 dnl ***********************************************
2 dnl * Please run autoreconf to test your changes! * 2 dnl * Please run autoreconf to test your changes! *
3 dnl *********************************************** 3 dnl ***********************************************
4 4
5 # Set VERSION so we only need to edit in one place (i.e., here) 5 # Set VERSION so we only need to edit in one place (i.e., here)
6 m4_define(PYTHON_VERSION, 3.6) 6 m4_define(PYTHON_VERSION, 3.6)
7 7
8 AC_PREREQ(2.65) 8 AC_PREREQ(2.65)
9 9
10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 without_gcc=no;; 585 without_gcc=no;;
586 *) CC=$withval 586 *) CC=$withval
587 without_gcc=$withval;; 587 without_gcc=$withval;;
588 esac], [ 588 esac], [
589 case $ac_sys_system in 589 case $ac_sys_system in
590 AIX*) CC=${CC:-xlc_r} 590 AIX*) CC=${CC:-xlc_r}
591 without_gcc=;; 591 without_gcc=;;
592 *) without_gcc=no;; 592 *) without_gcc=no;;
593 esac]) 593 esac])
594 AC_MSG_RESULT($without_gcc) 594 AC_MSG_RESULT($without_gcc)
595
596 AC_MSG_CHECKING(for --with-icc)
597 AC_ARG_WITH(icc,
598 AS_HELP_STRING([--with-icc], [build with icc]),
599 [
600 case $withval in
601 no) CC=${CC:-cc}
602 with_icc=no;;
603 yes) CC=icc
604 CXX=icpc
605 with_icc=yes;;
606 *) CC=$withval
607 with_icc=$withval;;
608 esac], [
609 with_icc=no])
610 AC_MSG_RESULT($with_icc)
595 611
596 # If the user switches compilers, we can't believe the cache 612 # If the user switches compilers, we can't believe the cache
597 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" 613 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
598 then 614 then
599 AC_MSG_ERROR([cached CC is different -- throw away $cache_file 615 AC_MSG_ERROR([cached CC is different -- throw away $cache_file
600 (it is also a good idea to do 'make clean' before compiling)]) 616 (it is also a good idea to do 'make clean' before compiling)])
601 fi 617 fi
602 618
603 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2 619 # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
604 # when the compiler supports them, but we don't always want -O2, and 620 # when the compiler supports them, but we don't always want -O2, and
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 ]) 708 ])
693 AC_MSG_RESULT($with_cxx_main) 709 AC_MSG_RESULT($with_cxx_main)
694 710
695 preset_cxx="$CXX" 711 preset_cxx="$CXX"
696 if test -z "$CXX" 712 if test -z "$CXX"
697 then 713 then
698 case "$CC" in 714 case "$CC" in
699 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; 715 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
700 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; 716 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
701 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ; ; 717 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ; ;
718 icc|*/icc) AC_PATH_TOOL(CXX, [icpc], [icpc], [notfound]) ;;
702 esac 719 esac
703 if test "$CXX" = "notfound" 720 if test "$CXX" = "notfound"
704 then 721 then
705 CXX="" 722 CXX=""
706 fi 723 fi
707 fi 724 fi
708 if test -z "$CXX" 725 if test -z "$CXX"
709 then 726 then
710 AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound) 727 AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
711 if test "$CXX" = "notfound" 728 if test "$CXX" = "notfound"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 LLVM_PROF_ERR=yes 1268 LLVM_PROF_ERR=yes
1252 fi 1269 fi
1253 ;; 1270 ;;
1254 *) 1271 *)
1255 PGO_PROF_GEN_FLAG="-fprofile-generate" 1272 PGO_PROF_GEN_FLAG="-fprofile-generate"
1256 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" 1273 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
1257 LLVM_PROF_MERGER="true" 1274 LLVM_PROF_MERGER="true"
1258 LLVM_PROF_FILE="" 1275 LLVM_PROF_FILE=""
1259 ;; 1276 ;;
1260 esac 1277 esac
1278 ;;
1279 *icc*)
1280 PGO_PROF_GEN_FLAG="-prof-gen"
1281 PGO_PROF_USE_FLAG="-prof-use"
1282 LLVM_PROF_MERGER="true"
1283 LLVM_PROF_FILE=""
1261 ;; 1284 ;;
1262 esac 1285 esac
1263 1286
1264 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be 1287 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
1265 # merged with this chunk of code? 1288 # merged with this chunk of code?
1266 1289
1267 # Optimizer/debugger flags 1290 # Optimizer/debugger flags
1268 # ------------------------ 1291 # ------------------------
1269 # (The following bit of code is complicated enough - please keep things 1292 # (The following bit of code is complicated enough - please keep things
1270 # indented properly. Just pretend you're editing Python code. ;-) 1293 # indented properly. Just pretend you're editing Python code. ;-)
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 ac_cv_no_strict_aliasing=no 1386 ac_cv_no_strict_aliasing=no
1364 ])) 1387 ]))
1365 CFLAGS="$save_CFLAGS" 1388 CFLAGS="$save_CFLAGS"
1366 CC="$ac_save_cc" 1389 CC="$ac_save_cc"
1367 AC_MSG_RESULT($ac_cv_no_strict_aliasing) 1390 AC_MSG_RESULT($ac_cv_no_strict_aliasing)
1368 if test $ac_cv_no_strict_aliasing = yes 1391 if test $ac_cv_no_strict_aliasing = yes
1369 then 1392 then
1370 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" 1393 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1371 fi 1394 fi
1372 1395
1396 # ICC doesn't recognize the option, but only emits a warning
1397 ## XXX does it emit an unused result warning and can it be disabled?
1398 case "$CC" in
1399 *icc*)
1400 ac_cv_disable_unused_result_warning=no
1401 ;;
1402 *)
1373 AC_MSG_CHECKING(if we can turn off $CC unused result warning) 1403 AC_MSG_CHECKING(if we can turn off $CC unused result warning)
1374 ac_save_cc="$CC" 1404 ac_save_cc="$CC"
1375 CC="$CC -Wunused-result -Werror" 1405 CC="$CC -Wunused-result -Werror"
1376 save_CFLAGS="$CFLAGS" 1406 save_CFLAGS="$CFLAGS"
1377 AC_CACHE_VAL(ac_cv_disable_unused_result_warning, 1407 AC_CACHE_VAL(ac_cv_disable_unused_result_warning,
1378 AC_COMPILE_IFELSE( 1408 AC_COMPILE_IFELSE(
1379 [ 1409 [
1380 AC_LANG_PROGRAM([[]], [[]]) 1410 AC_LANG_PROGRAM([[]], [[]])
1381 ],[ 1411 ],[
1382 ac_cv_disable_unused_result_warning=yes 1412 ac_cv_disable_unused_result_warning=yes
1383 ],[ 1413 ],[
1384 ac_cv_disable_unused_result_warning=no 1414 ac_cv_disable_unused_result_warning=no
1385 ])) 1415 ]))
1386 CFLAGS="$save_CFLAGS" 1416 CFLAGS="$save_CFLAGS"
1387 CC="$ac_save_cc" 1417 CC="$ac_save_cc"
1388 AC_MSG_RESULT($ac_cv_disable_unused_result_warning) 1418 AC_MSG_RESULT($ac_cv_disable_unused_result_warning)
1419 ;;
1420 esac
1389 1421
1390 if test $ac_cv_disable_unused_result_warning = yes 1422 if test $ac_cv_disable_unused_result_warning = yes
1391 then 1423 then
1392 BASECFLAGS="$BASECFLAGS -Wno-unused-result" 1424 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
1393 fi 1425 fi
1394 1426
1395 AC_MSG_CHECKING(for -Werror=declaration-after-statement) 1427 AC_MSG_CHECKING(for -Werror=declaration-after-statement)
1396 ac_save_cc="$CC" 1428 ac_save_cc="$CC"
1397 CC="$CC -Werror=declaration-after-statement" 1429 CC="$CC -Werror=declaration-after-statement"
1398 save_CFLAGS="$CFLAGS" 1430 save_CFLAGS="$CFLAGS"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 1630
1599 *) 1631 *)
1600 case $ac_sys_system in 1632 case $ac_sys_system in
1601 OpenUNIX*|UnixWare*) 1633 OpenUNIX*|UnixWare*)
1602 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " 1634 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
1603 ;; 1635 ;;
1604 SCO_SV*) 1636 SCO_SV*)
1605 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" 1637 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
1606 ;; 1638 ;;
1607 esac 1639 esac
1640 ;;
1641 esac
1642
1643 # ICC needs -fp-model strict or floats behave badly
1644 case "$CC" in
1645 *icc*)
1646 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
1608 ;; 1647 ;;
1609 esac 1648 esac
1610 1649
1611 if test "$Py_DEBUG" = 'true'; then 1650 if test "$Py_DEBUG" = 'true'; then
1612 : 1651 :
1613 else 1652 else
1614 OPT="-DNDEBUG $OPT" 1653 OPT="-DNDEBUG $OPT"
1615 fi 1654 fi
1616 1655
1617 if test "$ac_arch_flags" 1656 if test "$ac_arch_flags"
(...skipping 3592 matching lines...) Expand 10 before | Expand all | Expand 10 after
5210 if test ! -f Modules/Setup.local 5249 if test ! -f Modules/Setup.local
5211 then 5250 then
5212 echo "# Edit this file for local setup changes" >Modules/Setup.local 5251 echo "# Edit this file for local setup changes" >Modules/Setup.local
5213 fi 5252 fi
5214 5253
5215 echo "creating Makefile" >&AS_MESSAGE_FD 5254 echo "creating Makefile" >&AS_MESSAGE_FD
5216 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 5255 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
5217 -s Modules Modules/Setup.config \ 5256 -s Modules Modules/Setup.config \
5218 Modules/Setup.local Modules/Setup 5257 Modules/Setup.local Modules/Setup
5219 mv config.c Modules 5258 mv config.c Modules
OLDNEW
« no previous file with comments | « no previous file | .gitignore » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+