configure.in
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:10k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT()
  3. AM_CONFIG_HEADER(config.h)
  4. AC_CONFIG_AUX_DIR(config)
  5. dnl Detect the canonical host and target build environment
  6. AC_CANONICAL_HOST
  7. AC_CANONICAL_TARGET
  8. AM_INIT_AUTOMAKE(mpeg4ip, 0.9.5)
  9. AC_CONFIG_SUBDIRS(lib/rtp)
  10. dnl Checks for programs.
  11. AC_CHECK_FILE(lib/SDL/sdl-config,,
  12.       AC_MSG_ERROR([Configure for SDL needs to run first - either run bootstrap or run lib/SDL/configure]))
  13. AC_LIBTOOL_DLOPEN
  14. AM_PROG_LIBTOOL
  15. AC_PROG_MAKE_SET
  16. AC_PROG_CC
  17. OBJC="???"
  18. AC_SUBST(OBJC)
  19. AC_PROG_CXX(c++)
  20. AC_C_INLINE
  21. AC_C_CONST
  22. AC_PROG_INSTALL
  23. AC_PATH_XTRA
  24. AC_C_BIGENDIAN
  25. AS=gcc
  26. AC_SUBST(AS)
  27. ASFLAGS="$ASFLAGS"
  28. AC_SUBST(ASFLAGS)
  29. CCAS=gcc
  30. AC_SUBST(CCAS)
  31. CCASFLAGS="$ASFLAGS"
  32. AC_SUBST(CCASFLAGS)
  33. CFLAGS="$CFLAGS -DMPEG4IP"
  34. CXXFLAGS="$CXXFLAGS -DMPEG4IP"
  35. dnl Checks for libraries.
  36. AC_CHECK_LIB(sndfile, sf_open_read)
  37. AC_CHECK_LIB(sndfile, sf_open_read,
  38.      [AM_CONDITIONAL(HAVE_LIBSNDFILE, true)],
  39.      [AM_CONDITIONAL(HAVE_LIBSNDFILE, false)])
  40. dnl Checks for header files.
  41. AC_HEADER_STDC
  42. AC_CHECK_HEADERS(fcntl.h unistd.h stdint.h inttypes.h getopt.h byteswap.h)
  43. AC_CHECK_HEADERS(linux/cdrom.h sys/dvdio.h glib.h)
  44. dnl check for Sun, BSD/OS libraries
  45. AC_CHECK_LIB(socket, socket)
  46. AC_CHECK_LIB(gnugetopt, getopt_long)
  47. dnl Checks for typedefs, structures, and compiler characteristics.
  48. dnl Checks for library functions.
  49. AC_CHECK_FUNCS(strerror strcasestr poll getopt getopt_long getrusage socketpair strsep inet_ntoa)
  50. dnl MY_CHECK_TYPEDEF_FROM_INCLUDE(typedef, include files, define)
  51. dnl checks if typedef is in include files.  add define in acconfig.h
  52. AC_DEFUN(MY_CHECK_TYPEDEF_FROM_INCLUDE,
  53. [
  54.    AC_MSG_CHECKING([for $1])
  55.    AC_TRY_COMPILE([$2],
  56.           [$1;],
  57.                   mpeg4ip_ok=yes, mpeg4ip_ok=no)
  58.    if test $mpeg4ip_ok = yes; then
  59.       AC_DEFINE($3)
  60.       AC_MSG_RESULT([yes])
  61.    else
  62.       AC_MSG_RESULT([no])
  63.    fi
  64. ])
  65. MY_CHECK_TYPEDEF_FROM_INCLUDE([in_port_t temp], 
  66. [#include <sys/types.h>
  67.  #include <netinet/in.h>], [HAVE_IN_PORT_T])
  68. MY_CHECK_TYPEDEF_FROM_INCLUDE([socklen_t temp], 
  69. [#include <sys/types.h>
  70.  #include <sys/socket.h>], HAVE_SOCKLEN_T)
  71. MY_CHECK_TYPEDEF_FROM_INCLUDE([fpos_t foo; foo.__pos = 0;],
  72. [#include <stdio.h>],
  73. [HAVE_FPOS_T_POS])
  74. MY_CHECK_TYPEDEF_FROM_INCLUDE([struct addrinfo foo;],
  75. [#include <netdb.h>],
  76. [HAVE_ST_ADDRINFO])
  77. dnl Allow server build to be disabled
  78. AC_ARG_ENABLE(server, 
  79. [  --enable-server        enable server build],
  80. [ case "${enableval}" in
  81.   yes) server=true ;;
  82.   no)  server=false ;;
  83.   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-server) ;;
  84. esac],
  85. [server=true])
  86. AM_CONDITIONAL(SERVER, test $server = true)
  87. dnl Allow player build to be disabled
  88. AC_ARG_ENABLE(player, 
  89. [  --enable-player        enable player build],
  90. [ case "${enableval}" in
  91.   yes) player=true ;;
  92.   no)  player=false ;;
  93.   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-player) ;;
  94. esac],
  95. [player=true])
  96. AM_CONDITIONAL(PLAYER, test $player = true)
  97. AC_ARG_ENABLE(mp4live,
  98. [  --enable-mp4live       enable mp4live build on Linux [default=yes]],
  99.                   , enable_mp4live=yes)
  100.     if test x$enable_mp4live = xyes; then
  101. case "$target" in
  102. *-*-linux*)
  103. AM_CONDITIONAL(MP4LIVE, true)
  104. ;;
  105. *)
  106. AM_CONDITIONAL(MP4LIVE, false)
  107. ;;
  108. esac
  109. else
  110. AM_CONDITIONAL(MP4LIVE, false)
  111.     fi
  112. AC_ARG_ENABLE(ipv6,
  113. [   --enable-ipv6       enable IPv6],
  114.               enable_ipv6=yes)
  115.     if test x$enable_ipv6 = xyes; then
  116.        AC_DEFINE(HAVE_IPv6)
  117.     fi
  118. dnl ### Checking for the existence of files
  119. dnl MY_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  120. AC_DEFUN(MY_CHECK_FILE,
  121. [
  122. dnl Do the transliteration at runtime so arg 1 can be a shell variable.
  123. ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
  124. AC_MSG_CHECKING([for $1])
  125. AC_CACHE_VAL(ac_cv_file_$ac_safe,
  126.   if test -r $1; then
  127.     eval "ac_cv_file_$ac_safe=yes"
  128.   else
  129.     eval "ac_cv_file_$ac_safe=no"
  130.   fi
  131. )dnl
  132. if eval "test "`echo '$ac_cv_file_'$ac_safe`" = yes"; then
  133.   AC_MSG_RESULT(yes)
  134.   ifelse([$2], , :, [$2])
  135. else
  136.   AC_MSG_RESULT(no)
  137. ifelse([$3], , , [$3])
  138. fi
  139. ])
  140. dnl read out glib and gtk paths and flags.  Will need to dummy this
  141. dnl out for a glibless system
  142. AM_PATH_GLIB()
  143. if test "$no_glib" != yes; then
  144. AM_PATH_GTK()
  145. if test "$no_gtk" = yes; then
  146.    no_glib_gtk=yes
  147. else
  148.    no_glib_gtk=no
  149. fi
  150. else 
  151.    no_glib_gtk=yes
  152. fi
  153. AM_CONDITIONAL(NO_GLIB_GTK, test x$no_glib_gtk = xyes)
  154. AC_ARG_ENABLE(mmx,
  155.               [  --enable-mmx           use MMX assembly on x86 [default=yes]],
  156.               , 
  157.       enable_mmx=yes)
  158. if test x$enable_mmx = xyes; then
  159.    AC_CHECK_PROG(USENASM, nasm, true, false)
  160.    if test x$USENASM = xtrue; then
  161. AC_MSG_CHECKING(nasm version...)
  162. BILLSNASM_arg=`nasm -r | tr '.' ' '`
  163.         BILLSNASM_ret=`util/testnasm.sh $BILLSNASM_arg`
  164. if test x$BILLSNASM_ret = x"yes"; then
  165.    USENASM=true
  166.    AC_MSG_RESULT(valid)
  167.         else
  168.            USENASM=false
  169.            AC_MSG_RESULT(invalid)
  170.    AC_MSG_WARN(Installed version of NASM is incorrect; please update to 0.98.19 or greater)
  171.         fi
  172.    fi
  173.    if test x$USENASM = xtrue; then
  174.         AC_PATH_PROG(NASM, nasm)
  175.         AM_CONDITIONAL(USE_MMX, true)
  176. case $target in
  177. i?86*)
  178. CFLAGS="$CFLAGS -DUSE_MMX"
  179. CXXFLAGS="$CXXFLAGS -DUSE_MMX"
  180. case $ARCH in
  181. win32)
  182.   NASMFLAGS="-f win32"
  183.   ;;
  184. *)
  185.   NASMFLAGS="-f elf"
  186.   ;;
  187. esac
  188. AC_SUBST(NASMFLAGS)
  189. AM_CONDITIONAL(USE_MMX, true)
  190. arch_x86=:
  191. AC_DEFINE(ARCH_X86)
  192. ;;
  193. *)
  194. AM_CONDITIONAL(USE_MMX, false)
  195. ;;
  196. esac
  197.     else
  198.         AM_CONDITIONAL(USE_MMX, false)
  199.     fi
  200. else
  201.     AM_CONDITIONAL(USE_MMX, false)
  202. fi
  203. dnl Get SDL cflags and SDL libraries to include
  204. SDL_LIBS="`lib/SDL/sdl-config --libs | sed 's,-L.* -lSDL,$(top_builddir)/lib/SDL/src/libSDL.la,'`"
  205. AC_SUBST(SDL_LIBS)
  206. dnl
  207. BILLS_CWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Wno-unknown-pragmas"
  208. BILLS_CPPWARNINGS="-Wall -Werror -Wmissing-prototypes -Wmissing-declarations -Wno-char-subscripts -Woverloaded-virtual -Wno-unknown-pragmas -Wno-deprecated"
  209. AC_SUBST(BILLS_CWARNINGS)
  210. AC_SUBST(BILLS_CPPWARNINGS)
  211. PLAYER_PLUGIN_DIR=$libdir/mp4player_plugin
  212. AC_SUBST(PLAYER_PLUGIN_DIR)
  213. dnl Now output the Makefile's
  214. AC_OUTPUT( 
  215. Makefile 
  216. common/video/mpeg4/Makefile 
  217. common/video/mpeg4/app/Makefile 
  218. common/video/mpeg4/app/convertpar/Makefile 
  219. common/video/mpeg4/app/decoder/Makefile 
  220. common/video/mpeg4/app/encoder/Makefile 
  221. common/video/mpeg4/sys/Makefile 
  222. common/video/mpeg4/sys/decoder/Makefile 
  223. common/video/mpeg4/sys/encoder/Makefile 
  224. common/video/mpeg4/tools/Makefile 
  225. common/video/mpeg4/tools/entropy/Makefile 
  226. common/video/mpeg4/type/Makefile 
  227. common/video/mpeg4/vtc/Makefile 
  228. common/video/mpeg4/vtc/include/Makefile 
  229. common/video/mpeg4/vtc/main/Makefile 
  230. common/video/mpeg4/vtc/pezw/Makefile 
  231. common/video/mpeg4/vtc/wavelet/Makefile 
  232. common/video/mpeg4/vtc/zte/Makefile 
  233. common/video/mpeg4/vtc/ztq/Makefile 
  234. doc/Makefile 
  235. doc/encoding/Makefile 
  236. doc/ietf/Makefile 
  237. doc/mcast/Makefile 
  238. doc/programs/Makefile 
  239. doc/mp4v2/Makefile 
  240. include/Makefile 
  241. lib/Makefile 
  242. lib/avi/Makefile 
  243. lib/bitstream/Makefile 
  244. lib/config_file/Makefile 
  245. lib/fposrec/Makefile 
  246. lib/gnu/Makefile 
  247. lib/mp4/Makefile 
  248. lib/mp4/doc/Makefile 
  249. lib/mp4v2/Makefile 
  250. lib/mp4v2/test/Makefile 
  251. lib/mp4v2/util/Makefile 
  252. lib/mp4av/Makefile 
  253. lib/mpeg2t/Makefile 
  254. lib/msg_queue/Makefile 
  255. lib/sdp/Makefile 
  256. lib/xvid/Makefile 
  257. lib/xvid/dct/Makefile 
  258. lib/xvid/dct/x86_asm/Makefile 
  259. lib/xvid/bitstream/Makefile 
  260. lib/xvid/bitstream/x86_asm/Makefile 
  261. lib/xvid/image/Makefile 
  262. lib/xvid/image/x86_asm/Makefile 
  263. lib/xvid/motion/Makefile 
  264. lib/xvid/motion/x86_asm/Makefile 
  265. lib/xvid/prediction/Makefile 
  266. lib/xvid/quant/Makefile 
  267. lib/xvid/quant/x86_asm/Makefile 
  268. lib/xvid/utils/Makefile 
  269. lib/xvid/utils/x86_asm/Makefile 
  270. mpeg4ip.pbproj/Makefile 
  271. common/Makefile 
  272. common/video/Makefile 
  273. common/video/libmpeg32/Makefile 
  274. common/video/libmpeg32/video/Makefile 
  275. server/Makefile 
  276. server/audio/Makefile 
  277. server/audio/faac/Makefile 
  278. server/video/Makefile 
  279. server/video/H26L/Makefile 
  280. server/mp4live/Makefile 
  281. server/mp4live/gui/Makefile 
  282. server/mp4creator/Makefile 
  283. server/util/Makefile 
  284. server/util/mp4encode/Makefile 
  285. server/util/avi2raw/Makefile 
  286. server/util/avidump/Makefile 
  287. server/util/rgb2yuv/Makefile 
  288. server/util/lboxcrop/Makefile 
  289. server/util/xvidenc/Makefile 
  290. player/Makefile 
  291. player/lib/Makefile 
  292. player/lib/libhttp/Makefile 
  293. player/lib/rtsp/Makefile 
  294. player/lib/audio/Makefile 
  295. player/lib/audio/celp/Makefile 
  296. player/lib/audio/celp/BS/Makefile 
  297. player/lib/audio/celp/dec/Makefile 
  298. player/lib/audio/celp/include/Makefile 
  299. player/lib/audio/faad/Makefile 
  300. player/lib/audio/mp3/Makefile 
  301. player/lib/audio/mp3util/Makefile 
  302. player/lib/mp4util/Makefile 
  303. player/plugin/Makefile 
  304. player/plugin/audio/Makefile 
  305. player/plugin/audio/celp/Makefile 
  306. player/plugin/audio/raw/Makefile 
  307. player/plugin/video/Makefile 
  308. player/plugin/video/mpeg3/Makefile 
  309. player/plugin/video/raw/Makefile 
  310. player/plugin/video/xvid/Makefile 
  311. player/src/Makefile 
  312. player/src/codec/Makefile 
  313. player/src/codec/aa/Makefile 
  314. player/src/codec/mp3/Makefile 
  315. player/src/codec/mpeg4/Makefile 
  316. player/src/codec/wav/Makefile 
  317. player/src/osx/Makefile 
  318. player/src/osx/English.lproj/Makefile 
  319. player/src/osx/SDLMain.nib/Makefile 
  320. player/src/win_client/Makefile 
  321. player/src/win_common/Makefile 
  322. player/src/win_gui/Makefile 
  323. player/src/win_gui/hlp/Makefile 
  324. player/src/win_gui/res/Makefile 
  325. util/Makefile 
  326. util/yuv/Makefile 
  327. )