configure.ac

来自「这个库实现了录象功能」· AC 代码 · 共 1,003 行 · 第 1/2 页

AC
1,003
字号
            [Do we have libswscale installed?])AH_TEMPLATE([SWSCALE_HEADER], [libswscale header])have_libswscale=falseLIBSWSCALE_REQUIRED="0.5.0"AC_ARG_ENABLE(libswscale,[AC_HELP_STRING([--disable-libswscale],[Disable libswscale (default: autodetect)])],[case "${enableval}" in   yes) test_libswscale=true ;;   no)  test_libswscale=false ;;esac],[test_libswscale=true])if test x$test_libswscale = xtrue; thenPKG_CHECK_MODULES(LIBSWSCALE, libswscale >= $LIBSWSCALE_REQUIRED,                  have_libswscale="true", have_libswscale="false")fiCFLAGS_save=$CFLAGSCFLAGS="$CFLAGS $LIBSWSCALE_CFLAGS"found_header="false"AC_TRY_COMPILE([#include <swscale.h>],[],[found_header="true";SWSCALE_HEADER="<swscale.h>"])if test $found_header = "false"; thenAC_TRY_COMPILE([#include <swscale/swscale.h>],[], [found_header="true";SWSCALE_HEADER="<swscale/swscale.h>" ],)fiif test $found_header = "false"; thenAC_TRY_COMPILE([#include <libswscale/swscale.h>],[], [found_header="true";SWSCALE_HEADER="<libswscale/swscale.h>" ],)fiCFLAGS="$CFLAGS_save"AC_SUBST(LIBSWSCALE_REQUIRED)AC_SUBST(LIBSWSCALE_LIBS)AC_SUBST(LIBSWSCALE_CFLAGS)AM_CONDITIONAL(HAVE_LIBSWSCALE, test x$have_libswscale = xtrue)if test "x$have_libswscale" = "xtrue"; thenAC_DEFINE([HAVE_LIBSWSCALE])AC_DEFINE_UNQUOTED(SWSCALE_HEADER, $SWSCALE_HEADER)fidnldnl Check for libpngdnl AH_TEMPLATE([HAVE_LIBPNG], [Enable png codec])have_libpng=falsePNG_REQUIRED="1.2.23"AC_ARG_WITH(libpng,            AC_HELP_STRING([--without-libpng], [Do not use libpng.]),            [], [with_libpng=yes])dnl *********************************************************************dnl Check for PNG librarydnl   (creates LIBPNG_CFLAGS, LIBPNG_LIBS)dnl *********************************************************************have_libpng=falseif test x$with_libpng != xno ; then  PKG_CHECK_MODULES(LIBPNG, [libpng], [have_libpng=true], [have_libpng=false])  if test x$have_libpng = xfalse ; then    PKG_CHECK_MODULES(LIBPNG, [libpng12], [have_libpng=true], [have_libpng=false])  fifiAM_CONDITIONAL(HAVE_LIBPNG, test x$have_libpng = xtrue)AC_SUBST(LIBPNG_CFLAGS)AC_SUBST(LIBPNG_LIBS)AC_SUBST(PNG_REQUIRED)AM_CONDITIONAL(HAVE_LIBPNG, test x$have_libpng = xtrue)dnldnl faacdnlhave_faac="false"FAAC_REQUIRED="1.24"AH_TEMPLATE([HAVE_FAAC], [Enable faac])if test $have_gpl = "true"; thenAC_ARG_WITH([faac], AS_HELP_STRING([--without-faac], [Build without faac library (default: test)]))if test "x$with_faac" != "xno"; thenOLD_CFLAGS=$CFLAGSOLD_LIBS=$LIBSLIBS="$LIBS -lfaac -lm"CFLAGS="$CFLAGS"AC_MSG_CHECKING(for faac)AC_TRY_RUN([    #include <inttypes.h>    #include <faac.h>    main()    {    int samplerate = 44100, num_channels = 2;    unsigned long input_samples, output_bytes;    faacEncHandle enc;    enc = faacEncOpen(samplerate,                      num_channels,                      &input_samples,                      &output_bytes);    return 0;    }  ],  [    # program could be run    have_faac="true"    AC_MSG_RESULT(yes)    FAAC_CFLAGS=$CFLAGS    FAAC_LIBS=$LIBS  ],    # program could not be run    AC_MSG_RESULT(no))CFLAGS=$OLD_CFLAGSLIBS=$OLD_LIBSfifiAC_SUBST(FAAC_CFLAGS)AC_SUBST(FAAC_LIBS)AC_SUBST(FAAC_REQUIRED)AM_CONDITIONAL(HAVE_FAAC, test x$have_faac = xtrue)if test x$have_faac = xtrue; thenAC_DEFINE(HAVE_FAAC)fidnldnl FAAD2dnlFAAD2_REQUIRED="2.0"AH_TEMPLATE([HAVE_FAAD2], [Enable FAAD2])AH_TEMPLATE([HAVE_NEAACDEC_H], [Use new header file for faad2])have_faad2="false"AC_ARG_WITH([faad2], AS_HELP_STRING([--without-faad2], [Build without faad2 library (default: test)]))if test $have_gpl = "true"; thenif test "x$with_faad2" != "xno"; thenOLD_CFLAGS=$CFLAGSOLD_LIBS=$LIBSCFLAGS="$CFLAGS"LIBS="$LIBS -lfaad -lm"AC_MSG_CHECKING(for neaacdec.h usability for faad2)AC_TRY_RUN([    #include <neaacdec.h>    #include <stdio.h>    main()    {    int faad_major;    int faad_minor;    faacDecHandle dec;    if(sscanf(FAAD2_VERSION, "%d.%d", &faad_major, &faad_minor) < 2)      return -1;    dec = faacDecOpen();    if(!dec)      return -1;    return 0;    }  ],  [    # program could be run    have_faad2="true"    AC_MSG_RESULT(yes)    FAAD2_CFLAGS=$CFLAGS    FAAD2_LIBS=$LIBS    AC_DEFINE(HAVE_NEAACDEC_H)  ],    # program could not be run    AC_MSG_RESULT(no))if test "x$have_faad2" != "xtrue"; thenAC_MSG_CHECKING(for faad.h usability for faad2)AC_TRY_RUN([    #include <faad.h>    #include <stdio.h>    main()    {    int faad_major;    int faad_minor;    faacDecHandle dec;    if(sscanf(FAAD2_VERSION, "%d.%d", &faad_major, &faad_minor) < 2)      return -1;    dec = faacDecOpen();    if(!dec)      return -1;    return 0;    }  ],  [    # program could be run    have_faad2="true"    AC_MSG_RESULT(yes)    FAAD2_CFLAGS=$CFLAGS    FAAD2_LIBS=$LIBS      ],    # program could not be run    AC_MSG_RESULT(no))fiCFLAGS=$OLD_CFLAGSLIBS=$OLD_LIBSfifiAC_SUBST(FAAD2_CFLAGS)AC_SUBST(FAAD2_LIBS)AC_SUBST(FAAD2_REQUIRED)AM_CONDITIONAL(HAVE_FAAD2, test x$have_faad2 = xtrue)if test x$have_faad2 = xtrue; thenAC_DEFINE(HAVE_FAAD2)fidnldnl Check for x264dnlAH_TEMPLATE([HAVE_X264], [Enable X264])have_x264="false"AC_ARG_WITH([x264], AS_HELP_STRING([--without-x264], [Build without x264 library (default: test)]))if test $have_gpl = "true"; thenX264_REQUIRED="0.48"if test "x$with_x264" != "xno"; thenPKG_CHECK_MODULES(X264, x264 >= $X264_REQUIRED, have_x264="true", have_x264="false")fiAC_SUBST(X264_REQUIRED)AC_SUBST(X264_LIBS)AC_SUBST(X264_CFLAGS)fiAM_CONDITIONAL(HAVE_X264, test x$have_x264 = xtrue)dnldnl Plugin directorydnlif test "x$prefix" = xNONE; then  prefix="${ac_default_prefix}"fiif test "x$exec_prefix" = xNONE; then   exec_prefix="${prefix}"fiplugin_dir="$libdir/$PACKAGE"AH_TEMPLATE([PLUGIN_DIR], [Directory for plugins])PLUGIN_DIR=`eval echo $plugin_dir`AC_DEFINE_UNQUOTED(PLUGIN_DIR, "$PLUGIN_DIR")AC_SUBST(PLUGIN_DIR)dnldnl Build CFLAGSdnlCOMMON_CFLAGS=""lqt_test_cflags="-finline-functions -Wall -Winline -Wmissing-declarations -Wdeclaration-after-statement"for i in $lqt_test_cflags; do  LQT_TRY_CFLAGS($i, COMMON_CFLAGS="$COMMON_CFLAGS $i") ;donednldnl GCC VisibilitydnlAH_TEMPLATE([HAVE_GCC_VISIBILITY], [GCC Visibility support])AC_ARG_WITH([visibility], AS_HELP_STRING([--without-visibility], [Build without gcc visibility (default: test)]))if test "x$with_visibility" != "xno"; thenLQT_TRY_CFLAGS("-fvisibility=hidden",               COMMON_CFLAGS="$COMMON_CFLAGS -fvisibility=hidden";	       AC_DEFINE(HAVE_GCC_VISIBILITY))fiif test "x${USER_CFLAGS}" = "x"; then  dnl Optimizing flags  LQT_OPT_CFLAGS($host_cpu, ["-O3 -funroll-all-loops -fomit-frame-pointer"])  CFLAGS="$OPT_CFLAGS"fiAH_TEMPLATE([NDEBUG],            [Causes debug code to e removed])if test x$LQT_DEBUG != xtrue; thenAC_DEFINE(NDEBUG)fiCFLAGS="$CFLAGS $COMMON_CFLAGS"# -L is required so that linker can find libquicktime when DESTDIR is used.# libtool bug, documented at: http://www.geocrawler.com/mail/thread.php3?subject=install+phase+fails&list=404# MODULE_LIBADD="-L$prefix/lib ../../src/libquicktime.la"# The above is OK iff the added library is already installed. The# current# libtool version does not support linking libraries with uninstalled# libraries as occurs when Debian packages are created for the 1st time.# Linking against old libraries may not be desirable!MODULE_LIBADD=../../src/libquicktime.la AC_SUBST(MODULE_LIBADD)UTIL_LIBADD=../src/libquicktime.laAC_SUBST(UTIL_LIBADD)GTKUTIL_LIBADD=../../src/libquicktime.laAC_SUBST(GTKUTIL_LIBADD)dnl Define flags for application to use.LQT_CFLAGS=""LQT_LIBS="-lquicktime $LIBS"AC_SUBST(LQT_CFLAGS)AC_SUBST(LQT_LIBS)dnl Absolute src path for doxygenTOP_SRCDIR=`cd ${srcdir} && pwd` AC_SUBST(TOP_SRCDIR)dnl Write all the makefiles and other stuffAC_OUTPUT([Makefile po/Makefile.in \libquicktime.spec \libquicktime.pc \doc/Makefile \doc/Doxyfile \debian/Makefile \src/Makefile \include/Makefile \include/quicktime/Makefile \include/quicktime/lqt_version.h \plugins/Makefile \plugins/dv/Makefile \plugins/faad2/Makefile \plugins/faac/Makefile \plugins/lame/Makefile \plugins/mjpeg/Makefile \plugins/audiocodec/Makefile \plugins/videocodec/Makefile \plugins/vorbis/Makefile \plugins/png/Makefile \plugins/rtjpeg/Makefile \plugins/ffmpeg/Makefile \plugins/x264/Makefile \utils/Makefile \utils/gtk/Makefile \lqt-config], [chmod a+x lqt-config])echo "Configuration: "$have_gtkecho -n "libdv:      "if test x$have_libdv = "xtrue"; thenecho "Yes"elseecho "Missing / Disabled (Go to http://libdv.sourceforge.net)"fiecho -n "vorbis:     "if test x$have_vorbis = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.vorbis.com/)"fiecho -n "lame:       "if test x$have_lame = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.mp3dev.org/)"fiecho -n "libjpeg:    "if test x$have_libjpeg = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.ijg.org/)"fiecho -n "libpng:     "if test x$have_libpng = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.libpng.org/pub/png/libpng.html)"fiecho -n "libavcodec: "if test x$have_libavcodec = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.ffmpeg.org/)"fiecho -n "libswscale: "if test x$have_libswscale = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.ffmpeg.org/)"fiecho -n "gtk >= $GTK_REQUIRED: "if test x$have_gtk = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.gtk.org/)"fiecho -n "Alsa        "if test x$have_alsa = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.alsa-project.org/)"fi  echo -n "GPL plugins "if test x$have_gpl = "xtrue"; thenecho "Enabled"elseecho "Disabled"fi  if test x$have_gpl = "xtrue"; thenecho -n "faac        "if test x$have_faac = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.audiocoding.com/)"fi  echo -n "faad2       "if test x$have_faad2 = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://www.audiocoding.com/)"fi  echo -n "x264        "if test x$have_x264 = "xtrue"; thenecho "Yes"elseecho "Missing (Go to http://developers.videolan.org/x264.html)"fi  fi

⌨️ 快捷键说明

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