[vlc-devel] [PATCH 18/23] HACK: configure: tell pkg-config that we link FFmpeg statically

Rémi Denis-Courmont remi at remlab.net
Sat Oct 3 19:52:25 CEST 2009


---
 configure.ac |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7253713..4bce688 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2928,7 +2928,7 @@ then
       AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
       AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
       VLC_ADD_PLUGIN([avcodec])
-      VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
+      VLC_ADD_LIBS([avcodec],[`${PKG_CONFIG} --libs libavcodec libavutil --static`])
       VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
       VLC_RESTORE_FLAGS
       have_avcodec="yes"
@@ -2969,10 +2969,10 @@ then
       AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
       AS_IF([test "$enable_merge_ffmpeg" = "no"], [
         VLC_ADD_PLUGIN([avformat])
-        VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS $AVUTIL_LIBS])
+        VLC_ADD_LIBS([avformat],[`${PKG_CONFIG} --libs libavformat libavutil --static`])
         VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
       ], [
-        VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
+        VLC_ADD_LIBS([avcodec],[`${PKG_CONFIG} --libs libavformat libavutil --static`])
         VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
       ])
       VLC_RESTORE_FLAGS
@@ -2997,7 +2997,7 @@ then
       CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
       AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h)
       VLC_ADD_PLUGIN([swscale])
-      VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
+      VLC_ADD_LIBS([swscale],[`${PKG_CONFIG} --libs libswscale --static`])
       VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
@@ -3020,7 +3020,7 @@ then
       CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
       AC_CHECK_HEADERS(libpostproc/postproc.h postproc/postprocess.h)
       VLC_ADD_PLUGIN([postproc])
-      VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
+      VLC_ADD_LIBS([postproc],[`${PKG_CONFIG} --libs libpostproc libavutil --static`])
       VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
       VLC_RESTORE_FLAGS
     ],[
-- 
1.6.4.3




More information about the vlc-devel mailing list