[Sumover-dev] [svn commit] r3929 - in vic/branches/mpeg4: codec

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Tue Nov 14 07:55:44 GMT 2006


Author: barz
Date: Tue Nov 14 07:54:38 2006
New Revision: 3929

Modified:
   vic/branches/mpeg4/Makefile.in
   vic/branches/mpeg4/codec/ffmpeg_codec.cpp
   vic/branches/mpeg4/config_arch.h
   vic/branches/mpeg4/configure
   vic/branches/mpeg4/configure.in

Log:
add ffmpeg,x264 checkout

Modified: vic/branches/mpeg4/Makefile.in
==============================================================================
--- vic/branches/mpeg4/Makefile.in	(original)
+++ vic/branches/mpeg4/Makefile.in	Tue Nov 14 07:54:38 2006
@@ -88,11 +88,10 @@
 SRC_GRABBER = $(OBJ_GRABBER:.o=.cpp) 
 OBJ_XIL = @V_OBJ_XIL@
 OBJ_CRYPT = @V_OBJ_CRYPT@
-CODEC_LIB = codec/tmndec/libh263.a codec/tmn-x/libh263coder.a
+CODEC_LIB = @V_CODEC_LIB@ codec/tmndec/libh263.a codec/tmn-x/libh263coder.a
 
 LIB = $(LIB_GRABBER) @V_LIB_TK@ @V_LIB_TCL@ @V_LIB_X11@ @V_LIB@ $(CODEC_LIB) $(VIDEO_LIB) \
-	../common/src/libuclmmbase.a -lm -lz -lcrypto -lpthread  \
-	@V_LIB_FFMPEG@ @V_LIB_X264@
+	../common/src/libuclmmbase.a -lm -lz -lcrypto -lpthread @V_LIB_FFMPEG@ @V_LIB_X264@ 
 
 
 INCLUDE = $(INCLUDE_MISC) $(INCLUDE_GRABBER) $(INCLUDE_TK) $(INCLUDE_TCL) \
@@ -430,6 +429,18 @@
 	    "chmod 444 $$name.tar.gz" ; \
 	     chmod 444 $$name.tar.gz
 
+ffmpeg/lib/libavcodec.a:
+	(cd ffmpeg/libavcodec; make; make install )
+
+ffmpeg/lib/libavutil.a:
+	(cd ffmpeg/libavutil; make; make install )
+
+ffmpeg/lib/libswscale.a:
+	(cd ffmpeg/libswscale; make; make install )
+
+x264/lib/libx264.a:
+	(cd x264; make; make install )
+
 codec/tmn-x/libh263coder.a:
 	(cd codec/tmn-x; $(MAKE) CC=$(CC) CCOPT="$(CCOPT)" )
 

Modified: vic/branches/mpeg4/codec/ffmpeg_codec.cpp
==============================================================================
--- vic/branches/mpeg4/codec/ffmpeg_codec.cpp	(original)
+++ vic/branches/mpeg4/codec/ffmpeg_codec.cpp	Tue Nov 14 07:54:38 2006
@@ -90,7 +90,7 @@
     // emit one intra frame every ten frames 
     c->gop_size = iframe_gap;
     //c->flags |= CODEC_FLAG_EMU_EDGE;
-    c->flags |= CODEC_FLAG_LOW_DELAY;
+    //c->flags |= CODEC_FLAG_LOW_DELAY;
     //c->flags |= CODEC_FLAG_PART;
     //c->flags |= CODEC_FLAG_ALT_SCAN;       
     //c->flags |= CODEC_FLAG_PSNR;

Modified: vic/branches/mpeg4/config_arch.h
==============================================================================
--- vic/branches/mpeg4/config_arch.h	(original)
+++ vic/branches/mpeg4/config_arch.h	Tue Nov 14 07:54:38 2006
@@ -5,7 +5,6 @@
 #ifndef __POSTPROC_CONFIG_H__
 #define __POSTPROC_CONFIG_H__ 1
 
-// #define __CPU__ 586
 // #define ARCH_X86 1
 
 /* Runtime CPU detection */
@@ -27,7 +26,7 @@
 #define USE_FASTMEMCPY 1
 
 /* Use libswscale */
-// #define HAVE_SWSCALE
+#define HAVE_SWSCALE
 
 /* attribute(used) as needed by some compilers */
 #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)

Modified: vic/branches/mpeg4/configure
==============================================================================
--- vic/branches/mpeg4/configure	(original)
+++ vic/branches/mpeg4/configure	Tue Nov 14 07:54:38 2006
@@ -30,6 +30,10 @@
 ac_help="$ac_help
 --with-qcam=dir     specify directory with qcam.h for Connectix QuickCam device driver"
 ac_help="$ac_help
+--disable-ffmpeg-co	Enable or disable ffmpeg svn checkout"
+ac_help="$ac_help
+--disable-x264-co      Enable or disable x264 svn checkout"
+ac_help="$ac_help
 --with-ffmpeginc=dir     specify the prefix directory of ffmpeg header"
 ac_help="$ac_help
 --with-ffmpeglib=dir     specify the directory of ffmpeg library"
@@ -38,9 +42,9 @@
 ac_help="$ac_help
 --with-x264lib=dir     specify the directory of x264 library"
 ac_help="$ac_help
---enable-cpudetect     Enable or disable runtime cpu detection"
+--disable-cpudetect     Enable or disable runtime cpu detection"
 ac_help="$ac_help
---enable-h261as         Enable or disable the h261as codec"
+--disable-h261as         Enable or disable the h261as codec"
 ac_help="$ac_help
 --enable-dvdecode       Enable or disable dv decoding"
 ac_help="$ac_help
@@ -563,9 +567,10 @@
 V_PROG="vic"
 V_ALL="$V_PROG"
 V_SHM="-DUSE_SHM"
-
+V_PATH=`pwd`
 V_OBJ=""
 V_LIB=""
+V_CODEC_LIB=""
 
 #ARCH DETECTION
 arch=`uname -m`
@@ -655,7 +660,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:659: checking host system type" >&5
+echo "configure:664: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -676,7 +681,7 @@
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:680: checking target system type" >&5
+echo "configure:685: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -694,7 +699,7 @@
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:698: checking build system type" >&5
+echo "configure:703: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -720,7 +725,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:724: checking for $ac_word" >&5
+echo "configure:729: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -750,7 +755,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:754: checking for $ac_word" >&5
+echo "configure:759: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -801,7 +806,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:805: checking for $ac_word" >&5
+echo "configure:810: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -833,7 +838,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:842: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -844,12 +849,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 848 "configure"
+#line 853 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -875,12 +880,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:879: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:884: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:884: checking whether we are using GNU C" >&5
+echo "configure:889: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -889,7 +894,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -908,7 +913,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:912: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:917: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -944,7 +949,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:948: checking for $ac_word" >&5
+echo "configure:953: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -976,7 +981,7 @@
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:980: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:985: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -987,12 +992,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 991 "configure"
+#line 996 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1018,12 +1023,12 @@
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1022: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1027: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1027: checking whether we are using GNU C++" >&5
+echo "configure:1032: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1032,7 +1037,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1051,7 +1056,7 @@
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1055: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1060: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1083,7 +1088,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1087: checking how to run the C preprocessor" >&5
+echo "configure:1092: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1098,13 +1103,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1102 "configure"
+#line 1107 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1115,13 +1120,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1124 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1132,13 +1137,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1136 "configure"
+#line 1141 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1163,12 +1168,12 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1167: checking for ANSI C header files" >&5
+echo "configure:1172: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1172 "configure"
+#line 1177 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1176,7 +1181,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1193,7 +1198,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1197 "configure"
+#line 1202 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1211,7 +1216,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1215 "configure"
+#line 1220 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1232,7 +1237,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1236 "configure"
+#line 1241 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1243,7 +1248,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1270,17 +1275,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1274: checking for $ac_hdr" >&5
+echo "configure:1279: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1279 "configure"
+#line 1284 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1318,7 +1323,7 @@
 V_SIGRET="void"
 
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:1322: checking for main in -lXbsd" >&5
+echo "configure:1327: checking for main in -lXbsd" >&5
 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1326,14 +1331,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXbsd  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1330 "configure"
+#line 1335 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1354,7 +1359,7 @@
 fi
 
 echo $ac_n "checking for poll in -lsocket""... $ac_c" 1>&6
-echo "configure:1358: checking for poll in -lsocket" >&5
+echo "configure:1363: checking for poll in -lsocket" >&5
 ac_lib_var=`echo socket'_'poll | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1362,7 +1367,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1366 "configure"
+#line 1371 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1373,7 +1378,7 @@
 poll()
 ; return 0; }
 EOF
-if { (eval echo configure:1377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1397,7 +1402,7 @@
 # nsl lib seems to cause problems on IRIX
 if test `echo "$target_os" | sed 's/\..*//'` != irix6 ; then
 	echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1401: checking for gethostbyname in -lnsl" >&5
+echo "configure:1406: checking for gethostbyname in -lnsl" >&5
 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1405,7 +1410,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1409 "configure"
+#line 1414 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1416,7 +1421,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:1420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1538,12 +1543,12 @@
 echo "checking for X11 header files"
 if test "$x_includes" = NONE ; then
 	cat > conftest.$ac_ext <<EOF
-#line 1542 "configure"
+#line 1547 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1577,7 +1582,7 @@
 echo "checking for X11 library archive"
 if test "$x_libraries" = NONE ; then
 	echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:1581: checking for XOpenDisplay in -lX11" >&5
+echo "configure:1586: checking for XOpenDisplay in -lX11" >&5
 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1585,7 +1590,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lX11  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1589 "configure"
+#line 1594 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1596,7 +1601,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1636,7 +1641,7 @@
 if test -n "$V_SHM" ; then
 	if test -z "$x_libraries" ; then
 		echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6
-echo "configure:1640: checking for XShmAttach in -lXext" >&5
+echo "configure:1645: checking for XShmAttach in -lXext" >&5
 ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1644,7 +1649,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXext -lX11 $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1648 "configure"
+#line 1653 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1655,7 +1660,7 @@
 XShmAttach()
 ; return 0; }
 EOF
-if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1782,12 +1787,12 @@
 else
 	echo "Not using UCL tcl - You're on your own!"
 	cat > conftest.$ac_ext <<EOF
-#line 1786 "configure"
+#line 1791 "configure"
 #include "confdefs.h"
 #include <tcl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1826,7 +1831,7 @@
 		fi
 	fi
 	echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6
-echo "configure:1830: checking for main in -ltcl8.0" >&5
+echo "configure:1835: checking for main in -ltcl8.0" >&5
 ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1834,14 +1839,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltcl8.0  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1838 "configure"
+#line 1843 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2007,12 +2012,12 @@
 else
 	echo "Not using UCL tk - You're on your own!"
 	cat > conftest.$ac_ext <<EOF
-#line 2011 "configure"
+#line 2016 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2053,7 +2058,7 @@
 		fi
 	fi
 	echo $ac_n "checking for main in -ltk8.0""... $ac_c" 1>&6
-echo "configure:2057: checking for main in -ltk8.0" >&5
+echo "configure:2062: checking for main in -ltk8.0" >&5
 ac_lib_var=`echo tk8.0'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2061,14 +2066,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ltk8.0  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+#line 2070 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2172,8 +2177,6 @@
 V_OBJ_GRABBER=""
 V_LIB_XIL=""
 V_OBJ_XIL=""
-V_INCLUDE_FFMPEG=""
-V_INCLUDE_X264=""
 V_LIB_FFMPEG=""
 V_LIB_X264=""
 
@@ -2208,43 +2211,88 @@
 	exit 1
 fi
 
+# Check whether --enable-ffmpeg-co or --disable-ffmpeg-co was given.
+if test "${enable_ffmpeg_co+set}" = set; then
+  enableval="$enable_ffmpeg_co"
+  ffmpegco="no"
+else
+  ffmpegco="yes"
+fi
+
+if test "$ffmpegco" = "yes" ; then
+   echo "checking out ffmpeg from  svn://svn.mplayerhq.hu/ffmpeg/trunk..."
+   svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
+   echo "Configuring ffmpeg..."
+   cd ffmpeg; ./configure --prefix=$V_PATH/ffmpeg --enable-gpl --enable-swscaler; cd ..
+   V_INCLUDE="$V_INCLUDE -Iffmpeg/include"
+   V_CODEC_LIB="$V_CODEC_LIB ffmpeg/lib/libavcodec.a ffmpeg/lib/libavutil.a ffmpeg/lib/libswscale.a"
+fi
+
+# Check whether --enable-x264-co or --disable-x264-co was given.
+if test "${enable_x264_co+set}" = set; then
+  enableval="$enable_x264_co"
+  x264co="no"
+else
+  x264co="yes"
+fi
+
+if test "$x264co" = "yes" ; then
+   echo "checking out x264 from  svn co svn://svn.videolan.org/x264/trunk..."
+   svn checkout svn://svn.videolan.org/x264/trunk x264
+   echo "Configuring x264..."
+   cd x264; ./configure --prefix=$V_PATH/x264; cd ..
+   V_INCLUDE="$V_INCLUDE -Ix264/include"
+   V_CODEC_LIB="$V_CODEC_LIB x264/lib/libx264.a"
+fi
+
 # Check whether --with-ffmpeginc or --without-ffmpeginc was given.
 if test "${with_ffmpeginc+set}" = set; then
   withval="$with_ffmpeginc"
-  V_INCLUDE_FFMPEG=$withval
+  ffmpeginc=$withval
 else
-  V_INCLUDE_FFMPEG=""
+  ffmpeginc=""
 fi
 
-if test "$V_INCLUDE_FFMPEG" != "" ; then
-   if test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h around"
-        exit 1
-   elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avutil.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avutil.h around"
-        exit 1
-   elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/swscale.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/swscale.h around"
-        exit 1
-   fi
-   echo "checking for FFmpeg headers...yes"
-   V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_FFMPEG"
-
+# Check whether --with-ffmpeglib or --without-ffmpeglib was given.
+if test "${with_ffmpeglib+set}" = set; then
+  withval="$with_ffmpeglib"
+  ffmpeglib=$withval
 else
+  ffmpeglib=""
+fi
+
+
+if test "$ffmpegco" != "yes"; then
 
-   ac_safe=`echo "ffmpeg/avcodec.h" | sed 'y%./+-%__p_%'`
+	if test "$ffmpeginc" != "" ; then
+	   if test ! -r $ffmpeginc/ffmpeg/avcodec.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/avcodec.h around"
+	        exit 1
+	   elif test ! -r $ffmpeginc/ffmpeg/avutil.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/avutil.h around"
+	        exit 1
+	   elif test ! -r $ffmpeginc/ffmpeg/swscale.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/swscale.h around"
+	        exit 1
+	   fi
+	   echo "checking for FFmpeg headers...yes"
+	   V_INCLUDE="$V_INCLUDE -I$ffmpeginc"
+	
+	else
+
+	   ac_safe=`echo "ffmpeg/avcodec.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ffmpeg/avcodec.h""... $ac_c" 1>&6
-echo "configure:2238: checking for ffmpeg/avcodec.h" >&5
+echo "configure:2286: checking for ffmpeg/avcodec.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2243 "configure"
+#line 2291 "configure"
 #include "confdefs.h"
 #include <ffmpeg/avcodec.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2264,24 +2312,24 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have avcodec.h around."
-        exit -1
-   
+        	echo "Error! you need to have avcodec.h around."
+	        exit -1
+	   
 fi
 
-   ac_safe=`echo "ffmpeg/avutil.h" | sed 'y%./+-%__p_%'`
+	   ac_safe=`echo "ffmpeg/avutil.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ffmpeg/avutil.h""... $ac_c" 1>&6
-echo "configure:2275: checking for ffmpeg/avutil.h" >&5
+echo "configure:2323: checking for ffmpeg/avutil.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2280 "configure"
+#line 2328 "configure"
 #include "confdefs.h"
 #include <ffmpeg/avutil.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2301,24 +2349,24 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have avutil.h around."
-        exit -1
-   
+	        echo "Error! you need to have avutil.h around."
+	        exit -1
+	   
 fi
 
-   ac_safe=`echo "ffmpeg/swscale.h" | sed 'y%./+-%__p_%'`
+	   ac_safe=`echo "ffmpeg/swscale.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ffmpeg/swscale.h""... $ac_c" 1>&6
-echo "configure:2312: checking for ffmpeg/swscale.h" >&5
+echo "configure:2360: checking for ffmpeg/swscale.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2317 "configure"
+#line 2365 "configure"
 #include "confdefs.h"
 #include <ffmpeg/swscale.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2338,33 +2386,25 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have swscale.h around."
-        exit -1
-   
+	        echo "Error! you need to have swscale.h around."
+	        exit -1
+	   
 fi
 
-fi
-
-# Check whether --with-ffmpeglib or --without-ffmpeglib was given.
-if test "${with_ffmpeglib+set}" = set; then
-  withval="$with_ffmpeglib"
-  V_LIB_FFMPEG=$withval
-else
-  V_LIB_FFMPEG=""
-fi
+	fi
 
-if test "$V_LIB_FFMPEG" != "" ; then
-   if test ! -r $V_LIB_FFMPEG/libavcodec.a ; then
-	echo "Error! you need to have $V_LIB_FFMPEG/libavcodec.a around"
-   elif test ! -r $V_LIB_FFMPEG/libavutil.a ; then
-        echo "Error! you need to have $V_LIB_FFMPEG/libavutil.a around"
-   elif test ! -r $V_LIB_FFMPEG/libswscale.a ; then
-        echo "Error! you need to have $V_LIB_FFMPEG/libswscale.a around"
-   fi
-   V_LIB_FFMPEG="-L$V_LIB_FFMPEG -lavcodec -lavutil -lswscale"
-else
-   echo $ac_n "checking for main in -lavcodec""... $ac_c" 1>&6
-echo "configure:2368: checking for main in -lavcodec" >&5
+	if test "$ffmpeglib" != "" ; then
+	   if test ! -r $ffmpeglib/libavcodec.a ; then
+		echo "Error! you need to have $ffmpeglib/libavcodec.a around"
+	   elif test ! -r $ffmpeglib/libavutil.a ; then
+	        echo "Error! you need to have $ffmpeglib/libavutil.a around"
+	   elif test ! -r $ffmpeglib/libswscale.a ; then
+	        echo "Error! you need to have $ffmpeglib/libswscale.a around"
+	   fi
+	   V_LIB_FFMPEG="-L$ffmpeglib -lavcodec -lavutil -lswscale"
+	else
+	   echo $ac_n "checking for main in -lavcodec""... $ac_c" 1>&6
+echo "configure:2408: checking for main in -lavcodec" >&5
 ac_lib_var=`echo avcodec'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2372,14 +2412,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lavcodec  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2376 "configure"
+#line 2416 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2405,13 +2445,13 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have libavcodec around."
-        exit -1
-   
+	        echo "Error! you need to have libavcodec around."
+	        exit -1
+	   
 fi
 
-   echo $ac_n "checking for main in -lavutil""... $ac_c" 1>&6
-echo "configure:2415: checking for main in -lavutil" >&5
+	   echo $ac_n "checking for main in -lavutil""... $ac_c" 1>&6
+echo "configure:2455: checking for main in -lavutil" >&5
 ac_lib_var=`echo avutil'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2419,14 +2459,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lavutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+#line 2463 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2452,13 +2492,13 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have libavutil around."
-        exit -1
-   
+	        echo "Error! you need to have libavutil around."
+	        exit -1
+	   
 fi
 
-   echo $ac_n "checking for main in -lswscale""... $ac_c" 1>&6
-echo "configure:2462: checking for main in -lswscale" >&5
+	   echo $ac_n "checking for main in -lswscale""... $ac_c" 1>&6
+echo "configure:2502: checking for main in -lswscale" >&5
 ac_lib_var=`echo swscale'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2466,14 +2506,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lswscale  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2470 "configure"
+#line 2510 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2499,52 +2539,54 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have libswscale around."
-        exit -1
-   
+	        echo "Error! you need to have libswscale around."
+	        exit -1
+	   
 fi
 
-   V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
-fi
+	   V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
+	fi
+fi 
 
 # Check whether --with-x264inc or --without-x264inc was given.
 if test "${with_x264inc+set}" = set; then
   withval="$with_x264inc"
-  V_INCLUDE_X264=$withval
-else
-  V_INCLUDE_X264=""
-fi
-
-if test "$V_INCLUDE_X264" != "" ; then
-   if test ! -r $V_INCLUDE_X264/x264.h ; then
-	echo "Error! you need to have $V_INCLUDE_X264/x264.h around."
-	exit 1
-   fi
-   V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_X264"
-elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
-        echo "Error! you need to have x264.h around."
-        exit 1
+  x264inc=$withval
 else
-   echo "checking for x264.h...yes"
+  x264inc=""
 fi
 
 # Check whether --with-x264lib or --without-x264lib was given.
 if test "${with_x264lib+set}" = set; then
   withval="$with_x264lib"
-  V_LIB_X264=$withval
+  x264lib=$withval
 else
-  V_LIB_X264=""
+  x264lib=""
 fi
 
-if test "$V_LIB_X264" != "" ; then
-   if test ! -r $V_LIB_X264/libx264.a ; then
-        echo "Error! you need to have $V_LIB_X264/libx264.a around"
-	exit 1
-   fi
-   V_LIB_X264="-L$V_LIB_X264 -lx264"
-else
-   echo $ac_n "checking for main in -lx264""... $ac_c" 1>&6
-echo "configure:2548: checking for main in -lx264" >&5
+if test "x264co" != "yes" ; then
+	if test "$x264inc" != "" ; then
+	   if test ! -r $x264inc/x264.h ; then
+	        echo "Error! you need to have $x264inc/x264.h around."
+	        exit 1
+	   fi
+	   V_INCLUDE="$V_INCLUDE -I$x264inc"
+	elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
+	        echo "Error! you need to have x264.h around."
+	        exit 1
+	else
+	   echo "checking for x264.h...yes"
+	fi
+
+	if test "$x264lib" != "" ; then
+	   if test ! -r $x264lib/libx264.a ; then
+	        echo "Error! you need to have $x264lib/libx264.a around"
+		exit 1
+	   fi
+	   V_LIB_X264="-L$x264lib -lx264"
+	else
+	   echo $ac_n "checking for main in -lx264""... $ac_c" 1>&6
+echo "configure:2590: checking for main in -lx264" >&5
 ac_lib_var=`echo x264'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2552,14 +2594,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lx264  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2556 "configure"
+#line 2598 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2585,26 +2627,27 @@
 else
   echo "$ac_t""no" 1>&6
 
-        echo "Error! you need to have libx264 around."
-        exit -1
-   
+	        echo "Error! you need to have libx264 around."
+	        exit -1
+	   
 fi
 
-   V_LIB_X264="-lx264"
+	   V_LIB_X264="-lx264"
+	fi
 fi
 
-
 V_CPUDETECT=""
 # Check whether --enable-cpudetect or --disable-cpudetect was given.
 if test "${enable_cpudetect+set}" = set; then
   enableval="$enable_cpudetect"
-  cpudetect=no
+  cpudetect="no"
 else
-  cpudetect=yes
+  cpudetect="yes"
 fi
 
 if test "$arch" = "x86_32" -o "$arch" = "x86_64"; then
   if test "$cpudetect" = "yes"; then
+    echo "using CPU runtime detection..."
     V_OBJ="$V_OBJ linux/cpudetect.o"
     V_CPUDETECT="-DRUNTIME_CPUDETECT"
  fi
@@ -2636,7 +2679,7 @@
 
 if test "$dvdecode" = "yes"; then
    echo $ac_n "checking for main in -ldv""... $ac_c" 1>&6
-echo "configure:2640: checking for main in -ldv" >&5
+echo "configure:2683: checking for main in -ldv" >&5
 ac_lib_var=`echo dv'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2644,14 +2687,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2648 "configure"
+#line 2691 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2686,17 +2729,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2690: checking for $ac_hdr" >&5
+echo "configure:2733: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2695 "configure"
+#line 2738 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2742,7 +2785,7 @@
 if test "$xvideo" = "yes"; then
 
       echo $ac_n "checking for XvQueryExtension in -lXv_pic""... $ac_c" 1>&6
-echo "configure:2746: checking for XvQueryExtension in -lXv_pic" >&5
+echo "configure:2789: checking for XvQueryExtension in -lXv_pic" >&5
 ac_lib_var=`echo Xv_pic'_'XvQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2750,7 +2793,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic -lXext $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2754 "configure"
+#line 2797 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2761,7 +2804,7 @@
 XvQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2789,7 +2832,7 @@
    else
    
    	echo $ac_n "checking for XvQueryExtension in -lXv""... $ac_c" 1>&6
-echo "configure:2793: checking for XvQueryExtension in -lXv" >&5
+echo "configure:2836: checking for XvQueryExtension in -lXv" >&5
 ac_lib_var=`echo Xv'_'XvQueryExtension | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2797,7 +2840,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lXv -lXext $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2801 "configure"
+#line 2844 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2808,7 +2851,7 @@
 XvQueryExtension()
 ; return 0; }
 EOF
-if { (eval echo configure:2812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2842,17 +2885,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2846: checking for $ac_hdr" >&5
+echo "configure:2889: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2851 "configure"
+#line 2894 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3218,6 +3261,7 @@
 
 
 
+
 V_DEFINE="$V_DEFINE $V_SHM $V_H261AS $V_DV $V_XV $V_CPUDETECT"
 
 
@@ -3238,7 +3282,7 @@
 		;;
 	*-*-linux*)
 		echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3242: checking for dlopen in -ldl" >&5
+echo "configure:3286: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3246,7 +3290,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3250 "configure"
+#line 3294 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3257,7 +3301,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:3261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3285,7 +3329,7 @@
 	esac
 	if test ! -z "$V_LIB_DL" ; then
 		echo $ac_n "checking for main in -l$V_LIB_DL""... $ac_c" 1>&6
-echo "configure:3289: checking for main in -l$V_LIB_DL" >&5
+echo "configure:3333: checking for main in -l$V_LIB_DL" >&5
 ac_lib_var=`echo $V_LIB_DL'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3293,14 +3337,14 @@
   ac_save_LIBS="$LIBS"
 LIBS="-l$V_LIB_DL $V_STATIC $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3297 "configure"
+#line 3341 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3557,6 +3601,7 @@
 s%@V_OBJ_XIL@%$V_OBJ_XIL%g
 s%@V_OBJ@%$V_OBJ%g
 s%@V_LIB@%$V_LIB%g
+s%@V_CODEC_LIB@%$V_CODEC_LIB%g
 s%@V_STATIC@%$V_STATIC%g
 s%@V_TAR_TARGET@%$V_TAR_TARGET%g
 s%@V_ALL@%$V_ALL%g

Modified: vic/branches/mpeg4/configure.in
==============================================================================
--- vic/branches/mpeg4/configure.in	(original)
+++ vic/branches/mpeg4/configure.in	Tue Nov 14 07:54:38 2006
@@ -6,9 +6,10 @@
 V_PROG="vic"
 V_ALL="$V_PROG"
 V_SHM="-DUSE_SHM"
-
+V_PATH=`pwd`
 V_OBJ=""
 V_LIB=""
+V_CODEC_LIB=""
 
 #ARCH DETECTION
 arch=`uname -m`
@@ -59,8 +60,6 @@
 V_OBJ_GRABBER=""
 V_LIB_XIL=""
 V_OBJ_XIL=""
-V_INCLUDE_FFMPEG=""
-V_INCLUDE_X264=""
 V_LIB_FFMPEG=""
 V_LIB_X264=""
 
@@ -81,99 +80,123 @@
 	exit 1
 fi
 
-AC_ARG_WITH(ffmpeginc,       --with-ffmpeginc=dir     specify the prefix directory of ffmpeg header, V_INCLUDE_FFMPEG=$withval, V_INCLUDE_FFMPEG="")
-if test "$V_INCLUDE_FFMPEG" != "" ; then
-   if test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avcodec.h around"
-        exit 1
-   elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/avutil.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/avutil.h around"
-        exit 1
-   elif test ! -r $V_INCLUDE_FFMPEG/ffmpeg/swscale.h ; then
-        echo "Error! you need to have $V_INCLUDE_FFMPEG/ffmpeg/swscale.h around"
-        exit 1
-   fi
-   echo "checking for FFmpeg headers...yes"
-   V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_FFMPEG"
-
-else
+AC_ARG_ENABLE(ffmpeg-co,	--disable-ffmpeg-co	Enable or disable ffmpeg svn checkout, ffmpegco="no", ffmpegco="yes")
+if test "$ffmpegco" = "yes" ; then
+   echo "checking out ffmpeg from  svn://svn.mplayerhq.hu/ffmpeg/trunk..."
+   svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
+   echo "Configuring ffmpeg..."
+   cd ffmpeg; ./configure --prefix=$V_PATH/ffmpeg --enable-gpl --enable-swscaler; cd ..
+   V_INCLUDE="$V_INCLUDE -Iffmpeg/include"
+   V_CODEC_LIB="$V_CODEC_LIB ffmpeg/lib/libavcodec.a ffmpeg/lib/libavutil.a ffmpeg/lib/libswscale.a"
+fi
+
+AC_ARG_ENABLE(x264-co,        --disable-x264-co      Enable or disable x264 svn checkout, x264co="no", x264co="yes")
+if test "$x264co" = "yes" ; then
+   echo "checking out x264 from  svn co svn://svn.videolan.org/x264/trunk..."
+   svn checkout svn://svn.videolan.org/x264/trunk x264
+   echo "Configuring x264..."
+   cd x264; ./configure --prefix=$V_PATH/x264; cd ..
+   V_INCLUDE="$V_INCLUDE -Ix264/include"
+   V_CODEC_LIB="$V_CODEC_LIB x264/lib/libx264.a"
+fi
+
+AC_ARG_WITH(ffmpeginc,       --with-ffmpeginc=dir     specify the prefix directory of ffmpeg header, ffmpeginc=$withval, ffmpeginc="")
+AC_ARG_WITH(ffmpeglib,       --with-ffmpeglib=dir     specify the directory of ffmpeg library, ffmpeglib=$withval, ffmpeglib="")
+
+if test "$ffmpegco" != "yes"; then
+
+	if test "$ffmpeginc" != "" ; then
+	   if test ! -r $ffmpeginc/ffmpeg/avcodec.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/avcodec.h around"
+	        exit 1
+	   elif test ! -r $ffmpeginc/ffmpeg/avutil.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/avutil.h around"
+	        exit 1
+	   elif test ! -r $ffmpeginc/ffmpeg/swscale.h ; then
+	        echo "Error! you need to have $ffmpeginc/ffmpeg/swscale.h around"
+	        exit 1
+	   fi
+	   echo "checking for FFmpeg headers...yes"
+	   V_INCLUDE="$V_INCLUDE -I$ffmpeginc"
+	
+	else
 
-   AC_CHECK_HEADER(ffmpeg/avcodec.h, [], [
-        echo "Error! you need to have avcodec.h around."
-        exit -1
-   ])
-   AC_CHECK_HEADER(ffmpeg/avutil.h, [], [
-        echo "Error! you need to have avutil.h around."
-        exit -1
-   ])
-   AC_CHECK_HEADER(ffmpeg/swscale.h, [], [
-        echo "Error! you need to have swscale.h around."
-        exit -1
-   ])
-fi
-
-AC_ARG_WITH(ffmpeglib,       --with-ffmpeglib=dir     specify the directory of ffmpeg library, V_LIB_FFMPEG=$withval, V_LIB_FFMPEG="")
-if test "$V_LIB_FFMPEG" != "" ; then
-   if test ! -r $V_LIB_FFMPEG/libavcodec.a ; then
-	echo "Error! you need to have $V_LIB_FFMPEG/libavcodec.a around"
-   elif test ! -r $V_LIB_FFMPEG/libavutil.a ; then
-        echo "Error! you need to have $V_LIB_FFMPEG/libavutil.a around"
-   elif test ! -r $V_LIB_FFMPEG/libswscale.a ; then
-        echo "Error! you need to have $V_LIB_FFMPEG/libswscale.a around"
-   fi
-   V_LIB_FFMPEG="-L$V_LIB_FFMPEG -lavcodec -lavutil -lswscale"
-else
-   AC_CHECK_LIB(avcodec, main, [], [
-        echo "Error! you need to have libavcodec around."
-        exit -1
-   ])
-   AC_CHECK_LIB(avutil, main, [], [
-        echo "Error! you need to have libavutil around."
-        exit -1
-   ])
-   AC_CHECK_LIB(swscale, main, [], [
-        echo "Error! you need to have libswscale around."
-        exit -1
-   ])
-   V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
-fi
-
-AC_ARG_WITH(x264inc,       --with-x264inc=dir     specify the directory of x264 header, V_INCLUDE_X264=$withval, V_INCLUDE_X264="")
-dnl x264 header needs pre-included headers
-dnl
-if test "$V_INCLUDE_X264" != "" ; then
-   if test ! -r $V_INCLUDE_X264/x264.h ; then
-	echo "Error! you need to have $V_INCLUDE_X264/x264.h around."
-	exit 1
-   fi
-   V_INCLUDE="$V_INCLUDE -I$V_INCLUDE_X264"
-elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
-        echo "Error! you need to have x264.h around."
-        exit 1
-else
-   echo "checking for x264.h...yes"
-fi
+	   AC_CHECK_HEADER(ffmpeg/avcodec.h, [], [
+        	echo "Error! you need to have avcodec.h around."
+	        exit -1
+	   ])
+	   AC_CHECK_HEADER(ffmpeg/avutil.h, [], [
+	        echo "Error! you need to have avutil.h around."
+	        exit -1
+	   ])
+	   AC_CHECK_HEADER(ffmpeg/swscale.h, [], [
+	        echo "Error! you need to have swscale.h around."
+	        exit -1
+	   ])
+	fi
+
+	if test "$ffmpeglib" != "" ; then
+	   if test ! -r $ffmpeglib/libavcodec.a ; then
+		echo "Error! you need to have $ffmpeglib/libavcodec.a around"
+	   elif test ! -r $ffmpeglib/libavutil.a ; then
+	        echo "Error! you need to have $ffmpeglib/libavutil.a around"
+	   elif test ! -r $ffmpeglib/libswscale.a ; then
+	        echo "Error! you need to have $ffmpeglib/libswscale.a around"
+	   fi
+	   V_LIB_FFMPEG="-L$ffmpeglib -lavcodec -lavutil -lswscale"
+	else
+	   AC_CHECK_LIB(avcodec, main, [], [
+	        echo "Error! you need to have libavcodec around."
+	        exit -1
+	   ])
+	   AC_CHECK_LIB(avutil, main, [], [
+	        echo "Error! you need to have libavutil around."
+	        exit -1
+	   ])
+	   AC_CHECK_LIB(swscale, main, [], [
+	        echo "Error! you need to have libswscale around."
+	        exit -1
+	   ])
+	   V_LIB_FFMPEG="-lavcodec -lavutil -lswscale"
+	fi
+fi 
+
+AC_ARG_WITH(x264inc,       --with-x264inc=dir     specify the directory of x264 header, x264inc=$withval, x264inc="")
+AC_ARG_WITH(x264lib,       --with-x264lib=dir     specify the directory of x264 library, x264lib=$withval, x264lib="")
+if test "x264co" != "yes" ; then
+	if test "$x264inc" != "" ; then
+	   if test ! -r $x264inc/x264.h ; then
+	        echo "Error! you need to have $x264inc/x264.h around."
+	        exit 1
+	   fi
+	   V_INCLUDE="$V_INCLUDE -I$x264inc"
+	elif test ! -r /usr/local/include/x264.h -a ! -r /usr/include/x264.h ; then
+	        echo "Error! you need to have x264.h around."
+	        exit 1
+	else
+	   echo "checking for x264.h...yes"
+	fi
 
-AC_ARG_WITH(x264lib,       --with-x264lib=dir     specify the directory of x264 library, V_LIB_X264=$withval, V_LIB_X264="")
-if test "$V_LIB_X264" != "" ; then
-   if test ! -r $V_LIB_X264/libx264.a ; then
-        echo "Error! you need to have $V_LIB_X264/libx264.a around"
-	exit 1
-   fi
-   V_LIB_X264="-L$V_LIB_X264 -lx264"
-else
-   AC_CHECK_LIB(x264, main, [], [
-        echo "Error! you need to have libx264 around."
-        exit -1
-   ])
-   V_LIB_X264="-lx264"
+	if test "$x264lib" != "" ; then
+	   if test ! -r $x264lib/libx264.a ; then
+	        echo "Error! you need to have $x264lib/libx264.a around"
+		exit 1
+	   fi
+	   V_LIB_X264="-L$x264lib -lx264"
+	else
+	   AC_CHECK_LIB(x264, main, [], [
+	        echo "Error! you need to have libx264 around."
+	        exit -1
+	   ])
+	   V_LIB_X264="-lx264"
+	fi
 fi
 
-
 V_CPUDETECT=""
-AC_ARG_ENABLE(cpudetect, --enable-cpudetect     Enable or disable runtime cpu detection, cpudetect=no, cpudetect=yes)
+AC_ARG_ENABLE(cpudetect, --disable-cpudetect     Enable or disable runtime cpu detection, cpudetect="no", cpudetect="yes")
 if test "$arch" = "x86_32" -o "$arch" = "x86_64"; then
   if test "$cpudetect" = "yes"; then
+    echo "using CPU runtime detection..."
     V_OBJ="$V_OBJ linux/cpudetect.o"
     V_CPUDETECT="-DRUNTIME_CPUDETECT"
  fi
@@ -182,7 +205,7 @@
 V_H261AS=""
 
 dnl h261 as (arbitrary size) 
-AC_ARG_ENABLE(h261as, --enable-h261as         Enable or disable the h261as codec, h261as=no, h261as=yes)
+AC_ARG_ENABLE(h261as, --disable-h261as         Enable or disable the h261as codec, h261as=no, h261as=yes)
 if test "$h261as" = "yes"; then
    V_OBJ="$V_OBJ codec/p64/p64as.o codec/decoder-h261as.o codec/encoder-h261as.o"
    V_H261AS="-DUSE_H261AS"
@@ -560,6 +583,7 @@
 AC_SUBST(V_OBJ_XIL)
 AC_SUBST(V_OBJ)
 AC_SUBST(V_LIB)
+AC_SUBST(V_CODEC_LIB)
 
 V_DEFINE="$V_DEFINE $V_SHM $V_H261AS $V_DV $V_XV $V_CPUDETECT"
 



More information about the Sumover-dev mailing list