⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avcodec.m4

📁 这个库实现了录象功能
💻 M4
字号:
# Configure paths for libavcodec# Burkhard Plaum, 2004-08-12dnl Compile an avcodec test program and figure out the versionAC_DEFUN([ACL_CHECK_AVCODEC],[AC_MSG_CHECKING([for build ID in libavcodec, libs: $AVCODEC_LIBS])CFLAGS_save=$CFLAGSLIBS_save=$LIBSCFLAGS="$CFLAGS $AVCODEC_CFLAGS"AVCODEC_HEADER=""dnl Look for headerfound_header="false"AC_TRY_COMPILE([#include <libavcodec/avcodec.h>],[], [found_header="true";AVCODEC_HEADER="<libavcodec/avcodec.h>" ],)if test $found_header = "false"; thenAC_TRY_COMPILE([#include <avcodec.h>],[],[found_header="true";AVCODEC_HEADER="<avcodec.h>"])fiif test $found_header = "false"; thenAC_TRY_COMPILE([#include <ffmpeg/avcodec.h>],[], [found_header="true";AVCODEC_HEADER="<ffmpeg/avcodec.h>" ],)fiCFLAGS="$CFLAGS $AVCODEC_CFLAGS"LIBS="$LIBS $AVCODEC_LIBS"avcodec_ok="false"AC_TRY_RUN([    #include <stdio.h>    #include $AVCODEC_HEADER    int main()    {    FILE * output;    if(LIBAVCODEC_BUILD < $1)      return -1;    output=fopen("avcodec_version", "w");    fprintf(output, AV_TOSTRING(LIBAVCODEC_VERSION));    fclose(output);    return 0;    }  ],  [    # program could be run    if test "x$AVCODEC_VERSION" = "x"; then       AVCODEC_VERSION=`cat avcodec_version`    fi    rm -f avcodec_version    avcodec_ok="true"    AC_MSG_RESULT(ok)  ],  [    # program could not be run    AC_MSG_RESULT(failed)  ])CFLAGS="$CFLAGS_save"LIBS="$LIBS_save"])dnl ACL_PATH_AVCODEC(BUILD_ID [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])dnl Test for libavcodec, and define AVCODEC_CFLAGS, AVCODEC_LIBS anddnl AVCODEC_VERSIONAC_DEFUN([ACL_PATH_AVCODEC],[AC_ARG_WITH(avcodec,[  --with-avcodec=PFX   Prefix where libavcodec is installed (optional)], avcodec_prefix="$withval", avcodec_prefix="")dnl We need the _save variables because PKG_CHECK_MODULES will changednl the other variablesAVCODEC_CFLAGS_save=""AVCODEC_LIBS_save=""avcodec_done="false"AH_TEMPLATE([AVCODEC_HEADER],            [Header for libavcodec])dnldnl First preference: configure optionsdnlif test "x$avcodec_prefix" != x; thenAVCODEC_CFLAGS="-I$avcodec_prefix/include"AVCODEC_LIBS="-L$avcodec_prefix/lib -lavcodec"ACL_CHECK_AVCODEC([$1])  if test "x$avcodec_ok" = "xtrue"; then    avcodec_done="true"  fifidnldnl Second Perference: Autodetectdnlif test "x$avcodec_done" = "xfalse"; then  PKG_CHECK_MODULES(AVCODEC, libavcodec, avcodec_orig="true", avcodec_orig="false")  ACL_CHECK_AVCODEC([$1])  if test "x$avcodec_ok" = "xtrue"; then    avcodec_done="true"  fifiif test "x$avcodec_done" = "xtrue"; then  ifelse([$2], , :, [$2])  AC_DEFINE_UNQUOTED(AVCODEC_HEADER, $AVCODEC_HEADER)else  ifelse([$3], , :, [$3])fi])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -