mirror of https://github.com/mpv-player/mpv
Added C++ compiler/runtime enviroment detection and enabled ppc detection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1740 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
bd9b1763be
commit
4b6fe18a32
|
@ -303,19 +303,23 @@ fi
|
||||||
# LGB: temporary files
|
# LGB: temporary files
|
||||||
|
|
||||||
TMPC="mplayer-conf-${RANDOM}-$$-${RANDOM}.c"
|
TMPC="mplayer-conf-${RANDOM}-$$-${RANDOM}.c"
|
||||||
|
TMPCPP="mplayer-conf-${RANDOM}-$$-${RANDOM}.cpp"
|
||||||
TMPO="mplayer-conf-${RANDOM}-$$-${RANDOM}.o"
|
TMPO="mplayer-conf-${RANDOM}-$$-${RANDOM}.o"
|
||||||
TMPS="mplayer-conf-${RANDOM}-$$-${RANDOM}.S"
|
TMPS="mplayer-conf-${RANDOM}-$$-${RANDOM}.S"
|
||||||
|
|
||||||
if [ ! -z "$TMPDIR" ]; then
|
if [ ! -z "$TMPDIR" ]; then
|
||||||
TMPC="${TMPDIR}/${TMPC}"
|
TMPC="${TMPDIR}/${TMPC}"
|
||||||
|
TMPCPP="${TMPDIR}/${TMPCPP}"
|
||||||
TMPO="${TMPDIR}/${TMPO}"
|
TMPO="${TMPDIR}/${TMPO}"
|
||||||
TMPS="${TMPDIR}/${TMPS}"
|
TMPS="${TMPDIR}/${TMPS}"
|
||||||
elif [ ! -z "$TEMPDIR" ]; then
|
elif [ ! -z "$TEMPDIR" ]; then
|
||||||
TMPC="${TEMPDIR}/${TMPC}"
|
TMPC="${TEMPDIR}/${TMPC}"
|
||||||
|
TMPCPP="${TEMPDIR}/${TMPCPP}"
|
||||||
TMPO="${TEMPDIR}/${TMPO}"
|
TMPO="${TEMPDIR}/${TMPO}"
|
||||||
TMPS="${TEMPDIR}/${TMPS}"
|
TMPS="${TEMPDIR}/${TMPS}"
|
||||||
else
|
else
|
||||||
TMPC="/tmp/${TMPC}"
|
TMPC="/tmp/${TMPC}"
|
||||||
|
TMPCPP="/tmp/${TMPCPP}"
|
||||||
TMPO="/tmp/${TMPO}"
|
TMPO="/tmp/${TMPO}"
|
||||||
TMPS="/tmp/${TMPS}"
|
TMPS="/tmp/${TMPS}"
|
||||||
fi
|
fi
|
||||||
|
@ -404,6 +408,61 @@ if [ "$_as" = auto ]; then
|
||||||
fi
|
fi
|
||||||
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 [ "$host_arch" = i386 ]; then
|
||||||
if [ -r /proc/cpuinfo ]; then
|
if [ -r /proc/cpuinfo ]; then
|
||||||
|
@ -697,16 +756,15 @@ arm)
|
||||||
_mcpu=""
|
_mcpu=""
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Untested:
|
ppc)
|
||||||
#ppc)
|
_arch="#define ARCH_PPC 1"
|
||||||
# _arch="#define ARCH_PPC 1"
|
_target_arch="TARGET_ARCH_PPC=yes"
|
||||||
# _target_arch="TARGET_ARCH_PPC=yes"
|
_words_endian="#define WORDS_BIGENDIAN 1"
|
||||||
# _words_endian="#define WORDS_BIGENDIAN 1"
|
iproc=ppc
|
||||||
# iproc=ppc
|
proc=
|
||||||
# proc=
|
_march=""
|
||||||
# _march=""
|
_mcpu=""
|
||||||
# _mcpu=""
|
;;
|
||||||
# ;;
|
|
||||||
|
|
||||||
# Untested:
|
# Untested:
|
||||||
#alpha)
|
#alpha)
|
||||||
|
|
Loading…
Reference in New Issue