Changeset 3771cc6e in rtems
- Timestamp:
- 02/17/98 13:48:43 (25 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 81e0232
- Parents:
- b4589477
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
rb4589477 r3771cc6e 28 28 ac_help="$ac_help 29 29 \ 30 --enable-c ppenable C++ support, and build the rtems++ library"30 --enable-cxx enable C++ support, and build the rtems++ library" 31 31 ac_help="$ac_help 32 32 \ … … 751 751 752 752 753 # Check whether --enable-c pp or --disable-cppwas given.754 if test "${enable_c pp+set}" = set; then755 enableval="$enable_c pp"753 # Check whether --enable-cxx or --disable-cxx was given. 754 if test "${enable_cxx+set}" = set; then 755 enableval="$enable_cxx" 756 756 \ 757 757 case "${enableval}" in 758 758 yes) RTEMS_HAS_CPLUSPLUS=yes ;; 759 759 no) RTEMS_HAS_CPLUSPLUS=no ;; 760 *) { echo "configure: error: bad value ${enableval} for enable-c ppoption" 1>&2; exit 1; } ;;760 *) { echo "configure: error: bad value ${enableval} for enable-cxx option" 1>&2; exit 1; } ;; 761 761 esac 762 762 else … … 1029 1029 fi 1030 1030 1031 for ac_func in strerror1032 do1033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&61034 echo "configure:1035: checking for $ac_func" >&51035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then1036 echo $ac_n "(cached) $ac_c" 1>&61037 else1038 cat > conftest.$ac_ext <<EOF1039 #line 1040 "configure"1040 #include "confdefs.h"1041 /* System header to define __stub macros and hopefully few prototypes,1042 which can conflict with char $ac_func(); below. */1043 #include <assert.h>1044 /* Override any gcc2 internal prototype to avoid an error. */1045 /* We use char because int might match the return type of a gcc21046 builtin and then its argument prototype would still apply. */1047 char $ac_func();1048 1049 int main() {1050 1051 /* The GNU C library defines this for functions which it implements1052 to always fail with ENOSYS. Some functions are actually named1053 something starting with __ and the normal name is an alias. */1054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)1055 choke me1056 #else1057 $ac_func();1058 #endif1059 1060 ; return 0; }1061 EOF1062 if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then1063 rm -rf conftest*1064 eval "ac_cv_func_$ac_func=yes"1065 else1066 echo "configure: failed program was:" >&51067 cat conftest.$ac_ext >&51068 rm -rf conftest*1069 eval "ac_cv_func_$ac_func=no"1070 fi1071 rm -f conftest*1072 fi1073 1074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then1075 echo "$ac_t""yes" 1>&61076 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`1077 cat >> confdefs.h <<EOF1078 #define $ac_tr_func 11079 EOF1080 1081 else1082 echo "$ac_t""no" 1>&61083 fi1084 done1085 1086 1031 1087 1032 # Extract the first word of "mkdir", so it can be a program name with args. 1088 1033 set dummy mkdir; ac_word=$2 1089 1034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1090 echo "configure:10 91: checking for $ac_word" >&51035 echo "configure:1036: checking for $ac_word" >&5 1091 1036 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then 1092 1037 echo $ac_n "(cached) $ac_c" 1>&6 … … 1120 1065 1121 1066 echo $ac_n "checking for working $MKDIR -m 0755""... $ac_c" 1>&6 1122 echo "configure:1 123: checking for working $MKDIR -m 0755" >&51067 echo "configure:1068: checking for working $MKDIR -m 0755" >&5 1123 1068 if eval "test \"`echo '$''{'rtems_cv_prog_MKDIR_P'+set}'`\" = set"; then 1124 1069 echo $ac_n "(cached) $ac_c" 1>&6 … … 1137 1082 1138 1083 echo $ac_n "checking for working $MKDIR -p""... $ac_c" 1>&6 1139 echo "configure:1 140: checking for working $MKDIR -p" >&51084 echo "configure:1085: checking for working $MKDIR -p" >&5 1140 1085 if eval "test \"`echo '$''{'rtems_cv_prog_mkdir_p'+set}'`\" = set"; then 1141 1086 echo $ac_n "(cached) $ac_c" 1>&6 … … 1157 1102 set dummy touch; ac_word=$2 1158 1103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1159 echo "configure:11 60: checking for $ac_word" >&51104 echo "configure:1105: checking for $ac_word" >&5 1160 1105 if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then 1161 1106 echo $ac_n "(cached) $ac_c" 1>&6 … … 1188 1133 set dummy cmp; ac_word=$2 1189 1134 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1190 echo "configure:11 91: checking for $ac_word" >&51135 echo "configure:1136: checking for $ac_word" >&5 1191 1136 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then 1192 1137 echo $ac_n "(cached) $ac_c" 1>&6 … … 1220 1165 set dummy sed; ac_word=$2 1221 1166 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1222 echo "configure:1 223: checking for $ac_word" >&51167 echo "configure:1168: checking for $ac_word" >&5 1223 1168 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then 1224 1169 echo $ac_n "(cached) $ac_c" 1>&6 … … 1253 1198 set dummy $ac_prog; ac_word=$2 1254 1199 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1255 echo "configure:12 56: checking for $ac_word" >&51200 echo "configure:1201: checking for $ac_word" >&5 1256 1201 if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then 1257 1202 echo $ac_n "(cached) $ac_c" 1>&6 … … 1290 1235 set dummy $ac_prog; ac_word=$2 1291 1236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1292 echo "configure:12 93: checking for $ac_word" >&51237 echo "configure:1238: checking for $ac_word" >&5 1293 1238 if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then 1294 1239 echo $ac_n "(cached) $ac_c" 1>&6 … … 1327 1272 Please contact your system administrator " 1>&2; exit 1; }; 1328 1273 fi 1329 1330 1274 1331 1275 … … 1364 1308 *) 1365 1309 echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6 1366 echo "configure:13 67: checking rtems target cpu" >&51310 echo "configure:1311: checking rtems target cpu" >&5 1367 1311 target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` 1368 1312 echo "$ac_t""$target_cpu" 1>&6 … … 1383 1327 # Is this a supported CPU? 1384 1328 echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6 1385 echo "configure:13 86: checking if cpu $target_cpu is supported" >&51329 echo "configure:1330: checking if cpu $target_cpu is supported" >&5 1386 1330 if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then 1387 1331 echo "$ac_t""yes" 1>&6 … … 1391 1335 fi 1392 1336 1337 1338 if [ "${program_prefix}" = "NONE" ] ; then 1339 if [ "${target}" = "${host}" ] ; then 1340 program_prefix= 1341 else 1342 program_prefix=${target}- 1343 fi 1344 fi 1345 1346 CC="$program_prefix"gcc 1347 1348 # Extract the first word of "gcc", so it can be a program name with args. 1349 set dummy gcc; ac_word=$2 1350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1351 echo "configure:1352: checking for $ac_word" >&5 1352 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 1353 echo $ac_n "(cached) $ac_c" 1>&6 1354 else 1355 if test -n "$CC"; then 1356 ac_cv_prog_CC="$CC" # Let the user override the test. 1357 else 1358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1359 for ac_dir in $PATH; do 1360 test -z "$ac_dir" && ac_dir=. 1361 if test -f $ac_dir/$ac_word; then 1362 ac_cv_prog_CC="gcc" 1363 break 1364 fi 1365 done 1366 IFS="$ac_save_ifs" 1367 fi 1368 fi 1369 CC="$ac_cv_prog_CC" 1370 if test -n "$CC"; then 1371 echo "$ac_t""$CC" 1>&6 1372 else 1373 echo "$ac_t""no" 1>&6 1374 fi 1375 1376 if test -z "$CC"; then 1377 # Extract the first word of "cc", so it can be a program name with args. 1378 set dummy cc; ac_word=$2 1379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1380 echo "configure:1381: checking for $ac_word" >&5 1381 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 1382 echo $ac_n "(cached) $ac_c" 1>&6 1383 else 1384 if test -n "$CC"; then 1385 ac_cv_prog_CC="$CC" # Let the user override the test. 1386 else 1387 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1388 ac_prog_rejected=no 1389 for ac_dir in $PATH; do 1390 test -z "$ac_dir" && ac_dir=. 1391 if test -f $ac_dir/$ac_word; then 1392 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 1393 ac_prog_rejected=yes 1394 continue 1395 fi 1396 ac_cv_prog_CC="cc" 1397 break 1398 fi 1399 done 1400 IFS="$ac_save_ifs" 1401 if test $ac_prog_rejected = yes; then 1402 # We found a bogon in the path, so make sure we never use it. 1403 set dummy $ac_cv_prog_CC 1404 shift 1405 if test $# -gt 0; then 1406 # We chose a different compiler from the bogus one. 1407 # However, it has the same basename, so the bogon will be chosen 1408 # first if we set CC to just the basename; use the full file name. 1409 shift 1410 set dummy "$ac_dir/$ac_word" "$@" 1411 shift 1412 ac_cv_prog_CC="$@" 1413 fi 1414 fi 1415 fi 1416 fi 1417 CC="$ac_cv_prog_CC" 1418 if test -n "$CC"; then 1419 echo "$ac_t""$CC" 1>&6 1420 else 1421 echo "$ac_t""no" 1>&6 1422 fi 1423 1424 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 1425 fi 1426 1427 echo $ac_n "checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 1428 echo "configure:1429: checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 1429 1430 ac_ext=c 1431 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 1432 ac_cpp='$CPP $CPPFLAGS' 1433 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 1434 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 1435 cross_compiling=$ac_cv_prog_cc_cross 1436 1437 cat > conftest.$ac_ext <<EOF 1438 #line 1439 "configure" 1439 #include "confdefs.h" 1440 void *malloc() { return 0; } 1441 main(){return(0);} 1442 EOF 1443 if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 1444 rtems_cv_prog_cc_works=yes 1445 # If we can't run a trivial program, we are probably using a cross compiler. 1446 if (./conftest; exit) 2>/dev/null; then 1447 rtems_cv_prog_cc_cross=no 1448 else 1449 rtems_cv_prog_cc_cross=yes 1450 fi 1451 else 1452 echo "configure: failed program was:" >&5 1453 cat conftest.$ac_ext >&5 1454 rtems_cv_prog_cc_works=no 1455 fi 1456 rm -fr conftest* 1457 1458 echo "$ac_t""$rtems_cv_prog_cc_works" 1>&6 1459 if test $rtems_cv_prog_cc_works = no; then 1460 { echo "configure: error: installation or configuration problem: target C compiler cannot create executables." 1>&2; exit 1; } 1461 fi 1462 echo $ac_n "checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 1463 echo "configure:1464: checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 1464 echo "$ac_t""$rtems_cv_prog_cc_cross" 1>&6 1465 1466 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 1467 echo "configure:1468: checking whether we are using GNU C" >&5 1468 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 1469 echo $ac_n "(cached) $ac_c" 1>&6 1470 else 1471 cat > conftest.c <<EOF 1472 #ifdef __GNUC__ 1473 yes; 1474 #endif 1475 EOF 1476 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 1477 ac_cv_prog_gcc=yes 1478 else 1479 ac_cv_prog_gcc=no 1480 fi 1481 fi 1482 1483 echo "$ac_t""$ac_cv_prog_gcc" 1>&6 1484 1485 if test $ac_cv_prog_gcc = yes; then 1486 GCC=yes 1487 ac_test_CFLAGS="${CFLAGS+set}" 1488 ac_save_CFLAGS="$CFLAGS" 1489 CFLAGS= 1490 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 1491 echo "configure:1492: checking whether ${CC-cc} accepts -g" >&5 1492 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 1493 echo $ac_n "(cached) $ac_c" 1>&6 1494 else 1495 echo 'void f(){}' > conftest.c 1496 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 1497 ac_cv_prog_cc_g=yes 1498 else 1499 ac_cv_prog_cc_g=no 1500 fi 1501 rm -f conftest* 1502 1503 fi 1504 1505 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 1506 if test "$ac_test_CFLAGS" = set; then 1507 CFLAGS="$ac_save_CFLAGS" 1508 elif test $ac_cv_prog_cc_g = yes; then 1509 CFLAGS="-g -O2" 1510 else 1511 CFLAGS="-O2" 1512 fi 1513 else 1514 GCC= 1515 test "${CFLAGS+set}" = set || CFLAGS="-g" 1516 fi 1517 1518 CC_FOR_TARGET=$CC 1519 rtems_cv_prog_gcc=$ac_cv_prog_gcc 1520 rtems_cv_prog_cc_g=$ac_cv_prog_cc_g 1521 1522 unset CC 1523 unset ac_cv_prog_gcc 1524 unset ac_cv_prog_cc_g 1525 unset ac_cv_prog_CC 1526 1527 1528 if test "$RTEMS_USE_GCC272" != "yes" ; then 1529 1530 echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6 1531 echo "configure:1532: checking whether $CC_FOR_TARGET accepts -specs" >&5 1532 if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then 1533 echo $ac_n "(cached) $ac_c" 1>&6 1534 else 1535 touch confspec 1536 echo 'void f(){}' >conftest.c 1537 if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then 1538 rtems_cv_gcc_specs=yes 1539 else 1540 rtems_cv_gcc_specs=no 1541 fi 1542 rm -f confspec conftest* 1543 1544 fi 1545 1546 echo "$ac_t""$rtems_cv_gcc_specs" 1>&6 1547 if test "$rtems_cv_gcc_specs" = "no"; then 1548 echo "configure: warning: *** disabling --enable-gcc28" 1>&2 1549 RTEMS_USE_GCC272=yes 1550 fi 1551 fi 1552 1553 1554 echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6 1555 echo "configure:1556: checking whether $CC_FOR_TARGET accepts --pipe" >&5 1556 if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then 1557 echo $ac_n "(cached) $ac_c" 1>&6 1558 else 1559 1560 echo 'void f(){}' >conftest.c 1561 if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then 1562 rtems_cv_gcc_pipe=yes 1563 else 1564 rtems_cv_gcc_pipe=no 1565 fi 1566 rm -f conftest* 1567 1568 fi 1569 1570 echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6 1571 1572 if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then 1573 CXX="$program_prefix"g++ 1574 1575 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ 1576 do 1577 # Extract the first word of "$ac_prog", so it can be a program name with args. 1578 set dummy $ac_prog; ac_word=$2 1579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1580 echo "configure:1581: checking for $ac_word" >&5 1581 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then 1582 echo $ac_n "(cached) $ac_c" 1>&6 1583 else 1584 if test -n "$CXX"; then 1585 ac_cv_prog_CXX="$CXX" # Let the user override the test. 1586 else 1587 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1588 for ac_dir in $PATH; do 1589 test -z "$ac_dir" && ac_dir=. 1590 if test -f $ac_dir/$ac_word; then 1591 ac_cv_prog_CXX="$ac_prog" 1592 break 1593 fi 1594 done 1595 IFS="$ac_save_ifs" 1596 fi 1597 fi 1598 CXX="$ac_cv_prog_CXX" 1599 if test -n "$CXX"; then 1600 echo "$ac_t""$CXX" 1>&6 1601 else 1602 echo "$ac_t""no" 1>&6 1603 fi 1604 1605 test -n "$CXX" && break 1606 done 1607 test -n "$CXX" || CXX="gcc" 1608 1609 1610 echo $ac_n "checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 1611 echo "configure:1612: checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 1612 1613 ac_ext=C 1614 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 1615 ac_cpp='$CXXCPP $CPPFLAGS' 1616 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 1617 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 1618 cross_compiling=$ac_cv_prog_cxx_cross 1619 1620 1621 cat > conftest.$ac_ext <<EOF 1622 #line 1623 "configure" 1623 #include "confdefs.h" 1624 main(){return(0);} 1625 EOF 1626 if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 1627 rtems_cv_prog_cxx_works=yes 1628 # If we can't run a trivial program, we are probably using a cross compiler. 1629 if (./conftest; exit) 2>/dev/null; then 1630 rtems_cv_prog_cxx_cross=no 1631 else 1632 rtems_cv_prog_cxx_cross=yes 1633 fi 1634 else 1635 echo "configure: failed program was:" >&5 1636 cat conftest.$ac_ext >&5 1637 rtems_cv_prog_cxx_works=no 1638 fi 1639 rm -fr conftest* 1640 if test "$rtems_cv_prog_cxx_works" = "no"; then 1641 cat > conftest.$ac_ext <<EOF 1642 #line 1643 "configure" 1643 #include "confdefs.h" 1644 extern "C" void *malloc(); 1645 void *malloc() { return (0); } 1646 main(){return(0);} 1647 EOF 1648 if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 1649 rtems_cv_prog_cxx_works=yes 1650 # If we can't run a trivial program, we are probably using a cross compiler. 1651 if (./conftest; exit) 2>/dev/null; then 1652 rtems_cv_prog_cxx_cross=no 1653 else 1654 rtems_cv_prog_cxx_cross=yes 1655 fi 1656 else 1657 echo "configure: failed program was:" >&5 1658 cat conftest.$ac_ext >&5 1659 rtems_cv_prog_cxx_works=no 1660 fi 1661 rm -fr conftest* 1662 fi 1663 ac_ext=c 1664 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 1665 ac_cpp='$CPP $CPPFLAGS' 1666 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 1667 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 1668 cross_compiling=$ac_cv_prog_cc_cross 1669 1670 echo "$ac_t""$rtems_cv_prog_cxx_works" 1>&6 1671 if test $rtems_cv_prog_cxx_works = no; then 1672 { echo "configure: error: installation or configuration problem: target C++ compiler cannot create executables." 1>&2; exit 1; } 1673 fi 1674 echo $ac_n "checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 1675 echo "configure:1676: checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 1676 echo "$ac_t""$rtems_cv_prog_cxx_cross" 1>&6 1677 1678 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 1679 echo "configure:1680: checking whether we are using GNU C++" >&5 1680 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then 1681 echo $ac_n "(cached) $ac_c" 1>&6 1682 else 1683 cat > conftest.C <<EOF 1684 #ifdef __GNUC__ 1685 yes; 1686 #endif 1687 EOF 1688 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 1689 ac_cv_prog_gxx=yes 1690 else 1691 ac_cv_prog_gxx=no 1692 fi 1693 fi 1694 1695 echo "$ac_t""$ac_cv_prog_gxx" 1>&6 1696 1697 if test $ac_cv_prog_gxx = yes; then 1698 GXX=yes 1699 ac_test_CXXFLAGS="${CXXFLAGS+set}" 1700 ac_save_CXXFLAGS="$CXXFLAGS" 1701 CXXFLAGS= 1702 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 1703 echo "configure:1704: checking whether ${CXX-g++} accepts -g" >&5 1704 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then 1705 echo $ac_n "(cached) $ac_c" 1>&6 1706 else 1707 echo 'void f(){}' > conftest.cc 1708 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then 1709 ac_cv_prog_cxx_g=yes 1710 else 1711 ac_cv_prog_cxx_g=no 1712 fi 1713 rm -f conftest* 1714 1715 fi 1716 1717 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 1718 if test "$ac_test_CXXFLAGS" = set; then 1719 CXXFLAGS="$ac_save_CXXFLAGS" 1720 elif test $ac_cv_prog_cxx_g = yes; then 1721 CXXFLAGS="-g -O2" 1722 else 1723 CXXFLAGS="-O2" 1724 fi 1725 else 1726 GXX= 1727 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" 1728 fi 1729 CXX_FOR_TARGET=$CXX 1730 1731 unset CXX 1732 unset ac_cv_prog_gxx 1733 1734 # Extract the first word of ""$program_prefix"g++", so it can be a program name with args. 1735 set dummy "$program_prefix"g++; ac_word=$2 1736 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1737 echo "configure:1738: checking for $ac_word" >&5 1738 if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then 1739 echo $ac_n "(cached) $ac_c" 1>&6 1740 else 1741 case "$CXX_FOR_TARGET" in 1742 /*) 1743 ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a path. 1744 ;; 1745 *) 1746 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1747 for ac_dir in $PATH; do 1748 test -z "$ac_dir" && ac_dir=. 1749 if test -f $ac_dir/$ac_word; then 1750 ac_cv_path_CXX_FOR_TARGET="$ac_dir/$ac_word" 1751 break 1752 fi 1753 done 1754 IFS="$ac_save_ifs" 1755 test -z "$ac_cv_path_CXX_FOR_TARGET" && ac_cv_path_CXX_FOR_TARGET="no" 1756 ;; 1757 esac 1758 fi 1759 CXX_FOR_TARGET="$ac_cv_path_CXX_FOR_TARGET" 1760 if test -n "$CXX_FOR_TARGET"; then 1761 echo "$ac_t""$CXX_FOR_TARGET" 1>&6 1762 else 1763 echo "$ac_t""no" 1>&6 1764 fi 1765 1766 else 1767 CXX_FOR_TARGET="no" 1768 fi 1769 1770 if test "$rtems_cv_prog_gcc" = "yes" ; then 1771 AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar` 1772 AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as` 1773 LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld` 1774 NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm` 1775 RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib` 1776 fi 1777 1778 1779 # Extract the first word of ""$program_prefix"gcc", so it can be a program name with args. 1780 set dummy "$program_prefix"gcc; ac_word=$2 1781 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1782 echo "configure:1783: checking for $ac_word" >&5 1783 if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then 1784 echo $ac_n "(cached) $ac_c" 1>&6 1785 else 1786 case "$CC_FOR_TARGET" in 1787 /*) 1788 ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path. 1789 ;; 1790 *) 1791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1792 for ac_dir in $PATH; do 1793 test -z "$ac_dir" && ac_dir=. 1794 if test -f $ac_dir/$ac_word; then 1795 ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word" 1796 break 1797 fi 1798 done 1799 IFS="$ac_save_ifs" 1800 test -z "$ac_cv_path_CC_FOR_TARGET" && ac_cv_path_CC_FOR_TARGET="no" 1801 ;; 1802 esac 1803 fi 1804 CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET" 1805 if test -n "$CC_FOR_TARGET"; then 1806 echo "$ac_t""$CC_FOR_TARGET" 1>&6 1807 else 1808 echo "$ac_t""no" 1>&6 1809 fi 1810 1811 1812 # Extract the first word of ""$program_prefix"ar", so it can be a program name with args. 1813 set dummy "$program_prefix"ar; ac_word=$2 1814 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1815 echo "configure:1816: checking for $ac_word" >&5 1816 if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then 1817 echo $ac_n "(cached) $ac_c" 1>&6 1818 else 1819 case "$AR_FOR_TARGET" in 1820 /*) 1821 ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path. 1822 ;; 1823 *) 1824 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1825 for ac_dir in $PATH; do 1826 test -z "$ac_dir" && ac_dir=. 1827 if test -f $ac_dir/$ac_word; then 1828 ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word" 1829 break 1830 fi 1831 done 1832 IFS="$ac_save_ifs" 1833 test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no" 1834 ;; 1835 esac 1836 fi 1837 AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET" 1838 if test -n "$AR_FOR_TARGET"; then 1839 echo "$ac_t""$AR_FOR_TARGET" 1>&6 1840 else 1841 echo "$ac_t""no" 1>&6 1842 fi 1843 1844 # Extract the first word of ""$program_prefix"as", so it can be a program name with args. 1845 set dummy "$program_prefix"as; ac_word=$2 1846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1847 echo "configure:1848: checking for $ac_word" >&5 1848 if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then 1849 echo $ac_n "(cached) $ac_c" 1>&6 1850 else 1851 case "$AS_FOR_TARGET" in 1852 /*) 1853 ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path. 1854 ;; 1855 *) 1856 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1857 for ac_dir in $PATH; do 1858 test -z "$ac_dir" && ac_dir=. 1859 if test -f $ac_dir/$ac_word; then 1860 ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word" 1861 break 1862 fi 1863 done 1864 IFS="$ac_save_ifs" 1865 test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no" 1866 ;; 1867 esac 1868 fi 1869 AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET" 1870 if test -n "$AS_FOR_TARGET"; then 1871 echo "$ac_t""$AS_FOR_TARGET" 1>&6 1872 else 1873 echo "$ac_t""no" 1>&6 1874 fi 1875 1876 # Extract the first word of ""$program_prefix"nm", so it can be a program name with args. 1877 set dummy "$program_prefix"nm; ac_word=$2 1878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1879 echo "configure:1880: checking for $ac_word" >&5 1880 if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then 1881 echo $ac_n "(cached) $ac_c" 1>&6 1882 else 1883 case "$NM_FOR_TARGET" in 1884 /*) 1885 ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path. 1886 ;; 1887 *) 1888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1889 for ac_dir in $PATH; do 1890 test -z "$ac_dir" && ac_dir=. 1891 if test -f $ac_dir/$ac_word; then 1892 ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word" 1893 break 1894 fi 1895 done 1896 IFS="$ac_save_ifs" 1897 test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no" 1898 ;; 1899 esac 1900 fi 1901 NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET" 1902 if test -n "$NM_FOR_TARGET"; then 1903 echo "$ac_t""$NM_FOR_TARGET" 1>&6 1904 else 1905 echo "$ac_t""no" 1>&6 1906 fi 1907 1908 # Extract the first word of ""$program_prefix"ld", so it can be a program name with args. 1909 set dummy "$program_prefix"ld; ac_word=$2 1910 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1911 echo "configure:1912: checking for $ac_word" >&5 1912 if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then 1913 echo $ac_n "(cached) $ac_c" 1>&6 1914 else 1915 case "$LD_FOR_TARGET" in 1916 /*) 1917 ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path. 1918 ;; 1919 *) 1920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1921 for ac_dir in $PATH; do 1922 test -z "$ac_dir" && ac_dir=. 1923 if test -f $ac_dir/$ac_word; then 1924 ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word" 1925 break 1926 fi 1927 done 1928 IFS="$ac_save_ifs" 1929 test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no" 1930 ;; 1931 esac 1932 fi 1933 LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET" 1934 if test -n "$LD_FOR_TARGET"; then 1935 echo "$ac_t""$LD_FOR_TARGET" 1>&6 1936 else 1937 echo "$ac_t""no" 1>&6 1938 fi 1939 1940 1941 # Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args. 1942 set dummy "$program_prefix"ranlib; ac_word=$2 1943 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1944 echo "configure:1945: checking for $ac_word" >&5 1945 if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then 1946 echo $ac_n "(cached) $ac_c" 1>&6 1947 else 1948 case "$RANLIB_FOR_TARGET" in 1949 /*) 1950 ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path. 1951 ;; 1952 *) 1953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1954 for ac_dir in $PATH; do 1955 test -z "$ac_dir" && ac_dir=. 1956 if test -f $ac_dir/$ac_word; then 1957 ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word" 1958 break 1959 fi 1960 done 1961 IFS="$ac_save_ifs" 1962 test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no" 1963 ;; 1964 esac 1965 fi 1966 RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET" 1967 if test -n "$RANLIB_FOR_TARGET"; then 1968 echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6 1969 else 1970 echo "$ac_t""no" 1>&6 1971 fi 1972 1973 1974 # Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args. 1975 set dummy "$program_prefix"objcopy; ac_word=$2 1976 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1977 echo "configure:1978: checking for $ac_word" >&5 1978 if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then 1979 echo $ac_n "(cached) $ac_c" 1>&6 1980 else 1981 case "$OBJCOPY_FOR_TARGET" in 1982 /*) 1983 ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path. 1984 ;; 1985 *) 1986 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1987 for ac_dir in $PATH; do 1988 test -z "$ac_dir" && ac_dir=. 1989 if test -f $ac_dir/$ac_word; then 1990 ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word" 1991 break 1992 fi 1993 done 1994 IFS="$ac_save_ifs" 1995 test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no" 1996 ;; 1997 esac 1998 fi 1999 OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET" 2000 if test -n "$OBJCOPY_FOR_TARGET"; then 2001 echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6 2002 else 2003 echo "$ac_t""no" 1>&6 2004 fi 2005 2006 # Extract the first word of ""$program_prefix"size", so it can be a program name with args. 2007 set dummy "$program_prefix"size; ac_word=$2 2008 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2009 echo "configure:2010: checking for $ac_word" >&5 2010 if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then 2011 echo $ac_n "(cached) $ac_c" 1>&6 2012 else 2013 case "$SIZE_FOR_TARGET" in 2014 /*) 2015 ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path. 2016 ;; 2017 *) 2018 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 2019 for ac_dir in $PATH; do 2020 test -z "$ac_dir" && ac_dir=. 2021 if test -f $ac_dir/$ac_word; then 2022 ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word" 2023 break 2024 fi 2025 done 2026 IFS="$ac_save_ifs" 2027 test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no" 2028 ;; 2029 esac 2030 fi 2031 SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET" 2032 if test -n "$SIZE_FOR_TARGET"; then 2033 echo "$ac_t""$SIZE_FOR_TARGET" 1>&6 2034 else 2035 echo "$ac_t""no" 1>&6 2036 fi 2037 2038 2039 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" 2040 2041 # Extract the first word of "gcc", so it can be a program name with args. 2042 set dummy gcc; ac_word=$2 2043 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2044 echo "configure:2045: checking for $ac_word" >&5 2045 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 2046 echo $ac_n "(cached) $ac_c" 1>&6 2047 else 2048 if test -n "$CC"; then 2049 ac_cv_prog_CC="$CC" # Let the user override the test. 2050 else 2051 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 2052 for ac_dir in $PATH; do 2053 test -z "$ac_dir" && ac_dir=. 2054 if test -f $ac_dir/$ac_word; then 2055 ac_cv_prog_CC="gcc" 2056 break 2057 fi 2058 done 2059 IFS="$ac_save_ifs" 2060 fi 2061 fi 2062 CC="$ac_cv_prog_CC" 2063 if test -n "$CC"; then 2064 echo "$ac_t""$CC" 1>&6 2065 else 2066 echo "$ac_t""no" 1>&6 2067 fi 2068 2069 if test -z "$CC"; then 2070 # Extract the first word of "cc", so it can be a program name with args. 2071 set dummy cc; ac_word=$2 2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2073 echo "configure:2074: checking for $ac_word" >&5 2074 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 2075 echo $ac_n "(cached) $ac_c" 1>&6 2076 else 2077 if test -n "$CC"; then 2078 ac_cv_prog_CC="$CC" # Let the user override the test. 2079 else 2080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 2081 ac_prog_rejected=no 2082 for ac_dir in $PATH; do 2083 test -z "$ac_dir" && ac_dir=. 2084 if test -f $ac_dir/$ac_word; then 2085 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 2086 ac_prog_rejected=yes 2087 continue 2088 fi 2089 ac_cv_prog_CC="cc" 2090 break 2091 fi 2092 done 2093 IFS="$ac_save_ifs" 2094 if test $ac_prog_rejected = yes; then 2095 # We found a bogon in the path, so make sure we never use it. 2096 set dummy $ac_cv_prog_CC 2097 shift 2098 if test $# -gt 0; then 2099 # We chose a different compiler from the bogus one. 2100 # However, it has the same basename, so the bogon will be chosen 2101 # first if we set CC to just the basename; use the full file name. 2102 shift 2103 set dummy "$ac_dir/$ac_word" "$@" 2104 shift 2105 ac_cv_prog_CC="$@" 2106 fi 2107 fi 2108 fi 2109 fi 2110 CC="$ac_cv_prog_CC" 2111 if test -n "$CC"; then 2112 echo "$ac_t""$CC" 1>&6 2113 else 2114 echo "$ac_t""no" 1>&6 2115 fi 2116 2117 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 2118 fi 2119 2120 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 2121 echo "configure:2122: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 2122 2123 ac_ext=c 2124 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 2125 ac_cpp='$CPP $CPPFLAGS' 2126 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 2127 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 2128 cross_compiling=$ac_cv_prog_cc_cross 2129 2130 cat > conftest.$ac_ext <<EOF 2131 #line 2132 "configure" 2132 #include "confdefs.h" 2133 main(){return(0);} 2134 EOF 2135 if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 2136 ac_cv_prog_cc_works=yes 2137 # If we can't run a trivial program, we are probably using a cross compiler. 2138 if (./conftest; exit) 2>/dev/null; then 2139 ac_cv_prog_cc_cross=no 2140 else 2141 ac_cv_prog_cc_cross=yes 2142 fi 2143 else 2144 echo "configure: failed program was:" >&5 2145 cat conftest.$ac_ext >&5 2146 ac_cv_prog_cc_works=no 2147 fi 2148 rm -fr conftest* 2149 2150 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 2151 if test $ac_cv_prog_cc_works = no; then 2152 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } 2153 fi 2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 2156 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 2157 cross_compiling=$ac_cv_prog_cc_cross 2158 2159 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 2160 echo "configure:2161: checking whether we are using GNU C" >&5 2161 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 2162 echo $ac_n "(cached) $ac_c" 1>&6 2163 else 2164 cat > conftest.c <<EOF 2165 #ifdef __GNUC__ 2166 yes; 2167 #endif 2168 EOF 2169 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 2170 ac_cv_prog_gcc=yes 2171 else 2172 ac_cv_prog_gcc=no 2173 fi 2174 fi 2175 2176 echo "$ac_t""$ac_cv_prog_gcc" 1>&6 2177 2178 if test $ac_cv_prog_gcc = yes; then 2179 GCC=yes 2180 ac_test_CFLAGS="${CFLAGS+set}" 2181 ac_save_CFLAGS="$CFLAGS" 2182 CFLAGS= 2183 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 2184 echo "configure:2185: checking whether ${CC-cc} accepts -g" >&5 2185 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 2186 echo $ac_n "(cached) $ac_c" 1>&6 2187 else 2188 echo 'void f(){}' > conftest.c 2189 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 2190 ac_cv_prog_cc_g=yes 2191 else 2192 ac_cv_prog_cc_g=no 2193 fi 2194 rm -f conftest* 2195 2196 fi 2197 2198 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 2199 if test "$ac_test_CFLAGS" = set; then 2200 CFLAGS="$ac_save_CFLAGS" 2201 elif test $ac_cv_prog_cc_g = yes; then 2202 CFLAGS="-g -O2" 2203 else 2204 CFLAGS="-O2" 2205 fi 2206 else 2207 GCC= 2208 test "${CFLAGS+set}" = set || CFLAGS="-g" 2209 fi 2210 2211 2212 for ac_func in strerror 2213 do 2214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2215 echo "configure:2216: checking for $ac_func" >&5 2216 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2217 echo $ac_n "(cached) $ac_c" 1>&6 2218 else 2219 cat > conftest.$ac_ext <<EOF 2220 #line 2221 "configure" 2221 #include "confdefs.h" 2222 /* System header to define __stub macros and hopefully few prototypes, 2223 which can conflict with char $ac_func(); below. */ 2224 #include <assert.h> 2225 /* Override any gcc2 internal prototype to avoid an error. */ 2226 /* We use char because int might match the return type of a gcc2 2227 builtin and then its argument prototype would still apply. */ 2228 char $ac_func(); 2229 2230 int main() { 2231 2232 /* The GNU C library defines this for functions which it implements 2233 to always fail with ENOSYS. Some functions are actually named 2234 something starting with __ and the normal name is an alias. */ 2235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2236 choke me 2237 #else 2238 $ac_func(); 2239 #endif 2240 2241 ; return 0; } 2242 EOF 2243 if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then 2244 rm -rf conftest* 2245 eval "ac_cv_func_$ac_func=yes" 2246 else 2247 echo "configure: failed program was:" >&5 2248 cat conftest.$ac_ext >&5 2249 rm -rf conftest* 2250 eval "ac_cv_func_$ac_func=no" 2251 fi 2252 rm -f conftest* 2253 fi 2254 2255 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2256 echo "$ac_t""yes" 1>&6 2257 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2258 cat >> confdefs.h <<EOF 2259 #define $ac_tr_func 1 2260 EOF 2261 2262 else 2263 echo "$ac_t""no" 1>&6 2264 fi 2265 done 2266 2267 1393 2268 # find all the Executive Makefiles 1394 2269 1395 2270 echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6 1396 echo "configure: 1397: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&52271 echo "configure:2272: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5 1397 2272 if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then 1398 2273 rtems_av_save_dir=`pwd`; … … 1409 2284 1410 2285 echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6 1411 echo "configure: 1412: checking for Makefile.in in c/src/exec/rtems" >&52286 echo "configure:2287: checking for Makefile.in in c/src/exec/rtems" >&5 1412 2287 if test -d $srcdir/c/src/exec/rtems; then 1413 2288 rtems_av_save_dir=`pwd`; … … 1424 2299 1425 2300 echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6 1426 echo "configure: 1427: checking for Makefile.in in c/src/exec/sapi" >&52301 echo "configure:2302: checking for Makefile.in in c/src/exec/sapi" >&5 1427 2302 if test -d $srcdir/c/src/exec/sapi; then 1428 2303 rtems_av_save_dir=`pwd`; … … 1441 2316 1442 2317 echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6 1443 echo "configure: 1444: checking for Makefile.in in c/src/exec/posix" >&52318 echo "configure:2319: checking for Makefile.in in c/src/exec/posix" >&5 1444 2319 if test -d $srcdir/c/src/exec/posix; then 1445 2320 rtems_av_save_dir=`pwd`; … … 1463 2338 if test -z "$rtems_bsp"; then 1464 2339 echo $ac_n "checking for bsps""... $ac_c" 1>&6 1465 echo "configure: 1466: checking for bsps" >&52340 echo "configure:2341: checking for bsps" >&5 1466 2341 files=`ls $srcdir/c/src/lib/libbsp/$target_cpu` 1467 2342 for file in $files; do … … 1510 2385 1511 2386 echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir""... $ac_c" 1>&6 1512 echo "configure: 1513: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&52387 echo "configure:2388: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5 1513 2388 if test -d $srcdir/c/src/lib/libbsp/$target_cpu/$bspdir; then 1514 2389 rtems_av_save_dir=`pwd`; … … 1533 2408 1534 2409 echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6 1535 echo "configure: 1536: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&52410 echo "configure:2411: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5 1536 2411 if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then 1537 2412 rtems_av_save_dir=`pwd`; … … 1550 2425 1551 2426 echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6 1552 echo "configure: 1553: checking for Makefile.in in c/src/lib/start/$target_cpu" >&52427 echo "configure:2428: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5 1553 2428 if test -d $srcdir/c/src/lib/start/$target_cpu; then 1554 2429 rtems_av_save_dir=`pwd`; … … 1567 2442 1568 2443 1569 #1570 # Target configurations are listed in alphabetical order.1571 # The BSPs for a target configuration are also listed in alphabetical order.1572 #1573 1574 1575 if [ "${program_prefix}" = "NONE" ] ; then1576 if [ "${target}" = "${host}" ] ; then1577 program_prefix=1578 else1579 program_prefix=${target}-1580 fi1581 fi1582 1583 2444 PROJECT_ROOT=`pwd;` 1584 2445 … … 1606 2467 # If the tests are enabled, then find all the test suite Makefiles 1607 2468 echo $ac_n "checking Are the test suites enabled? ""... $ac_c" 1>&6 1608 echo "configure: 1609: checking Are the test suites enabled? " >&52469 echo "configure:2470: checking Are the test suites enabled? " >&5 1609 2470 tests_enabled=yes 1610 2471 # Check whether --enable-tests or --disable-tests was given. … … 1626 2487 1627 2488 echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6 1628 echo "configure: 1629: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&52489 echo "configure:2490: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5 1629 2490 if test -d $srcdir/c/src/tests/tools/$target_cpu; then 1630 2491 rtems_av_save_dir=`pwd`; … … 1641 2502 1642 2503 echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6 1643 echo "configure: 1644: checking for Makefile.in in c/src/tests/libtests" >&52504 echo "configure:2505: checking for Makefile.in in c/src/tests/libtests" >&5 1644 2505 if test -d $srcdir/c/src/tests/libtests; then 1645 2506 rtems_av_save_dir=`pwd`; … … 1656 2517 1657 2518 echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6 1658 echo "configure: 1659: checking for Makefile.in in c/src/tests/sptests" >&52519 echo "configure:2520: checking for Makefile.in in c/src/tests/sptests" >&5 1659 2520 if test -d $srcdir/c/src/tests/sptests; then 1660 2521 rtems_av_save_dir=`pwd`; … … 1671 2532 1672 2533 echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6 1673 echo "configure: 1674: checking for Makefile.in in c/src/tests/tmtests" >&52534 echo "configure:2535: checking for Makefile.in in c/src/tests/tmtests" >&5 1674 2535 if test -d $srcdir/c/src/tests/tmtests; then 1675 2536 rtems_av_save_dir=`pwd`; … … 1686 2547 1687 2548 echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6 1688 echo "configure: 1689: checking for Makefile.in in c/src/tests/mptests" >&52549 echo "configure:2550: checking for Makefile.in in c/src/tests/mptests" >&5 1689 2550 if test -d $srcdir/c/src/tests/mptests; then 1690 2551 rtems_av_save_dir=`pwd`; … … 1702 2563 1703 2564 echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6 1704 echo "configure: 1705: checking for Makefile.in in c/src/tests/psxtests" >&52565 echo "configure:2566: checking for Makefile.in in c/src/tests/psxtests" >&5 1705 2566 if test -d $srcdir/c/src/tests/psxtests; then 1706 2567 rtems_av_save_dir=`pwd`; … … 1720 2581 # If the HWAPI is enabled, the find the HWAPI Makefiles 1721 2582 echo $ac_n "checking Is the HWAPI enabled? ""... $ac_c" 1>&6 1722 echo "configure: 1723: checking Is the HWAPI enabled? " >&52583 echo "configure:2584: checking Is the HWAPI enabled? " >&5 1723 2584 # Check whether --enable-hwapi or --disable-hwapi was given. 1724 2585 if test "${enable_hwapi+set}" = set; then … … 1731 2592 1732 2593 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6 1733 echo "configure: 1734: checking for Makefile.in in c/src/lib/libhwapi/analog" >&52594 echo "configure:2595: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5 1734 2595 if test -d $srcdir/c/src/lib/libhwapi/analog; then 1735 2596 rtems_av_save_dir=`pwd`; … … 1746 2607 1747 2608 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6 1748 echo "configure: 1749: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&52609 echo "configure:2610: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5 1749 2610 if test -d $srcdir/c/src/lib/libhwapi/discrete; then 1750 2611 rtems_av_save_dir=`pwd`; … … 1761 2622 1762 2623 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6 1763 echo "configure: 1764: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&52624 echo "configure:2625: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5 1764 2625 if test -d $srcdir/c/src/lib/libhwapi/drivers; then 1765 2626 rtems_av_save_dir=`pwd`; … … 1776 2637 1777 2638 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6 1778 echo "configure: 1779: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&52639 echo "configure:2640: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5 1779 2640 if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then 1780 2641 rtems_av_save_dir=`pwd`; … … 1791 2652 1792 2653 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6 1793 echo "configure: 1794: checking for Makefile.in in c/src/lib/libhwapi/serial" >&52654 echo "configure:2655: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5 1794 2655 if test -d $srcdir/c/src/lib/libhwapi/serial; then 1795 2656 rtems_av_save_dir=`pwd`; … … 1806 2667 1807 2668 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6 1808 echo "configure: 1809: checking for Makefile.in in c/src/lib/libhwapi/support" >&52669 echo "configure:2670: checking for Makefile.in in c/src/lib/libhwapi/support" >&5 1809 2670 if test -d $srcdir/c/src/lib/libhwapi/support; then 1810 2671 rtems_av_save_dir=`pwd`; … … 1821 2682 1822 2683 echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6 1823 echo "configure: 1824: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&52684 echo "configure:2685: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5 1824 2685 if test -d $srcdir/c/src/lib/libhwapi/wrapup; then 1825 2686 rtems_av_save_dir=`pwd`; … … 1863 2724 1864 2725 echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6 1865 echo "configure: 1866: checking for Makefile.in in c/build-tools" >&52726 echo "configure:2727: checking for Makefile.in in c/build-tools" >&5 1866 2727 if test -d $srcdir/c/build-tools; then 1867 2728 rtems_av_save_dir=`pwd`; … … 1878 2739 1879 2740 echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6 1880 echo "configure: 1881: checking for Makefile.in in make" >&52741 echo "configure:2742: checking for Makefile.in in make" >&5 1881 2742 if test -d $srcdir/make; then 1882 2743 rtems_av_save_dir=`pwd`; … … 1893 2754 1894 2755 echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6 1895 echo "configure: 1896: checking for Makefile.in in c/src/lib/libmisc" >&52756 echo "configure:2757: checking for Makefile.in in c/src/lib/libmisc" >&5 1896 2757 if test -d $srcdir/c/src/lib/libmisc; then 1897 2758 rtems_av_save_dir=`pwd`; … … 1908 2769 1909 2770 echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6 1910 echo "configure: 1911: checking for Makefile.in in c/src/tests/samples" >&52771 echo "configure:2772: checking for Makefile.in in c/src/tests/samples" >&5 1911 2772 if test -d $srcdir/c/src/tests/samples; then 1912 2773 rtems_av_save_dir=`pwd`; … … 1919 2780 echo "$ac_t""no" 1>&6 1920 2781 fi 1921 1922 1923 2782 1924 2783 … … 2028 2887 2029 2888 trap 'rm -fr `echo "Makefile 2889 make/host.cfg 2890 make/target.cfg 2891 make/Templates/Makefile.inc 2030 2892 c/Makefile 2031 2893 c/src/Makefile … … 2057 2919 c/src/tests/tools/generic/Makefile 2058 2920 $makefiles 2059 make/host.cfg2060 make/target.cfg2061 make/Templates/Makefile.inc2062 2921 c/update-tools/Makefile c/build-tools/src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 2063 2922 EOF … … 2120 2979 s%@M4@%$M4%g 2121 2980 s%@KSH@%$KSH%g 2981 s%@CC@%$CC%g 2982 s%@CXX@%$CXX%g 2983 s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g 2984 s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g 2985 s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g 2986 s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g 2987 s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g 2988 s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g 2989 s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g 2990 s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g 2991 s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g 2122 2992 s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g 2123 2993 s%@RTEMS_HOST@%$RTEMS_HOST%g … … 2173 3043 2174 3044 CONFIG_FILES=\${CONFIG_FILES-"Makefile 3045 make/host.cfg 3046 make/target.cfg 3047 make/Templates/Makefile.inc 2175 3048 c/Makefile 2176 3049 c/src/Makefile … … 2202 3075 c/src/tests/tools/generic/Makefile 2203 3076 $makefiles 2204 make/host.cfg2205 make/target.cfg2206 make/Templates/Makefile.inc2207 3077 c/update-tools/Makefile"} 2208 3078 EOF -
configure.in
rb4589477 r3771cc6e 44 44 esac],[RTEMS_USE_MACROS=no]) 45 45 46 AC_ARG_ENABLE(c pp, \47 [ --enable-c ppenable C++ support, and build the rtems++ library], \46 AC_ARG_ENABLE(cxx, \ 47 [ --enable-cxx enable C++ support, and build the rtems++ library], \ 48 48 [case "${enableval}" in 49 49 yes) RTEMS_HAS_CPLUSPLUS=yes ;; 50 50 no) RTEMS_HAS_CPLUSPLUS=no ;; 51 *) AC_MSG_ERROR(bad value ${enableval} for enable-c ppoption) ;;51 *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;; 52 52 esac], [RTEMS_HAS_CPLUSPLUS=no]) 53 53 … … 77 77 AC_PATH_PROG(CHMOD,chmod) 78 78 AC_PATH_PROG(SORT,sort) 79 AC_CHECK_FUNCS(strerror)80 79 81 80 dnl check mkdir behaviour, try to get mkdir -p -m 0755 … … 102 101 [ Please contact your system administrator] ); 103 102 fi 104 105 dnl END configure.host.in106 103 107 104 dnl BEGIN configure.target.in … … 172 169 AC_MSG_ERROR(no) 173 170 fi 171 172 dnl NOTE: host_os is automatically set by autoconf 173 174 if [[ "${program_prefix}" = "NONE" ]] ; then 175 if [[ "${target}" = "${host}" ]] ; then 176 program_prefix= 177 else 178 program_prefix=${target}- 179 fi 180 fi 181 182 dnl check target cc 183 CC="$program_prefix"gcc 184 RTEMS_PROG_CC 185 186 dnl check if the compiler supports --specs if gcc28 is requested 187 if test "$RTEMS_USE_GCC272" != "yes" ; then 188 RTEMS_GCC_SPECS 189 if test "$rtems_cv_gcc_specs" = "no"; then 190 AC_MSG_WARN([*** disabling --enable-gcc28]) 191 RTEMS_USE_GCC272=yes 192 fi 193 fi 194 195 dnl check if the target compiler may use --pipe 196 RTEMS_GCC_PIPE 197 198 dnl check for g++ 199 if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then 200 CXX="$program_prefix"g++ 201 RTEMS_PROG_CXX 202 AC_PATH_PROG(CXX_FOR_TARGET,"$program_prefix"g++,no) 203 else 204 CXX_FOR_TARGET="no" 205 fi 206 207 RTEMS_CANONICALIZE_TOOLS 208 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" 209 210 dnl check host cc 211 AC_PROG_CC 212 213 dnl check for host library functions 214 dnl NOTE: must be called after AC_PROG_CC 215 AC_CHECK_FUNCS(strerror) 174 216 175 217 # find all the Executive Makefiles … … 251 293 dnl END configure.target.in 252 294 253 254 #255 # Target configurations are listed in alphabetical order.256 # The BSPs for a target configuration are also listed in alphabetical order.257 #258 259 dnl NOTE: host_os is automatically set by autoconf260 261 if [[ "${program_prefix}" = "NONE" ]] ; then262 if [[ "${target}" = "${host}" ]] ; then263 program_prefix=264 else265 program_prefix=${target}-266 fi267 fi268 295 269 296 PROJECT_ROOT=`pwd;` … … 360 387 AC_CONFIG_HEADER(c/build-tools/src/config.h) 361 388 362 AC_CONFIG_HEADER(c/build-tools/src/config.h)363 364 389 # try not to explicitly list a Makefile here 365 390 AC_OUTPUT( 366 391 Makefile 392 make/host.cfg 393 make/target.cfg 394 make/Templates/Makefile.inc 367 395 c/Makefile 368 396 c/src/Makefile … … 394 422 c/src/tests/tools/generic/Makefile 395 423 $makefiles 396 make/host.cfg397 make/target.cfg398 make/Templates/Makefile.inc399 424 c/update-tools/Makefile) 400 425
Note: See TracChangeset
for help on using the changeset viewer.