VirtualBox

Changeset 45772 in vbox for trunk/configure


Ignore:
Timestamp:
Apr 26, 2013 11:58:45 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85334
Message:

VPX: allow to build against libvpx provided by the build system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r45613 r45772  
    9999BUILD_LIBCURL=
    100100BUILD_LIBSSL=
     101BUILD_LIBVPX=
    101102PASSIVE_MESA=0
    102103CC="gcc"
     
    16251626}
    16261627
     1628#
     1629# Check for libvpx
     1630#
     1631check_vpx()
     1632{
     1633  if [ -z "$BUILD_LIBVPX" ]; then
     1634    test_header libvpx
     1635    if which_wrapper pkg-config > /dev/null; then
     1636      libvpx_ver=`pkg-config vpx --modversion 2>> $LOG`
     1637      if [ $? -ne 0 ]; then
     1638        log_failure "libvpx not found"
     1639        fail
     1640      else
     1641        FLGVPX=`pkg-config vpx --cflags`
     1642        INCVPX=`strip_I "$FLGVPX"`
     1643        LIBVPX=`pkg-config vpx --libs`
     1644    cat > $ODIR.tmp_src.cc << EOF
     1645#include <cstdio>
     1646#include <vpx/vpx_codec.h>
     1647extern "C" int main(void)
     1648{
     1649  int version = vpx_codec_version();
     1650  int verMajor = VPX_VERSION_MAJOR(version);
     1651  int verMinor = VPX_VERSION_MINOR(version);
     1652  int verPatch = VPX_VERSION_PATCH(version);
     1653  printf("found version %d.%d.%d", verMajor, verMinor, verPatch);
     1654  if (verMajor == 1 && verMinor >= 0)
     1655  {
     1656      printf(", OK.\n");
     1657      return 0;
     1658  }
     1659  else
     1660  {
     1661      printf(", expected version 1.0.0 or higher\n");
     1662      return 1;
     1663   }
     1664}
     1665EOF
     1666        [ -n "$INCVPX" ] && I_INCVPX=`prefix_I "$INCVPX"`
     1667        if test_compile "$LIBVPX $LIBPTHREAD $I_INCVPX" vpx vpx; then
     1668          if test_execute; then
     1669            cnf_append "SDK_VBOX_VPX_INCS" "$INCVPX"
     1670            cnf_append "SDK_VBOX_VPX_LIBS" "`strip_l "$LIBVPX"`"
     1671          fi
     1672        fi
     1673      fi
     1674    fi
     1675  fi
     1676}
     1677
     1678
    16271679
    16281680#
     
    21932245  --build-libssl           build openssl from sources
    21942246  --build-libcurl          build libcurl from sources
     2247  --build-libvpx           build libvpx from sources
    21952248EOF
    21962249[ "$OS"   != "darwin" ] && echo "  --setup-wine             setup a Wine directory and register the hhc hack"
     
    22472300  WITH_KMODS=0
    22482301  BUILD_LIBXML2=1
     2302  BUILD_LIBVPX=1
    22492303  [ $OSE -eq 1 ] || BUILD_LIBCURL=1
    22502304elif [ "$OS" = "haiku" ]; then
     
    24092463      BUILD_LIBCURL=1
    24102464      ;;
     2465    --build-libvpx)
     2466      BUILD_LIBVPX=1
     2467      ;;
    24112468    --build-headless)
    24122469      HEADLESS=1
     
    25852642check_ssl
    25862643check_curl
     2644check_vpx
    25872645[ "$OS" != "darwin"  ] && check_z
    25882646[ "$OS" != "darwin"  ] && check_png
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette