Mercurial > mplayer.hg
comparison configure @ 2662:994b95f443f2
avoids spitting bad compilation messages at the user when sthg does not work
author | pl |
---|---|
date | Sat, 03 Nov 2001 23:15:44 +0000 |
parents | 7f92b286575e |
children | 8ca22e30a5b8 |
comparison
equal
deleted
inserted
replaced
2661:11f4c2b2b70f | 2662:994b95f443f2 |
---|---|
114 # -- | 114 # -- |
115 | 115 |
116 # SOME MACROS/USEFUL FUNCTIONS | 116 # SOME MACROS/USEFUL FUNCTIONS |
117 # Returns error code only - NO displaye | 117 # Returns error code only - NO displaye |
118 cc_check() { | 118 cc_check() { |
119 "$_cc" "$TMPC" -o "$TMPO" "$@" >/dev/null 2>&1 | 119 ( "$_cc" "$TMPC" -o "$TMPO" "$@" ) >/dev/null 2>&1 |
120 return "$?" | 120 return "$?" |
121 } | 121 } |
122 | 122 |
123 # Display error message, flushes tempfile, exit | 123 # Display error message, flushes tempfile, exit |
124 die () { | 124 die () { |
968 fi | 968 fi |
969 | 969 |
970 if test "$_x11" = yes ; then | 970 if test "$_x11" = yes ; then |
971 | 971 |
972 cc_check $_x11libdir -lX11 -lXext -lXdpms $_socklib && _xdpms_3=yes | 972 cc_check $_x11libdir -lX11 -lXext -lXdpms $_socklib && _xdpms_3=yes |
973 nm `echo $_x11libdir|cut -c 3-`/libXext.a | grep DPMSQueryExtension > /dev/null 2>&1 && _xdpms_4=yes | 973 ( nm `echo $_x11libdir | cut -c 3-`/libXext.a | grep DPMSQueryExtension ) > /dev/null 2>&1 && _xdpms_4=yes |
974 cc_check $_x11libdir -lX11 -lXext -lXv $_socklib && _xv=yes | 974 cc_check $_x11libdir -lX11 -lXext -lXv $_socklib && _xv=yes |
975 cc_check $_x11libdir -lX11 -lXext -lXxf86vm $_socklib && _vm=yes | 975 cc_check $_x11libdir -lX11 -lXext -lXxf86vm $_socklib && _vm=yes |
976 cc_check $_x11libdir -lX11 -lXext -lXinerama $_socklib && _xinerama=yes | 976 cc_check $_x11libdir -lX11 -lXext -lXinerama $_socklib && _xinerama=yes |
977 | 977 |
978 # XXX this is not yet checked with OpenBSD - atmos | 978 # XXX this is not yet checked with OpenBSD - atmos |
1767 echo "Checking for iconv function ... $_iconv" | 1767 echo "Checking for iconv function ... $_iconv" |
1768 echo "Checking for zlib ... $_zlib" | 1768 echo "Checking for zlib ... $_zlib" |
1769 | 1769 |
1770 # check if compiler supports C++ and C++-libs are installed correctly | 1770 # check if compiler supports C++ and C++-libs are installed correctly |
1771 if test "$_win32" = yes && test "$_dshow" = yes ; then | 1771 if test "$_win32" = yes && test "$_dshow" = yes ; then |
1772 cat > $TMPCPP << EOF | 1772 cat > "$TMPCPP" << EOF |
1773 /* very useful C++ test program by atmos */ | 1773 /* very useful C++ test program by atmos */ |
1774 #include <string> | 1774 #include <string> |
1775 | 1775 |
1776 class myclass { | 1776 class myclass { |
1777 private: | 1777 private: |
1789 myclass myobject; | 1789 myclass myobject; |
1790 return myobject.myreturn(); | 1790 return myobject.myreturn(); |
1791 } | 1791 } |
1792 EOF | 1792 EOF |
1793 echo $_echo_n "Checking if your compiler '$_cc' supports C++ ... $_echo_c" | 1793 echo $_echo_n "Checking if your compiler '$_cc' supports C++ ... $_echo_c" |
1794 if $_cc $TMPCPP -o $TMPO > /dev/null 2>&1 ; then | 1794 if ( "$_cc" "$TMPCPP" -o "$TMPO" ) > /dev/null 2>&1 ; then |
1795 echo yes | 1795 echo yes |
1796 echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c" | 1796 echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c" |
1797 if $TMPO ; then | 1797 if "$TMPO" ; then |
1798 echo yes | 1798 echo yes |
1799 else | 1799 else |
1800 echo no | 1800 echo no |
1801 cat << EOF | 1801 cat << EOF |
1802 Your C++ runtime enviroment is broken, make sure you correctly install the | 1802 Your C++ runtime enviroment is broken, make sure you correctly install the |