1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/synote-mpeg4ip

Клонировать/Скачать
configure.in 27 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
wmaycisco Отправлено 29.09.2007 00:45 1a11af2
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002
dnl Process this file with autoconf to produce a configure script.
AC_INIT(mpeg4ip, 1.6.1)
AM_CONFIG_HEADER(mpeg4ip_config.h)
dnl Prevent user from running just ./configure
AC_CHECK_FILE(./bootstrapped, [did_bootstrap=yes], [did_bootstrap=no])
if test x$did_bootstrap = xno; then
AC_MSG_ERROR([Please run bootstrap first])
exit -1
fi
rm -f config.h >&/dev/null
touch config.h
dnl Detect the canonical host and target build environment
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([1.5 no-define])
dnl Checks for programs.
dnl check for mac
SUN_LIBS=
have_macosx=false
config_sdl=true
case "$target" in
*-apple-darwin*)
have_macosx=true
config_sdl=false
AC_DEFINE(HAVE_MACOSX, [1], [have mac])
;;
*-*-solaris*)
SUN_LIBS=-lstdc++
;;
*-cygwin*)
config_sdl=false
;;
*)
;;
esac
if test $config_sdl = true; then
AC_CONFIG_SUBDIRS(lib/SDLAudio)
fi
AM_CONDITIONAL(HAVE_MAC_OSX, $have_macosx)
AC_CONFIG_SUBDIRS(common/video/iso-mpeg4)
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
AC_MSG_CHECKING([libtool tag=C for nasm])
if test -z "`./libtool --help | grep \"\\-\\-tag\"`"; then
AC_MSG_RESULT([no])
else
LIBTOOL_C_TAG="--tag=CXX"
AC_SUBST(LIBTOOL_C_TAG)
AC_MSG_RESULT([yes])
fi
AC_PROG_MAKE_SET
AC_PROG_CC
OBJC="???"
AC_SUBST(OBJC)
AC_PROG_CXX(c++)
AC_C_INLINE
AC_C_CONST
AC_PROG_INSTALL
AC_PATH_XTRA
AC_C_BIGENDIAN
AC_SUBST(ACLOCAL_AMFLAGS)
AS=gcc
AC_SUBST(AS)
ASFLAGS="$ASFLAGS"
AC_SUBST(ASFLAGS)
CCAS=gcc
AC_SUBST(CCAS)
CCASFLAGS="$ASFLAGS"
AC_SUBST(CCASFLAGS)
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_SIZEOF(long)
AC_LANG_PUSH(C++)
AC_CHECK_SIZEOF(bool)
AC_LANG_POP(C++)
AC_CHECK_HEADERS(fcntl.h unistd.h stdint.h inttypes.h getopt.h byteswap.h)
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_FILE(/dev/urandom, AC_DEFINE([HAVE_DEV_URANDOM], [1], [have /dev/urandom]))
dnl AC_LANG_PUSH(C++)
AC_ARG_ENABLE(id3tags,
[AC_HELP_STRING([--disable-id3tags],[disable use of installed id3tags library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-id3tags]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_id3_tag=false
AC_MSG_NOTICE([disabling id3 tag library])
else
AC_LANG_PUSH(C++)
AC_CHECK_HEADER(id3/tag.h, [have_id3_tag=true], [have_id3_tag=false])
if test x$have_id3_tag = xtrue; then
saved_LIBS="$LIBS"
LIBS="$LIBS -lid3 -lz"
AC_LINK_IFELSE(
[#include <id3/tag.h>
#include <id3/misc_support.h>
int main () {
ID3_GetAlbum((const ID3_Tag *)NULL);
return 0;
}
],
[have_id3_tag=true], [have_id3_tag=false])
LIBS=$saved_LIBS
fi
AC_LANG_POP(C++)
fi
if test $have_id3_tag = true; then
dnl should check for libraries here
AC_DEFINE(HAVE_ID3_TAG_H, [1], [have id3/tag.h])
fi
AM_CONDITIONAL(HAVE_ID3_TAG, $have_id3_tag)
dnl Check for pre 1.0 API version of xvid
AC_ARG_ENABLE(xvid,
[AC_HELP_STRING([--disable-xvid],[disable xvid link])],
[ case "${enableval}" in
no) disable_xvid=yes ;;
yes) disable_xvid=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-xvid]) ;;
esac],
[disable_xvid=no])
if test x$disable_xvid = xyes; then
use_xvid10=false
no_xvid=true
AC_MSG_NOTICE([disabling xvid library])
else
AC_MSG_CHECKING([for xvid.h, API version 3])
AC_TRY_COMPILE([],
[#include <xvid.h>
int ix = API_VERSION;],
[no_xvid=false],
[no_xvid=true])
use_xvid10=false
if test $no_xvid = false; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_XVID_H, [1], [have xvid.h])
else
AC_MSG_RESULT(no)
AC_CHECK_HEADER(xvid.h, [no_xvid=false], [noxvid=true])
if test $no_xvid = false; then
use_xvid10=true
AC_DEFINE(HAVE_XVID10, [1], [have xvid.h with 1.0 API])
fi
fi
fi
AM_CONDITIONAL(HAVE_XVID_1_0, $use_xvid10)
AM_CONDITIONAL(NO_XVID, $no_xvid)
dnl check for Sun, BSD/OS libraries
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(gnugetopt, getopt_long)
AC_SEARCH_LIBS(inet_addr, nsl)
AC_SEARCH_LIBS(inet_aton, resolv)
AC_SEARCH_LIBS(dlopen, dl libc)
dnl check for this for mp3lame
saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_ARG_ENABLE(a52dec,
[AC_HELP_STRING([--disable-a52dec],[disable use of installed a52dec library])],
[ case "${enableval}" in
no) disable_a52=yes ;;
yes) disable_a52=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-a52]) ;;
esac],
[disable_a52=no])
if test x$disable_a52 = xyes; then
have_a52=false
AC_MSG_NOTICE([disabling a52dec library])
else
AC_CHECK_LIB(a52,
a52_syncinfo,
[have_a52=true],
[have_a52=false])
fi
AM_CONDITIONAL(HAVE_A52DEC_LIB, $have_a52)
AC_ARG_ENABLE(mad,
[AC_HELP_STRING([--disable-mad],[disable use of installed mad library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-mad]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_mad=false
AC_MSG_NOTICE([disabling mad library])
else
AC_CHECK_LIB(mad,
mad_decoder_init,
[have_mad=true],
[have_mad=false])
fi
AM_CONDITIONAL(HAVE_LIBMAD, $have_mad)
AC_ARG_ENABLE(mpeg2dec,
[AC_HELP_STRING([--disable-mpeg2dec],[disable use of installed mpeg2dec library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-mpeg2dec]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_mpeg2=false
AC_MSG_NOTICE([disabling mpeg2dec library])
else
AC_CHECK_LIB(mpeg2,
mpeg2_init,
[have_mpeg2=true],
[have_mpeg2=false])
if test x$have_mpeg2 = xtrue; then
AC_MSG_CHECKING([libmpeg2 version])
AC_COMPILE_IFELSE([#include <stdint.h>
#include <mpeg2dec/mpeg2.h>
#ifndef MPEG2_VERSION
#error no mpeg2 version
#else
#if MPEG2_VERSION(0, 4, 0) <= MPEG2_RELEASE
int main (int argc, char **argv)
{
return 0;
}
#else
#error prior release
#endif
#endif
],
[have_mpeg2=true],
[have_mpeg2=false])
if test x$have_mpeg2 = xtrue; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
fi
AM_CONDITIONAL(HAVE_LIBMPEG2, $have_mpeg2)
if test $have_mpeg2 = true; then
AC_DEFINE(HAVE_LIBMPEG2, [1], [have libmpeg2 decoder library])
fi
LIBS=$saved_LIBS
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_CHECK_FUNCS(strerror strcasestr poll getopt getopt_long getopt_long_only socketpair strsep inet_ntoa inet_pton inet_ntop inet_aton vsnprintf)
AC_CHECK_TYPES([in_port_t, socklen_t, struct iovec, struct sockaddr_storage], , ,
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>])
AC_ARG_ENABLE(igmpv3,
[AC_HELP_STRING([--enable-igmpv3],[enable igmpv3])],
[ case "${enableval}" in
yes) igmpv3=true ;;
no) igmpv3=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-igmpv3) ;;
esac],
[igmpv3=true])
if test igmpv3 = true; then
AC_CHECK_TYPES([struct ip_mreq_source],
AC_DEFINE(HAVE_IGMP_V3, [1], [IGMPv3 definition]),
,
[#include <netinet/in.h>])
fi
AC_CHECK_MEMBERS(fpos_t.__pos,,, [#include <stdio.h>])
dnl borrowed from ac-archive.sourceforge.net
dnl @author Guido Draheim <guidod@gmx.de>
dnl heavilly modified
AC_DEFUN([MY_CHECK_CC_OPT],
[
save_CFLAG="$CFLAGS"
save_CXXFLAG="$CXXFLAGS"
CFLAGS="$CFLAGS -Werror $1"
CXXFLAGS="$CXXFLAGS -Werror $1"
AC_MSG_CHECKING([whether $3 accepts $1])
AC_COMPILE_IFELSE(
[extern void f(void); void f(void){}],
[$2=yes
AC_MSG_RESULT([yes])],
[$2=no
AC_MSG_RESULT([no])])
CFLAGS="$save_CFLAG"
CXXFLAGS="$save_CXXFLAG"
])
AC_DEFUN([MY_CHECK_CC_OPT_SET],
[
MY_CHECK_CC_OPT($1, mpeg4ip_ok, $3)
if test $mpeg4ip_ok = yes; then
$2="$$2 $1"
fi
])
AC_DEFUN([MY_CHECK_CC_OPT_F_OR_M],
[
temp_val=-m$1
MY_CHECK_CC_OPT($temp_val,mpeg4ip_ok, [c compiler])
if test $mpeg4ip_ok = yes; then
AC_SUBST($2, $temp_val)
AM_CONDITIONAL(HAVE_$2, true)
else
temp_val=-f$1
MY_CHECK_CC_OPT($temp_val, mpeg4ip_ok, [c compiler])
if test $mpeg4ip_ok = yes; then
AC_SUBST($2, $temp_val)
AM_CONDITIONAL(HAVE_$2, true)
else
temp_val=
AC_SUBST($2, $temp_val)
AM_CONDITIONAL(HAVE_$2, false)
fi
fi
])
dnl Allow server build to be disabled
AC_ARG_ENABLE(server,
[AC_HELP_STRING([--enable-server],[enable server build])],
[ case "${enableval}" in
yes) server=true ;;
no) server=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-server) ;;
esac],
[server=true])
AM_CONDITIONAL(SERVER, test $server = true)
dnl Allow player build to be disabled
AC_ARG_ENABLE(player,
[AC_HELP_STRING([--enable-player],[enable player build])],
[ case "${enableval}" in
yes) player=true ;;
no) player=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-player) ;;
esac],
[player=true])
AM_CONDITIONAL(PLAYER, [test x$player = xtrue])
#autoconf is slightly confusing here:
#enableval will be 'no' if --disable-* is present and '' if it isn't
AC_ARG_ENABLE(srtp,[AC_HELP_STRING([--disable-srtp],[disable use of installed SRTP library])],
[ case "${enableval}" in
yes) have_srtp=true ;;
no) have_srtp=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --disable-srtp]) ;;
esac],
[have_srtp=true])
if test $have_srtp = true; then
AC_CHECK_LIB(srtp, srtp_init, [have_srtp=true], [have_srtp=false])
fi
if test $have_srtp = true; then
SRTPLIB="-lsrtp"
AC_MSG_NOTICE([enabling use of SRTP library])
AC_DEFINE(HAVE_SRTP, [1], [enable use of srtp library])
else
SRTPLIB=""
AC_MSG_NOTICE([not using SRTP library])
fi
AC_SUBST(SRTPLIB)
AC_ARG_ENABLE(mp4live,
[AC_HELP_STRING([--enable-mp4live],[enable mp4live build on Linux [default=yes]])],
, enable_mp4live=yes)
have_mp4live=false
if test x$enable_mp4live = xyes; then
case "$target" in
*-*-linux*)
have_mp4live=true
AC_ARG_ENABLE(mp4live-alsa,
[AC_HELP_STRING([--enable-mp4live-alsa],
[enable ALSA interface in mp4live])],
[ case "${enableval}" in
no) enable_alsa=no ;;
yes) enable_alsa=yes ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mp4live-alsa) ;;
esac],
[ enable_alsa=no])
if test x$enable_alsa = xyes; then
dnl - CheckAlsa - from SDL
AM_PATH_ALSA(0.9.0, [have_alsa=yes], [have_alsa=no])
if test x$have_alsa = xyes; then
AC_CHECK_FUNCS(snd_pcm_hw_params_set_rate_resample)
dnl - not needed AC_SUBST(ALSA_CFLAGS) - gotten by SDL_CFLAGS
dnl - not needed AC_SUBST(ALSA_LIBS) - gotten by SDL_LIBS
AC_DEFINE(HAVE_ALSA, [1], [have alsa enabled for mp4live])
fi
CFLAGS="$alsa_save_CFLAGS"
LDFLAGS="$alsa_save_LDFLAGS"
LIBS="$alsa_save_LIBS"
dnl - restore flags
fi
AC_CHECK_TYPE([struct v4l2_buffer],
[AC_DEFINE(HAVE_MP4LIVE, 1, [mp4live can be used])],
[have_mp4live=false],
[#include <sys/time.h>
#include <sys/types.h>
#include <linux/videodev.h>])
if test x$have_mp4live = xfalse; then
KERNEL_VERSION=`uname -r`
AC_CHECK_FILE(/lib/modules/$KERNEL_VERSION/build/include/linux/videodev2.h,
[AC_MSG_WARN([])
AC_MSG_WARN([])
AC_MSG_WARN([We cannot locate videodev2.h in /usr/include/linux])
AC_MSG_WARN([])
AC_MSG_WARN([This file is responsible for V4L2 in mp4live])
AC_MSG_WARN([This file is correct in /lib/modules/$KERNEL_VERSION/build/include])
AC_MSG_WARN([It is recommended that you copy this file and videodev.h to /usr/include/linux and re-run bootstrap])
AC_MSG_WARN([You may also have to have to copy compiler.h, as well])
AC_MSG_WARN([])
AC_MSG_WARN([This is known to happen on Fedora Core systems])
AC_MSG_WARN([Mp4live has been disabled])
AC_MSG_WARN([])
])
fi
;;
*)
;;
esac
fi
AM_CONDITIONAL(MP4LIVE, [test x$have_mp4live = xtrue])
LIBVORBIS_LIB=
if test x$have_mp4live = xtrue; then
AC_CHECK_LIB(vorbis, vorbis_bitrate_init, [have_vorbis=true], [have_vorbis=false])
if test x$have_vorbis = xtrue; then
LIBVORBIS_LIB="-lvorbis -lvorbisenc"
AC_CHECK_HEADER([faad.h], [LIBVORBIS_LIB="$LIBVORBIS_LIB -lfaad"])
fi
fi
AC_SUBST(LIBVORBIS_LIB)
dnl test for ffmpeg
have_ffmpeg=false
disable_ffmpeg=false
FFMPEG_INC=
FFMPEG_LIB=
AC_ARG_ENABLE(ffmpeg,
[AC_HELP_STRING([--enable-ffmpeg=<directory>],[enable ffmpeg for mp4live and specify ffmpeg home directory])],
[if test x$enableval = xno; then
disable_ffmpeg=true
else
if test x$enableval != xyes; then
have_ffmpeg_arg=true
fi
fi
],
[have_ffmpeg_arg=false]
)
if test x$disable_ffmpeg = xfalse; then
if test x$have_ffmpeg_arg = xtrue; then
AC_MSG_NOTICE([have enable ffmpeg $enable_ffmpeg])
FFMPEG_INC=-I${enable_ffmpeg}/libavcodec
FFMPEG_LIB="${enable_ffmpeg}/libavcodec/libavcodec.a -lz"
saveCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $FFMPEG_INC"
AC_CHECK_TYPES([AVRational], , , [#include <avcodec.h>])
AC_CHECK_MEMBERS(AVCodecContext.time_base, , , [#include <avcodec.h>])
AC_CHECK_DECLS([avcodec_decode_audio2], , ,[#include <avcodec.h>])
CFLAGS=$saveCFLAGS
have_ffmpeg=true
AC_DEFINE(HAVE_FFMPEG, 1, [enable ffmpeg for mp4live])
else
saved_LIBS="$LIBS"
LIBS="$LIBS -lm -lz"
AC_CHECK_LIB(avutil, av_crc_init, [have_avutil=true], [have_avutil=false])
if test x$have_avutil = xtrue; then
LIBS="$LIBS -lavutil"
ffmpeg_add_libs="-lavutil"
else
ffmpeg_add_libs=
fi
AC_CHECK_LIB(avcodec, avcodec_init,
[have_ffmpeg=true], [have_ffmpeg=false])
LIBS=$saved_LIBS
if test x$have_ffmpeg = xtrue; then
AC_DEFINE(HAVE_FFMPEG_INSTALLED, 1, [defined if ffmpeg is installed])
FFMPEG_INC=
FFMPEG_LIB="-lavcodec -lz $ffmpeg_add_libs"
AC_CHECK_TYPES([AVRational], , , [#include <ffmpeg/avcodec.h>])
AC_CHECK_MEMBERS(AVCodecContext.time_base, , , [#include <ffmpeg/avcodec.h>])
AC_CHECK_DECLS([avcodec_decode_audio2], , ,[#include <ffmpeg/avcodec.h>])
AC_DEFINE(HAVE_FFMPEG, 1, [enable ffmpeg for mp4live])
AC_CHECK_LIB(amrnb, VADxEncoder_Interface_init,
[have_amr_nb=true], [have_amr_nb=false])
AC_CHECK_LIB(amrwb, E_IF_init,
[have_amr_wb=true], [have_amr_wb=false])
if test x$have_amr_nb = xtrue; then
FFMPEG_LIB="$FFMPEG_LIB -lamrnb"
fi
if test x$have_amr_wb = xtrue; then
FFMPEG_LIB="$FFMPEG_LIB -lamrwb"
fi
fi
fi
else
AC_MSG_NOTICE([disabling ffmpeg library])
fi
AC_SUBST(FFMPEG_INC)
AC_SUBST(FFMPEG_LIB)
AM_CONDITIONAL(HAVE_FFMPEG, [test x$have_ffmpeg = xtrue])
LAME_LIB=
FAAC_LIB=
X264_LIB=
TWOLAME_LIB=
if test x$have_mp4live = xtrue; then
dnl mp4live test
AC_ARG_ENABLE(mp3lame,
[AC_HELP_STRING([--disable-mp3lame],[disable use of installed lame library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-mp3lame]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_lame=false
AC_MSG_NOTICE([disabling lame library])
else
saved_LIBS="$LIBS"
LIBS="$LIBS -lm -lz"
AC_CHECK_LIB(mp3lame, lame_init, [have_lame=true], [have_lame=false])
LIBS=$saved_LIBS
fi
if test x$have_lame = xtrue; then
AC_DEFINE(HAVE_LAME, 1, [enable lame for mp4live])
LAME_LIB=-lmp3lame
else
LAME_LIB=
fi
AC_ARG_ENABLE(twolame,
[AC_HELP_STRING([--disable-twolame],[disable use of installed twolame library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-twolame]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_twolame=false
AC_MSG_NOTICE([disabling twolame library])
else
saved_LIBS="$LIBS"
LIBS="$LIBS -lm -lz"
AC_CHECK_LIB(twolame, twolame_init, [have_twolame=true], [have_twolame=false])
LIBS=$saved_LIBS
fi
if test x$have_twolame = xtrue; then
AC_DEFINE(HAVE_TWOLAME, 1, [enable twolame for mp4live])
TWOLAME_LIB=-ltwolame
else
TWOLAME_LIB=
fi
AC_ARG_ENABLE(faac,
[AC_HELP_STRING([--disable-faac],[disable use of installed faac library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-faac]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_faac=false
AC_MSG_NOTICE([disabling faac library])
else
saved_LIBS="$LIBS"
LIBS="$LIBS -lm -lz"
AC_CHECK_LIB(faac, faacEncOpen, [have_faac=true], [have_faac=false])
LIBS=$saved_LIBS
fi
if test x$have_faac = xtrue; then
AC_DEFINE(HAVE_FAAC, 1, [enable faac for mp4live])
FAAC_LIB=-lfaac
else
FAAC_LIB=
fi
AC_ARG_ENABLE(x264,
[AC_HELP_STRING([--disable-x264],[disable use of installed x264 library])],
[ case "${enableval}" in
no) disable_it=yes ;;
yes) disable_it=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-x264]) ;;
esac],
[disable_it=no])
if test x$disable_it = xyes; then
have_x264=false
AC_MSG_NOTICE([disabling x264 library])
else
saved_LIBS="$LIBS"
LIBS="$LIBS -lm -lz -lpthread"
AC_CHECK_LIB(x264, x264_encoder_open, [have_x264=true], [have_x264=false])
LIBS=$saved_LIBS
fi
if test x$have_x264 = xtrue; then
AC_DEFINE(HAVE_X264, 1, [enable x264 for mp4live])
AC_CHECK_MEMBERS([x264_param_t.rc.i_rc_method], , , [#include <stdint.h>
#include <x264.h>])
X264_LIB=-lx264
else
X264_LIB=
fi
dnl - end of mp4live test
fi
AC_SUBST(LAME_LIB)
AC_SUBST(FAAC_LIB)
AC_SUBST(X264_LIB)
AC_SUBST(TWOLAME_LIB)
AM_CONDITIONAL(HAVE_X264, [test x$have_x264 = xtrue])
AC_ARG_ENABLE(ipv6,
[AC_HELP_STRING([--enable-ipv6],[enable IPv6])])
if test x$enable_ipv6 = xyes; then
AC_DEFINE(HAVE_IPv6, 1, [enable IPv6 architecture])
AC_MSG_NOTICE([ipv6 enabled $enable_ipv6])
AC_CACHE_CHECK(for getipnodebyname in <netdb.h>, ucl_cv_getipnodebyname_in_netdb_h,
[AC_EGREP_HEADER(getipnodebyname,
netdb.h,
ucl_cv_getipnodebyname_in_netdb_h=yes,
ucl_cv_getipnodebyname_in_netdb_h=no)])
if test $ucl_cv_getipnodebyname_in_netdb_h
then
AC_DEFINE([HAVE_GETIPNODEBYNAME], [1], [have getipnodebyname])
fi
AC_CHECK_HEADERS(netinet6/in6.h)
AC_CHECK_HEADERS(netinet/ip6.h)
AC_CHECK_TYPES([addrinfo], , ,
[#include <netdb.h>])
AC_CACHE_CHECK(for sin6_len in struct sockaddr_in6, ucl_cv_sin6_len,
[AC_TRY_COMPILE([
#ifdef HAVE_NETINET6_IN6_H
#include <netinet6/in6.h>
#else
#ifdef HAVE_NETINET_IP6_H
#include <netinet/ip6.h>
#else
#include <netinet/in.h>
#endif
#endif /* HAVE_NETINET_IN6_H */
],[
struct sockaddr_in6 s_in;
s_in.sin6_len = 0;
],
ucl_cv_sin6_len=yes,
ucl_cv_sin6_len=no
)])
if test $ucl_cv_sin6_len = yes
then
AC_DEFINE([HAVE_SIN6_LEN], [1], [have sin6_len])
fi
else
AC_MSG_NOTICE([ipv6 not enabled $enable_ipv6])
fi
AC_ARG_ENABLE(ppc,
[AC_HELP_STRING([--enable-ppc],
[use PPC assembly on ppc [default=yes]])],
,
enable_ppc=yes)
dnl read out glib and gtk paths and flags. Will need to dummy this
dnl out for a glibless system
AC_ARG_ENABLE(gtk-glib,
[AC_HELP_STRING([--disable-gtk-glib],[disable gtk check])],
[ case "${enableval}" in
no) disable_gtk_glib=yes ;;
yes) disable_gtk_glib=no ;;
*) AC_MSG_ERROR([bad valud ${enableval} for --disable-gtk-glib]) ;;
esac],
[disable_gtk_glib=no])
glib_gtk=no
if test x$disable_gtk_glib = xno; then
AM_PATH_GLIB_2_0(, [haveglib20=yes], [haveglib20=no])
if test x$haveglib20 = xyes; then
AM_PATH_GTK_2_0(, [havegtk20=yes], [havegtk20=no])
if test x$havegtk20 = xyes; then
AC_DEFINE(HAVE_GTK_2_0, 1, [Have GTK 2.0 on system])
AC_DEFINE(HAVE_GTK, 1, [Have GTK on system])
glib_gtk=yes
fi
fi
dnl If we're going to check for GLIB, we most likely need the real path
dnl we need to save off the CFLAGS and CPPFLAGS for the AC_CHECK_HEADER
dnl command
save_CFLAG="$CFLAGS"
save_CPPFLAG="$CPPFLAGS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
CPPFLAGS="$CPPFLAGS $GLIB_CFLAGS"
AC_CHECK_HEADERS(glib.h)
CFLAGS="$save_CFLAG"
CPPFLAGS="$save_CPPFLAG"
fi
if test x$glib_gtk = xno; then
GLIB_CFLAGS=""
GLIB_LIBS=""
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GTK_CFLAGS=""
GTK_LIBS=""
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
fi
AM_CONDITIONAL(NO_GLIB_GTK, test x$glib_gtk = xno)
AC_ARG_ENABLE(mmx,
[AC_HELP_STRING([--enable-mmx],[use MMX assembly on x86 [default=yes]])],
,
enable_mmx=yes)
test_use_mmx=false
if test x$enable_mmx = xyes; then
AC_CHECK_PROG(USENASM, nasm, true, false)
if test x$USENASM = xtrue; then
AC_MSG_CHECKING(nasm version...)
BILLSNASM_arg=`nasm -r | tr '.' ' '`
BILLSNASM_ret=`util/testnasm.sh $BILLSNASM_arg`
if test x$BILLSNASM_ret = x"yes"; then
USENASM=true
AC_MSG_RESULT(valid)
else
USENASM=false
AC_MSG_RESULT(invalid)
AC_MSG_WARN(Installed version of NASM is incorrect; please update to 0.98.19 or greater)
fi
fi
if test x$USENASM = xtrue; then
AC_PATH_PROG(NASM, nasm)
case $target in
i?86*)
CFLAGS="$CFLAGS -DUSE_MMX"
CXXFLAGS="$CXXFLAGS -DUSE_MMX"
case $ARCH in
win32)
NASMFLAGS="-f win32"
;;
*)
NASMFLAGS="-f elf"
;;
esac
AC_SUBST(NASMFLAGS)
test_use_mmx=true
;;
esac
fi
fi
AC_PATH_X
AC_PATH_XTRA
extra=
if test x$have_x = xyes; then
extra="$X_LIBS -lX11 -lXext"
fi
dnl Get SDL cflags and SDL libraries to include
SDL_LIBS="`sdl-config --libs` $extra"
AC_SUBST(SDL_LIBS)
SDL_LIB_LIBS="`sdl-config --libs | sed /-lSDLmain/s///`"
AC_SUBST(SDL_LIB_LIBS)
AC_SUBST(SUN_LIBS)
dnl
BASE_ERR="-Wall"
AC_ARG_ENABLE(warns-as-err,
[AC_HELP_STRING([--enable-warns-as-err],[enable warnings as errors])],
[if test x$enableval = xno; then
AC_MSG_NOTICE([compiler warnings will not be errors])
else
BASE_ERR="$BASE_ERR -Werror"
AC_MSG_NOTICE([enabling compiler warnings as errors])
fi
],
[AC_MSG_NOTICE([compiler warnings will not be errs])])
BILLS_CWARNINGS="$BASE_ERR"
AM_CONDITIONAL(HAVE_ALIGN_LOOPS, false)
MY_CHECK_CC_OPT_F_OR_M(align-loops, ALIGN_LOOPS)
AM_CONDITIONAL(HAVE_ALIGN_FUNCS, false)
MY_CHECK_CC_OPT_F_OR_M(align-functions, ALIGN_FUNCS)
AM_CONDITIONAL(HAVE_ALIGN_JUMPS, false)
MY_CHECK_CC_OPT_F_OR_M(align-jumps, ALIGN_JUMPS)
MY_CHECK_CC_OPT_SET([-Wmissing-prototypes], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wstrict-prototypes], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wmissing-declarations], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wmissing-field-initializers], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wno-char-subscripts], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wno-unknown-pragmas],BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wformat=2],BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wdeclaration-after-statement], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wpointer-arith], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wsign-compare], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wswitch-enum], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wtraditional], BILLS_CWARNINGS, [c compiler])
MY_CHECK_CC_OPT_SET([-Wnested-externs], BILLS_CWARNINGS, [c compiler])
BILLS_CPPWARNINGS="$BASE_ERR"
AC_LANG_PUSH(C++)
MY_CHECK_CC_OPT_SET([-Wmissing-prototypes], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Wmissing-field-initializers], BILLS_CWARNINGS, [c++ compiler])
MY_CHECK_CC_OPT_SET([-Wno-char-subscripts], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Woverloaded-virtual], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Wno-unknown-pragmas], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Wno-deprecated], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Wformat=2], BILLS_CPPWARNINGS,[c++ compiler])
MY_CHECK_CC_OPT_SET([-Wpointer-arith], BILLS_CPPWARNINGS, [c++ compiler])
MY_CHECK_CC_OPT_SET([-Wsign-compare], BILLS_CPPWARNINGS, [c++ compiler])
MY_CHECK_CC_OPT_SET([-fno-strict-aliasing], BILLS_CPPWARNINGS, [c++ compiler])
AC_LANG_POP(C++)
AC_SUBST(BILLS_CWARNINGS)
AC_SUBST(BILLS_CPPWARNINGS)
PLAYER_PLUGIN_DIR=$libdir/mp4player_plugin
AC_SUBST(PLAYER_PLUGIN_DIR)
SDL_CFLAGS=`sdl-config --cflags`
case "$target" in
*-apple-darwin*)
have_ubb=false
AC_ARG_ENABLE(universal-binary,
[AC_HELP_STRING([--universal-binary],[enable universal binary build on Mac])],
[ case "${enableval}" in
yes) have_ubb=true ;;
no) have_ubb=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-universal-binary) ;;
esac],
[have_ubb=false])
if test $have_ubb = true; then
CFLAGS="$CFLAGS -arch i386 -arch ppc"
CXXFLAGS="$CXXFLAGS -arch i386 -arch ppc"
LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
AC_MSG_NOTICE([Mac universal build is enabled])
fi
;;
esac
CFLAGS="$CFLAGS -DMPEG4IP $SDL_CFLAGS"
AC_SUBST(CFLAGS)
CXXFLAGS="$CXXFLAGS -DMPEG4IP $SDL_CFLAGS"
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
dnl Now output the Makefile's
AC_OUTPUT( \
Makefile \
common/Makefile \
common/video/Makefile \
doc/Makefile \
doc/ietf/Makefile \
doc/mcast/Makefile \
doc/programs/Makefile \
doc/mp4v2/Makefile \
include/Makefile \
lib/Makefile \
lib/audio/Makefile \
lib/avi/Makefile \
lib/fposrec/Makefile \
lib/ffmpeg/Makefile \
lib/gnu/Makefile \
lib/mp4/Makefile \
lib/ismacryp/Makefile \
lib/srtp/Makefile \
lib/mp4/doc/Makefile \
lib/mp4v2/Makefile \
lib/mp4v2/test/Makefile \
lib/mp4v2/util/Makefile \
lib/mp4av/Makefile \
lib/mpeg2ps/Makefile \
lib/mpeg2t/Makefile \
lib/msg_queue/Makefile \
lib/rtp/Makefile \
lib/sdp/Makefile \
lib/utils/Makefile \
server/Makefile \
server/mp4live/Makefile \
server/mp4live/gui/Makefile \
server/mp4live/h261/Makefile \
server/mp4creator/Makefile \
server/util/Makefile \
server/util/mp4encode/Makefile \
server/util/avi2raw/Makefile \
server/util/avidump/Makefile \
server/util/rgb2yuv/Makefile \
server/util/lboxcrop/Makefile \
player/Makefile \
player/lib/Makefile \
player/lib/libhttp/Makefile \
player/lib/rtsp/Makefile \
player/lib/audio/Makefile \
player/lib/audio/celp/Makefile \
player/lib/audio/celp/BS/Makefile \
player/lib/audio/celp/dec/Makefile \
player/lib/audio/celp/include/Makefile \
player/lib/audio/faad/Makefile \
player/lib/audio/mp3util/Makefile \
player/lib/audio/portaudio/Makefile \
player/lib/mp4util/Makefile \
player/plugin/Makefile \
player/plugin/audio/Makefile \
player/plugin/audio/a52dec/Makefile \
player/plugin/audio/celp/Makefile \
player/plugin/audio/ffmpeg/Makefile \
player/plugin/audio/g711/Makefile \
player/plugin/audio/raw/Makefile \
player/plugin/rtp/Makefile \
player/plugin/rtp/h261/Makefile \
player/plugin/rtp/h264/Makefile \
player/plugin/rtp/isma_audio/Makefile \
player/plugin/rtp/isma_href/Makefile \
player/plugin/rtp/isma_video/Makefile \
player/plugin/rtp/rfc2429/Makefile \
player/plugin/rtp/rfc3016/Makefile \
player/plugin/rtp/rfc3267/Makefile \
player/plugin/text/Makefile \
player/plugin/text/href/Makefile \
player/plugin/text/plain/Makefile \
player/plugin/video/Makefile \
player/plugin/video/ffmpeg/Makefile \
player/plugin/video/h261/Makefile \
player/plugin/video/mpeg2dec/Makefile \
player/plugin/video/raw/Makefile \
player/plugin/video/xvid/Makefile \
player/src/Makefile \
player/src/codec/Makefile \
player/src/codec/aa/Makefile \
player/src/codec/mp3/Makefile \
player/src/codec/mpeg4/Makefile \
player/src/codec/wav/Makefile \
player/src/win_client/Makefile \
player/src/win_common/Makefile \
player/src/win_gui/Makefile \
player/src/win_gui/hlp/Makefile \
player/src/win_gui/res/Makefile \
util/Makefile \
util/h264/Makefile \
util/iptv/Makefile \
util/mpeg2/Makefile \
util/mpeg4vol/Makefile \
util/yuv/Makefile \
mpeg4ip-config
)

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/synote-mpeg4ip.git
git@api.gitlife.ru:oschina-mirror/synote-mpeg4ip.git
oschina-mirror
synote-mpeg4ip
synote-mpeg4ip
master