changeset 5598:efc798ab5822

libdv detection
author arpi
date Sat, 13 Apr 2002 16:51:01 +0000
parents e9ceb08cc007
children 3dde5e5eef90
files configure
diffstat 1 files changed, 27 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Apr 13 16:49:27 2002 +0000
+++ b/configure	Sat Apr 13 16:51:01 2002 +0000
@@ -136,6 +136,7 @@
   --disable-rtc          disable RTC (/dev/rtc) on Linux [autodetect]
   --disable-mp1e         disable libmp1e support
                          (use this option if it does not compile) [enable] 
+  --disable-libdv        disable libdv 0.9.5 support [autodetect]
   --disable-streaming    disable network streaming support
                          (support for: http/mms/rtp) [enable]
   --disable-vidix        disable VIDIX stuff [enable]
@@ -828,6 +829,7 @@
 _linux_devfs=no
 _i18n=no
 _sighandler=yes
+_libdv=auto
 
 for ac_option do
   case "$ac_option" in
@@ -884,6 +886,8 @@
   --disable-rtc)	_rtc=no	        ;;
   --enable-mp1e)	_mp1e=yes	;;
   --disable-mp1e)	_mp1e=no	;;
+  --enable-libdv)	_libdv=yes	;;
+  --disable-libdv)	_libdv=no	;;
   --enable-ossaudio)	_ossaudio=yes	;;
   --disable-ossaudio)	_ossaudio=no	;;
   --enable-mad)		_mad=yes	;;
@@ -2846,6 +2850,22 @@
   _nocodecmodules="libavcodec $_nocodecmodules"
 fi
 
+echocheck "libdv-0.9.5 (for mencoder)"
+if test "$_libdv" = auto ; then
+  _libdv=no
+  cat > $TMPC <<EOF
+#include <libdv/dv.h>
+int main(void) { dv_encoder_t* enc=dv_encoder_new(1,1,1); return 0; }
+EOF
+  cc_check -ldv -lm && _libdv=yes
+fi
+if test "$_libdv" = yes ; then
+  _def_libdv='#define HAVE_LIBDV095 1'
+  _ld_libdv="-ldv"
+else
+  _def_libdv='#undef HAVE_LIBDV095'
+fi
+echores "$_libdv"
 
 echocheck "zr"
 if test "$_zr" = yes ; then
@@ -2982,15 +3002,15 @@
 EOF
   if test "$_xvid" != no && test "$_xvidcore" && cc_check -lm "$_xvidcore" ; then
     _def_encore='#define HAVE_DIVX4ENCORE 1'
-    _ld_encore="-lm $_xvidcore"
+    _ld_encore="$_xvidcore"
     echores "XviD (with $_xvidcore)"
   elif test "$_xvid" != no && cc_check -lm -lxvidcore ; then
     _def_encore='#define HAVE_DIVX4ENCORE 1'
-    _ld_encore='-lm -lxvidcore'
+    _ld_encore='-lxvidcore'
     echores "XviD (with libxvidcore.so)"
   elif test "$_divx4linux" != no && cc_check -lm -ldivxencore ; then
     _def_encore='#define HAVE_DIVX4ENCORE 1'
-    _ld_encore='-lm -ldivxencore'
+    _ld_encore='-ldivxencore'
     echores "DivX4linux (with libdivxencore.so)"
   else
     _def_encore='#undef HAVE_DIVX4ENCORE'
@@ -3399,7 +3419,7 @@
 XVID = $_xvid
 DECORE_LIB = $_ld_decore
 MENCODER = $_mencoder
-ENCORE_LIB =  $_ld_encore $_ld_mp3lame
+ENCORE_LIB =  $_ld_encore $_ld_mp3lame $_ld_libdv
 DIRECTFB_LIB = $_ld_directfb
 NEW_INPUT_LIB = $_ld_new_input
 
@@ -3476,6 +3496,9 @@
 /* Define if you are using DivX5Linux Decore library */
 $_def_divx5
 
+/* Define to include support for libdv-0.9.5 */
+$_def_libdv
+
 /* If build mencoder */
 $_mencoder_flag