[MPlayer-dev-eng] [PATCH] place source first in compile_check
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat May 29 21:07:21 CEST 2010
Hello,
when linking against static libraries the order is unfortunately relevant.
For static libSDL, the change below fixes the OpenGL SDL check for me.
The other checks generally work because the libs to be tested are function
parameters as well, however the same issue would exist when trying to use
static libs via e.g. --extra-ldflags
Index: configure
===================================================================
--- configure (revision 31268)
+++ configure (working copy)
@@ -59,12 +59,14 @@
# Prefer these macros to full length text !
# These macros only return an error code - NO display is done
compile_check() {
+ source="$1"
+ shift
echo >> "$TMPLOG"
- cat "$1" >> "$TMPLOG"
+ cat "$source" >> "$TMPLOG"
echo >> "$TMPLOG"
- echo "$_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
+ echo "$_cc $source $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o $TMPEXE $@" >> "$TMPLOG"
rm -f "$TMPEXE"
- $_cc $CFLAGS $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
+ $_cc $CFLAGS "$source" $extra_cflags $_ld_static $extra_ldflags $libs_mplayer $libs_mencoder -o "$TMPEXE" "$@" >> "$TMPLOG" 2>&1
TMPRES="$?"
echo >> "$TMPLOG"
echo >> "$TMPLOG"
More information about the MPlayer-dev-eng
mailing list