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

📄 configure.ac

📁 这个软件的功能同我上次传的那个avifile.也是linux上的一个用于多媒体应用的源码。
💻 AC
字号:
dnl Process this file with autoconf to produce a configure script.AC_INITAC_CONFIG_SRCDIR([src/main.cc])AM_INIT_AUTOMAKE(vcr,1.10)dnl Checks for programs.AC_PROG_CCAC_PROG_CXXdnl default compiler flagsCFLAGS="-O2 -Wall"CXXFLAGS="-O2 -Wall"dnl Checks for common header files.AC_PATH_XAC_HEADER_STDCAC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h stdlib.h)dnl Soundcard headerfile. Only one of these can be used, so define it withdnl a global labelAC_CHECK_HEADER(sys/soundcard.h,sound=1)AC_CHECK_HEADER(machine/soundcard.h,sound=2)AC_CHECK_HEADER(soundcard.h,sound=3)if test "x$sound" = "x1"then	AC_DEFINE(VCR_SOUNDCARD_H,[<sys/soundcard.h>],[Location of OSS Soundcard headerfile])elif test "x$sound" = "x2"then	AC_DEFINE(VCR_SOUNDCARD_H,[<machine/soundcard.h>],[Location of OSS Soundcard headerfile])elif test "x$sound" = "x3"then	AC_DEFINE(VCR_SOUNDCARD_H,[<soundcard.h>],[Location of OSS Soundcard headerfile])else	AC_MSG_ERROR([No OSS soundcard headerfile found, bye bye.])fidnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEdnl Checks for library functions.AC_PROG_GCC_TRADITIONALAC_FUNC_MMAPAC_FUNC_VPRINTFAC_CHECK_FUNCS(strerror)AC_CHECK_FUNCS(unsetenv)dnl Check user-configurable parameters firstAC_ARG_WITH(cxx-flags,  [  --with-cxx-flags        Specify your own, custom compilerflags],  [ CXXFLAGS="$withval" ])AC_ARG_WITH(extra-includes,  [  --with-extra-includes   Specify additional paths to find headerfiles],  [ CPPFLAGS="$CPPFLAGS $withval" ])AC_ARG_WITH(extra-libs,  [  --with-extra-libs       Specify aditional paths to find libraries],  [ LDFLAGS="$LDFLAGS $withval" ])AC_ARG_WITH(debug,	[  --with-debug            Enables LOTS of debug info                 [NO]],	[ AC_DEFINE(WANT_V4L_DEBUG,[],[Extra debug information]) ])AVIFLAGS=`avifile-config 2>&1`if test -z "$AVIFLAGS" ; then	cat << EOF***** >>>>> ERROR <<<<< *****Configure couldn't find the progam 'avifile-config'. This program is part ofthe avifile package which can be found on http://divx.euro.ru/. If you havethe package, make sure the program is in your current path. This is usedto determine compile flags.EOF	exit 1fidnl Can't use avifile-config --libs because it contains both LDFLAGS and LIBSdnl parameters (one's supposed to keep these two separated)AVIFLAGS=`avifile-config --prefix`if ! test -z "$AVIFLAGS" ; then	LDFLAGS="$LDFLAGS -L$AVIFLAGS/lib"fiAVIFLAGS=`avifile-config --cflags`if ! test -z "$AVIFLAGS" ; then	CPPFLAGS="$CPPFLAGS $AVIFLAGS"fidnl Checks for libraries.dnl Kijk Edwin, ik check niet meer op de 'main' functie ;-)dnl AC_CHECK_LIB(aviplay,main,HAVE_LIBAVIPLAY=1,,-lstdc++)AC_LANG([C++])LIBS="-laviplay $LIBS"AC_MSG_CHECKING(for aviplay library)AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <aviplay.h>]],	[[double test = GetAvifileVersion();]])],	[HAVE_LIBAVIPLAY=1],[])if test "$HAVE_LIBAVIPLAY" = "1" ; then	AC_MSG_RESULT(yes)else	AC_MSG_RESULT(no)fidnl If I use AC_LANG([C++]) for the other checks, make chokes really bad!dnl AC_LANG([C])dnl This really is dirty, but avifile.h can't be found when testing withdnl gcc (instead of c++).dnl ac_cpp='$CXX -E $CPPFLAGS'AC_LANG([C++])AC_CHECK_HEADER(avifile.h,HAVE_AVIFILE_H=1)dnl AC_LANG([C])dnl ac_cpp='$CPP $CPPFLAGS'dnl Custom stuffif test -z "$HAVE_LIBAVIPLAY" ; then	cat << EOF***** >>>>> ERROR <<<<< *****You need to have libaviplay. If you have it, but configure couldn't find it,you can specify the path to the library with --with-avifile-libs.If you don't have it, you can find it in the 'avifile' package onhttp://divx.euro.ru/EOF	exit 1else	AC_DEFINE(HAVE_LIBAVIPLAY,[],[Presence of Avifile])fiif test "`uname -s`" = "FreeBSD" ; then	FREEBSD=1fiLIBAVIFILE="-laviplay"dnl It won't compile for FreeBSD yet..if test "$FREESD" = "1" ; then	PTHREADFLAGS="-pthread"	LIBPTHREAD=""	AC_DEFINE(_THREAD_SAFE,[],[Compiler flag needed for safe threading])else	PTHREADFLAGS=""	LIBPTHREAD="-lpthread"fidnl Custom definesAC_DEFINE(_REENTRANT,[],[Threads love it])AC_DEFINE(GUILESS,[],[Used in code once borrowed from qtvidcap])AC_SUBST(LIBAVIFILE)AC_SUBST(PTHREADFLAGS)AC_SUBST(LIBPTHREAD)AC_SUBST(CFLAGS)AC_SUBST(CXXFLAGS)SRCDIRS="src doc"AC_SUBST(SRCDIRS)SRCDIRS="src doc"AC_SUBST(SRCDIRS)AM_CONFIG_HEADER(config.h)AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile contrib/Makefile contrib/gtksched/Makefile])AC_OUTPUTcat << EOF****************************************************************************** Before asking questions, be sure to read the FAQ included in the source   ** or read it here:                                                          **                                                                           ** http://www.stack.nl/~brama/vcr/?page=faq                                  **                                                                           ** Happy recording!                                                          ** Bram (bram@vcr.avontuur.org) http://www.stack.nl/~brama/                  ******************************************************************************EOF

⌨️ 快捷键说明

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