[Mplayer-dev-eng] configure
Juergen Keil
jk at tools.de
Mon Jun 11 20:34:17 CEST 2001
> And if one hasn't got SDL, configure says that one has got outdated SDL :-(
Indeed. Here's a fix
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.80
diff -u -B -r1.80 configure
--- configure 2001/06/09 08:52:51 1.80
+++ configure 2001/06/11 17:22:51
@@ -527,9 +527,16 @@
# Atmosfear: added SDL versioncheck and autodetect; removed warnings.
_sdl=no
-if $_cc `$_sdlconfig --cflags` $TMPC -o $TMPO `$_sdlconfig --libs` > /dev/null 2>&1 ; then
+_sdlcflags=`$_sdlconfig --cflags 2>/dev/null`
+_sdllib=`$_sdlconfig --libs 2>/dev/null`
+if [ ! -z "$_sdlcflags" -o ! -z "$_sdllib" ] && \
+ $_cc $_sdlcflags $TMPC -o $TMPO $_sdllib > /dev/null 2>&1
+then
+ # sdl-config returned CFLAGS or LIBS (that is, we've some new compiler
+ # flag that should be tested), and the empty test program compiled ok.
+
_sdlversion=`$_sdlconfig --version | sed 's/[^0-9]//g'`
- if test "$_sdlversion" -gt 116 ; then
+ if [ ! -z "$_sdlversion" ] && [ "$_sdlversion" -gt 116 ]; then
if test "$_sdlversion" -lt 121 ; then
_sdlbuggy='#define BUGGY_SDL'
@@ -540,6 +547,11 @@
else
_sdl=outdated
fi
+else
+ # no sdl-config in PATH, or test program did not compile. Sorry, no SDL
+ # support in mplayer.
+ _sdlcflags=
+ _sdllib=
fi
# Atmosfear: added libcss autodetect
@@ -1101,10 +1113,10 @@
_xvlib='-lXv'
fi
-if [ $_sdl = yes ]; then
- _sdllib=`$_sdlconfig --libs`
- _sdlcflags=`$_sdlconfig --cflags`
-fi
+#if [ $_sdl = yes ]; then
+# _sdllib=`$_sdlconfig --libs`
+# _sdlcflags=`$_sdlconfig --cflags`
+#fi
if [ $_dga = yes ]; then
_dgalib='-lXxf86dga'
More information about the MPlayer-dev-eng
mailing list