Changeset 49fb71137e5b2955d5f3c68034f2dbfaff27a453

Show
Ignore:
Timestamp:
31/08/07 23:22:41 (1 year ago)
Author:
Christophe Mutricy <xtophe@videolan.org>
git-committer:
Christophe Mutricy <xtophe@videolan.org> 1188595361 +0000
git-parent:

[256a65be95e727eaaf6a327296b18cb1d75c9d3a]

git-author:
Christophe Mutricy <xtophe@videolan.org> 1188595361 +0000
Message:

Use libav*-uninstalled.pc to get the ldflags for ffmpeg when we use --with-ffmpeg-tree to link statically

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    r41f6c27 r49fb711  
    29542954   dnl  Use a custom libffmpeg 
    29552955   AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a) 
    2956  
    2957    if fgrep -s "CONFIG_ZLIB=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2958      if test "${with_ffmpeg_zlib}" != "yes"; then 
    2959        VLC_ADD_LDFLAGS([ffmpeg],[-lz]) 
    2960      fi 
    2961    fi 
    2962    if fgrep -s "CONFIG_MP3LAME=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2963      if test "${with_ffmpeg_mp3lame}" != "yes"; then 
    2964        VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame]) 
    2965      fi 
    2966    fi 
    2967    if fgrep -s "CONFIG_FAAC=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2968      if test "${with_ffmpeg_faac}" != "yes"; then 
    2969        VLC_ADD_LDFLAGS([ffmpeg],[-lfaac]) 
    2970      fi 
    2971    fi 
    2972    if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2973      if test "${with_ffmpeg_dts}" != "yes"; then 
    2974        LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" 
    2975        AC_CHECK_LIB(dts_pic, dts_free,  
    2976          [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ], 
    2977          [ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ]) 
    2978        LDFLAGS="${LDFLAGS_save}" 
    2979      fi 
    2980    fi 
    2981    if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2982      VLC_ADD_LDFLAGS([ffmpeg],[-lvorbis -lvorbisenc]) 
    2983    fi 
    2984    if fgrep -s "CONFIG_FAAD=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2985      VLC_ADD_LDFLAGS([ffmpeg],[-lfaad]) 
    2986    fi 
    2987    if fgrep -s "CONFIG_XVID=yes" "${real_ffmpeg_tree}/config.mak"; then 
    2988      VLC_ADD_LDFLAGS([ffmpeg],[-lxvidcore]) 
    2989    fi 
    2990  
     2956    
     2957   dnl Use pkg-config to look for the ldflags in libav*-uninstalled.pc 
     2958   PKG_CONFIG_PATH_save="$PKG_CONFIG_PATH" 
     2959   PKG_CONFIG_LIBDIR_save="$PKG_CONFIG_LIBDIR" 
     2960   export PKG_CONFIG_PATH="" 
     2961   export PKG_CONFIG_LIBDIR="${real_ffmpeg_tree}" 
     2962   
     2963   PKG_CHECK_MODULES( [FFMPEG],[libavcodec libavformat libpostproc], [ 
     2964    VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_CFLAGS}) 
     2965    VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher], ${FFMPEG_LIBS})] 
     2966      ,[]) 
     2967   AS_IF([test -n "${PKG_CONFIG_PATH_save}"],[ 
     2968         export PKG_CONFIG_PATH="${PKG_CONFIG_PATH_save}" 
     2969   ],[ 
     2970    unset PKG_CONFIG_PATH 
     2971   ]) 
     2972   AS_IF([test -n "${PKG_CONFIG_LIBDIR_save}"],[    
     2973    export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR_save}"    
     2974   ],[ 
     2975        unset PKG_CONFIG_LIBDIR 
     2976   ]) 
     2977    
    29912978   VLC_ADD_BUILTINS([ffmpeg]) 
    29922979   if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then 
     
    29942981   fi 
    29952982 
    2996    if test -f "${real_ffmpeg_tree}/libavutil/libavutil.a"; then 
    2997      VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavutil ${real_ffmpeg_tree}/libavutil/libavutil.a]) 
    2998      VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavutil]) 
    2999    fi 
    3000  
    3001    VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec ${real_ffmpeg_tree}/libavcodec/libavcodec.a]) 
    3002    VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec]) 
    3003  
    3004    if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then 
    3005      AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.]) 
    3006      VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a]) 
    3007      VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat]) 
    3008    fi 
    30092983 
    30102984   if test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"; then