summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-29 12:15:09 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-29 12:15:09 +0000
commitcf513a16cbb2c0fe0e05e6253f1f6913e8948954 (patch)
tree2d2d938ef5c1d014121cf6f911f3d7582919dd75
parent4b6fe18a32e869375832e8fb63a18ff813ed5c78 (diff)
downloadmpv-cf513a16cbb2c0fe0e05e6253f1f6913e8948954.tar.bz2
mpv-cf513a16cbb2c0fe0e05e6253f1f6913e8948954.tar.xz
Rearranged C++ check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1741 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure116
1 files changed, 59 insertions, 57 deletions
diff --git a/configure b/configure
index 63f94026d5..da7970a358 100755
--- a/configure
+++ b/configure
@@ -408,62 +408,6 @@ if [ "$_as" = auto ]; then
fi
fi
-# check if compiler supports C++ and C++-libs are installed correctly
-cat > $TMPCPP << EOF
-/* very useful C++ test program by atmos */
-#include <string>
-
-class myclass {
- private:
- int ret;
- public:
- int myreturn(void);
-};
-
-int myclass::myreturn(void) {
- ret = 0;
- return ret;
-}
-
-int main(void) {
- myclass myobject;
- return myobject.myreturn();
-}
-EOF
-echo $_echo_n "Checking if your C++ compiler '$_cc' works ... $_echo_c"
-if $_cc $TMPCPP -o $TMPO > /dev/null 2>&1 ; then
- echo "yes"
- echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c"
- if $TMPO ; then
- echo "yes"
- else
- echo "no"
- cat << EOF
-Your C++ runtime enviroment is broken, make sure you correctly install the
-C++ libraries (libstdc++) and that the library path containing them is in
-your (/etc/)ld.so.conf!
-If you don't need DirectShow support, you can also use:
-./configure --disable-dshow <your-normal-configure-options>
-to disable building of the C++ based DirectShow code.
-EOF
- rm -f $TMPCPP $TMPO
- exit
- fi
-else
- echo "no"
- cat << EOF
-Your C++ compiler does not support C++, make sure you have enabled it on
-compiler compilation or for binary packages, make sure the appropriate
-packages are installed!
-If you don't need DirectShow support, you can also use:
-./configure --disable-dshow <your-normal-configure-options>
-to disable building of the C++ based DirectShow code.
-EOF
- rm -f $TMPCPP $TMPO
- exit
-fi
-rm -f $TMPCPP $TMPO
-
if [ "$host_arch" = i386 ]; then
if [ -r /proc/cpuinfo ]; then
# linux with /proc mounted, extract cpu information from it
@@ -1555,6 +1499,65 @@ echo "Checking for DVDread support ... $_dvdread"
echo "Checking for PNG support ... $_png"
echo "Checking for Win32 DLL support ... $_win32dll"
echo "Checking for DirectShow ... $_dshow"
+
+# check if compiler supports C++ and C++-libs are installed correctly
+if [ $_win32dll = yes -a $_dshow = yes ] ; then
+cat > $TMPCPP << EOF
+/* very useful C++ test program by atmos */
+#include <string>
+
+class myclass {
+ private:
+ int ret;
+ public:
+ int myreturn(void);
+};
+
+int myclass::myreturn(void) {
+ ret = 0;
+ return ret;
+}
+
+int main(void) {
+ myclass myobject;
+ return myobject.myreturn();
+}
+EOF
+echo $_echo_n "Checking if your compiler '$_cc' supports C++ ... $_echo_c"
+if $_cc $TMPCPP -o $TMPO > /dev/null 2>&1 ; then
+ echo "yes"
+ echo $_echo_n "Checking for proper C++ runtime enviroment ... $_echo_c"
+ if $TMPO ; then
+ echo "yes"
+ else
+ echo "no"
+ cat << EOF
+Your C++ runtime enviroment is broken, make sure you correctly install the
+C++ libraries (libstdc++) and that the library path containing them is in
+your (/etc/)ld.so.conf!
+If you don't need DirectShow support, you can also use:
+./configure --disable-dshow <your-normal-configure-options>
+to disable building of the C++ based DirectShow code.
+EOF
+ rm -f $TMPCPP $TMPO
+ exit
+ fi
+else
+ echo "no"
+ cat << EOF
+Your C++ compiler does not support C++, make sure you have enabled it on
+compiler compilation or for binary packages, make sure the appropriate
+packages are installed!
+If you don't need DirectShow support, you can also use:
+./configure --disable-dshow <your-normal-configure-options>
+to disable building of the C++ based DirectShow code.
+EOF
+ rm -f $TMPCPP $TMPO
+ exit
+fi
+rm -f $TMPCPP $TMPO
+fi
+
echo "Checking for libavcodec ... $_libavcodec"
echo "Checking for divx4linux ... $_divx4linux"
echo "Checking for fastmemcpy ... $_fastmemcpy"
@@ -1660,7 +1663,6 @@ fi
fi
-
if [ $_win32dll = yes ]; then
_win32dll='#define USE_WIN32DLL 1'
_win32lib='-Lloader -lloader'