Ticket #1570: mplayer-1.0_rc2_p20090731-configure-fix-x264-test.4.patch

File mplayer-1.0_rc2_p20090731-configure-fix-x264-test.4.patch, 2.2 KB (added by chrisfriedt@…, 17 years ago)

configure-fix-x264-test.patch

  • (a) configure_orig vs. (b) configure

    a b  
    71757175
    71767176
    71777177echocheck "x264"
    7178 if test "$_x264" = auto ; then
     7178if test "$_x264" = auto || test "$_x264" = yes || test "$_x264_lavc" = auto || test "$_x264_lavc" = yes ; then
    71797179  cat > $TMPC << EOF
    71807180#include <inttypes.h>
    71817181#include <x264.h>
     
    71847184#endif
    71857185int main(void) { x264_encoder_open((void*)0); return 0; }
    71867186EOF
    7187   _x264=no
     7187  _x264_tmp=no
     7188  _x264_lavc_tmp=no
    71887189  for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do
    7189     cc_check $_ld_x264 && libs_mencoder="$libs_mencoder $_ld_x264" && _x264=yes && break
     7190    cc_check $_ld_x264 && _x264_tmp=yes && _x264_lavc_tmp=yes && break
    71907191  done
     7192  if test "$_x264" = auto ; then
     7193    if test "$_x264_tmp" = yes ; then
     7194      _x264=yes
     7195    else
     7196      _x264=no
     7197    fi
     7198  else
     7199    if test "$_x264_tmp" = no ; then
     7200      die "x264 test failed"
     7201    fi
     7202  fi
     7203  if test "$_x264_lavc" = auto ; then
     7204    if test "$_x264_lavc_tmp" = yes ; then
     7205      _x264_lavc=yes
     7206    else
     7207      _x264_lavc=no
     7208    fi
     7209  else
     7210    if test "$_x264_lavc_tmp" = no ; then
     7211      die "x264_lavc test failed"
     7212    fi
     7213  fi
    71917214fi
    71927215
     7216#echocheck "x264 in libavcodec"
     7217if test "$_x264_lavc" = yes ; then
     7218  def_x264_lavc='#define CONFIG_LIBX264_ENCODER 1'
     7219  libs_mencoder="$libs_mencoder $_ld_x264"
     7220  _libavencoders="$_libavencoders LIBX264_ENCODER"
     7221else
     7222  _x264_lavc=no
     7223  def_x264_lavc='#define CONFIG_LIBX264_ENCODER 0'
     7224fi
     7225#echores "$_x264_lavc"
     7226_res_comment="in libavcodec: $_x264_lavc"
     7227
    71937228if test "$_x264" = yes ; then
    71947229  def_x264='#define CONFIG_X264 1'
     7230  libs_mplayer="$libs_mplayer $_ld_x264"
    71957231  _codecmodules="x264 $_codecmodules"
    7196   test "$_x264_lavc" = auto && _x264_lavc=yes
    7197   if test "$_x264_lavc" = yes ; then
    7198     def_x264_lavc='#define CONFIG_LIBX264 1'
    7199     libs_mplayer="$libs_mplayer $_ld_x264"
    7200     _libavencoders="$_libavencoders LIBX264_ENCODER"
    7201   fi
    72027232else
    7203   _x264_lavc=no
    72047233  def_x264='#undef CONFIG_X264'
    7205   def_x264_lavc='#define CONFIG_LIBX264 0'
    72067234  _nocodecmodules="x264 $_nocodecmodules"
    72077235fi
    7208 _res_comment="in libavcodec: $_x264_lavc"
    72097236echores "$_x264"
    72107237
    7211 
    72127238echocheck "libdirac"
    72137239if test "$_libdirac_lavc" = auto; then
    72147240  _libdirac_lavc=no