Mercurial > mplayer.hg
comparison configure @ 1740:46b49783b708
Rearranged C++ check.
author | atmos4 |
---|---|
date | Wed, 29 Aug 2001 12:15:09 +0000 |
parents | 064c0acb7c39 |
children | c78e645d706b |
comparison
equal
deleted
inserted
replaced
1739:064c0acb7c39 | 1740:46b49783b708 |
---|---|
405 _as=`$_cc -print-prog-name=as` | 405 _as=`$_cc -print-prog-name=as` |
406 if [ "$_as" = "" ]; then | 406 if [ "$_as" = "" ]; then |
407 _as=as | 407 _as=as |
408 fi | 408 fi |
409 fi | 409 fi |
410 | |
411 # check if compiler supports C++ and C++-libs are installed correctly | |
412 cat > $TMPCPP << EOF | |
413 /* very useful C++ test program by atmos */ | |
414 #include <string> | |
415 | |
416 class myclass { | |
417 private: | |
418 int ret; | |
419 public: | |
420 int myreturn(void); | |
421 }; | |
422 | |
423 int myclass::myreturn(void) { | |
424 ret = 0; | |
425 return ret; | |
426 } | |
427 | |
428 int main(void) { | |
429 myclass myobject; | |
430 return myobject.myreturn(); | |
431 } | |
432 EOF | |
433 echo $_echo_n "Checking if your C++ compiler '$_cc' works ... $_echo_c" | |
434 if $_cc $TMPCPP -o $TMPO > /dev/null 2>&1 ; then | |
435 echo "yes" | |
436 echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c" | |
437 if $TMPO ; then | |
438 echo "yes" | |
439 else | |
440 echo "no" | |
441 cat << EOF | |
442 Your C++ runtime enviroment is broken, make sure you correctly install the | |
443 C++ libraries (libstdc++) and that the library path containing them is in | |
444 your (/etc/)ld.so.conf! | |
445 If you don't need DirectShow support, you can also use: | |
446 ./configure --disable-dshow <your-normal-configure-options> | |
447 to disable building of the C++ based DirectShow code. | |
448 EOF | |
449 rm -f $TMPCPP $TMPO | |
450 exit | |
451 fi | |
452 else | |
453 echo "no" | |
454 cat << EOF | |
455 Your C++ compiler does not support C++, make sure you have enabled it on | |
456 compiler compilation or for binary packages, make sure the appropriate | |
457 packages are installed! | |
458 If you don't need DirectShow support, you can also use: | |
459 ./configure --disable-dshow <your-normal-configure-options> | |
460 to disable building of the C++ based DirectShow code. | |
461 EOF | |
462 rm -f $TMPCPP $TMPO | |
463 exit | |
464 fi | |
465 rm -f $TMPCPP $TMPO | |
466 | 410 |
467 if [ "$host_arch" = i386 ]; then | 411 if [ "$host_arch" = i386 ]; then |
468 if [ -r /proc/cpuinfo ]; then | 412 if [ -r /proc/cpuinfo ]; then |
469 # linux with /proc mounted, extract cpu information from it | 413 # linux with /proc mounted, extract cpu information from it |
470 _cpuinfo="cat /proc/cpuinfo" | 414 _cpuinfo="cat /proc/cpuinfo" |
1553 echo "Checking for DeCSS support ... $_css" | 1497 echo "Checking for DeCSS support ... $_css" |
1554 echo "Checking for DVDread support ... $_dvdread" | 1498 echo "Checking for DVDread support ... $_dvdread" |
1555 echo "Checking for PNG support ... $_png" | 1499 echo "Checking for PNG support ... $_png" |
1556 echo "Checking for Win32 DLL support ... $_win32dll" | 1500 echo "Checking for Win32 DLL support ... $_win32dll" |
1557 echo "Checking for DirectShow ... $_dshow" | 1501 echo "Checking for DirectShow ... $_dshow" |
1502 | |
1503 # check if compiler supports C++ and C++-libs are installed correctly | |
1504 if [ $_win32dll = yes -a $_dshow = yes ] ; then | |
1505 cat > $TMPCPP << EOF | |
1506 /* very useful C++ test program by atmos */ | |
1507 #include <string> | |
1508 | |
1509 class myclass { | |
1510 private: | |
1511 int ret; | |
1512 public: | |
1513 int myreturn(void); | |
1514 }; | |
1515 | |
1516 int myclass::myreturn(void) { | |
1517 ret = 0; | |
1518 return ret; | |
1519 } | |
1520 | |
1521 int main(void) { | |
1522 myclass myobject; | |
1523 return myobject.myreturn(); | |
1524 } | |
1525 EOF | |
1526 echo $_echo_n "Checking if your compiler '$_cc' supports C++ ... $_echo_c" | |
1527 if $_cc $TMPCPP -o $TMPO > /dev/null 2>&1 ; then | |
1528 echo "yes" | |
1529 echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c" | |
1530 if $TMPO ; then | |
1531 echo "yes" | |
1532 else | |
1533 echo "no" | |
1534 cat << EOF | |
1535 Your C++ runtime enviroment is broken, make sure you correctly install the | |
1536 C++ libraries (libstdc++) and that the library path containing them is in | |
1537 your (/etc/)ld.so.conf! | |
1538 If you don't need DirectShow support, you can also use: | |
1539 ./configure --disable-dshow <your-normal-configure-options> | |
1540 to disable building of the C++ based DirectShow code. | |
1541 EOF | |
1542 rm -f $TMPCPP $TMPO | |
1543 exit | |
1544 fi | |
1545 else | |
1546 echo "no" | |
1547 cat << EOF | |
1548 Your C++ compiler does not support C++, make sure you have enabled it on | |
1549 compiler compilation or for binary packages, make sure the appropriate | |
1550 packages are installed! | |
1551 If you don't need DirectShow support, you can also use: | |
1552 ./configure --disable-dshow <your-normal-configure-options> | |
1553 to disable building of the C++ based DirectShow code. | |
1554 EOF | |
1555 rm -f $TMPCPP $TMPO | |
1556 exit | |
1557 fi | |
1558 rm -f $TMPCPP $TMPO | |
1559 fi | |
1560 | |
1558 echo "Checking for libavcodec ... $_libavcodec" | 1561 echo "Checking for libavcodec ... $_libavcodec" |
1559 echo "Checking for divx4linux ... $_divx4linux" | 1562 echo "Checking for divx4linux ... $_divx4linux" |
1560 echo "Checking for fastmemcpy ... $_fastmemcpy" | 1563 echo "Checking for fastmemcpy ... $_fastmemcpy" |
1561 echo "Extra libs : $_extralibdir" | 1564 echo "Extra libs : $_extralibdir" |
1562 echo "Extra headers : $_extraincdir" | 1565 echo "Extra headers : $_extraincdir" |
1656 else | 1659 else |
1657 _css='#undef HAVE_LIBCSS' | 1660 _css='#undef HAVE_LIBCSS' |
1658 fi | 1661 fi |
1659 | 1662 |
1660 fi | 1663 fi |
1661 | |
1662 | 1664 |
1663 | 1665 |
1664 if [ $_win32dll = yes ]; then | 1666 if [ $_win32dll = yes ]; then |
1665 _win32dll='#define USE_WIN32DLL 1' | 1667 _win32dll='#define USE_WIN32DLL 1' |
1666 _win32lib='-Lloader -lloader' | 1668 _win32lib='-Lloader -lloader' |