[MPlayer-cvslog] CVS: main configure,1.1129,1.1130
Nico Sabbi CVS
syncmail at mplayerhq.hu
Mon Jan 30 21:58:14 CET 2006
CVS change done by Nico Sabbi CVS
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv7399
Modified Files:
configure
Log Message:
when linking to external libav* try using pkg-config first
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1129
retrieving revision 1.1130
diff -u -r1.1129 -r1.1130
--- configure 23 Jan 2006 10:16:48 -0000 1.1129
+++ configure 30 Jan 2006 20:58:11 -0000 1.1130
@@ -6078,8 +6078,14 @@
return 0;
}
EOF
- if cc_check -lavcodec $_ld_lm ; then
+ if (pkg-config --exists libavcodec >> "$TMPLOG" 2>&1) ; then
+ _inc_libavcodec=`pkg-config --cflags libavcodec`
+ _ld_libavcodec=`pkg-config --libs libavcodec`
+ cc_check $_inc_libavcodec $_ld_libavcodec && _libavcodec_so=yes
+ elif cc_check -lavcodec $_ld_lm ; then
_libavcodec_so=yes
+ fi
+ if test "$_libavcodec_so" == yes ; then
_res_comment="using libavcodec.so, but static libavcodec is recommended"
fi
fi
@@ -6094,7 +6100,16 @@
#include <ffmpeg/avformat.h>
int main(void) { av_alloc_format_context(); return 0; }
EOF
- cc_check $_ld_lm -lavformat && _libavformat_so=yes
+ if (pkg-config --exists libavformat >> "$TMPLOG" 2>&1 ) ; then
+ _inc_libavformat=`pkg-config --cflags libavformat`
+ _ld_libavformat=`pkg-config --libs libavformat`
+ cc_check $_inc_libavformat $_ld_libavformat && _libavformat_so=yes
+ elif cc_check $_ld_lm -lavformat ; then
+ _libavformat_so=yes
+ fi
+ if test "$_libavformat_so" == yes ; then
+ _res_comment="using libavformat.so, but static libavformat is recommended"
+ fi
fi
echores "$_libavformat_so"
fi
@@ -6133,7 +6148,7 @@
elif test "$_libavcodec_so" = yes ; then
_def_libavcodec='#define USE_LIBAVCODEC 1'
_def_libavcodec_so='#define USE_LIBAVCODEC_SO 1'
- _ld_libavcodec='-lavcodec'
+ test "$_ld_libavcodec" || _ld_libavcodec='-lavcodec'
_codecmodules="libavcodec.so $_codecmodules"
else
_nocodecmodules="libavcodec $_nocodecmodules"
@@ -6152,7 +6167,7 @@
else
if test "$_libavformat_so" = yes ; then
_def_libavformat_so='#define USE_LIBAVFORMAT_SO 1'
- _ld_libavformat='-lavformat'
+ test "$_ld_libavformat" || _ld_libavformat='-lavformat'
if win32 ; then
_def_libavformat_win32='#define CONFIG_WIN32 1'
fi
More information about the MPlayer-cvslog
mailing list