[xiph-commits] r9709 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Sat Aug 6 09:48:02 PDT 2005


Author: j
Date: 2005-08-06 09:47:58 -0700 (Sat, 06 Aug 2005)
New Revision: 9709

Modified:
   trunk/ffmpeg2theora/INSTALL
   trunk/ffmpeg2theora/Makefile.am
   trunk/ffmpeg2theora/configure.ac
   trunk/ffmpeg2theora/get_ffmpeg_cvs.sh
Log:
- rework autotools system to work with latest version of ffmpeg-cvs
  [now uses pkg-config files provided by ffmpeg to determine dependencies]



Modified: trunk/ffmpeg2theora/INSTALL
===================================================================
--- trunk/ffmpeg2theora/INSTALL	2005-08-06 16:35:53 UTC (rev 9708)
+++ trunk/ffmpeg2theora/INSTALL	2005-08-06 16:47:58 UTC (rev 9709)
@@ -2,16 +2,22 @@
 ---------------------------------
 you need
 - the latest version of libtheora ( http://www.theora.org/files )
-- ffmpeg 0.4.9-pre1 or cvs ( http://ffmpeg.sf.net ) / by running ./get_ffmpeg_cvs.sh
+- ffmpeg-cvs ( http://ffmpeg.sf.net ) / by running ./get_ffmpeg_cvs.sh
   configure it with i.e.
-  ./configure --enable-faad --enable-vorbis --disable-mp3lame --enable-pp --enable-a52  --enable-dts --enable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-libogg --enable-vorbis --enable-theora
+  ./configure --enable-faad --disable-mp3lame --enable-pp --enable-a52  --enable-dts --enable-pthreads --disable-vhook --disable-v4l --disable-audio-oss --disable-dv1394  --disable-ffmpeg --disable-ffserver --disable-network --enable-gpl --enable-libogg --enable-vorbis --enable-theora
 
-now run:
-./configure [--with-ffmpegprefix=/path/to/ffmpeg_src]
+if you did not install ffmpeg but want to staticly link it
+(recomended by ffmpeg developers) update PKG_CONFIG_PATH to
+point to your ffmpeg source:
+
+ export PKG_CONFIG_PATH=/path/to/ffmpeg_src:$PKG_CONFIG_PATH
+
+now you can build ffmpeg2theora:
+./configure
 make
 
 
-cross compiling with mingw32
+cross compiling with mingw32(out of date)
 ----------------------------------------------
 
  you need to crosscompiled libvorbis,libogg,libtheora

Modified: trunk/ffmpeg2theora/Makefile.am
===================================================================
--- trunk/ffmpeg2theora/Makefile.am	2005-08-06 16:35:53 UTC (rev 9708)
+++ trunk/ffmpeg2theora/Makefile.am	2005-08-06 16:47:58 UTC (rev 9709)
@@ -9,7 +9,7 @@
 bin_PROGRAMS = ffmpeg2theora
 
 ffmpeg2theora_SOURCES = ffmpeg2theora.c  theorautils.c
-ffmpeg2theora_LDFLAGS = -static -L$(prefix)/lib @FFMPEG_LIBS@ @XIPH_LIBS@
+ffmpeg2theora_LDFLAGS = -L$(prefix)/lib @FFMPEG_LIBS@ @XIPH_LIBS@
 ffmpeg2theora_CFLAGS = $(EXTRA) @XIPH_CFLAGS@ @FFMPEG_CFLAGS@
 
 man_MANS = ffmpeg2theora.1

Modified: trunk/ffmpeg2theora/configure.ac
===================================================================
--- trunk/ffmpeg2theora/configure.ac	2005-08-06 16:35:53 UTC (rev 9708)
+++ trunk/ffmpeg2theora/configure.ac	2005-08-06 16:47:58 UTC (rev 9709)
@@ -1,99 +1,41 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
-AC_INIT(ffmpeg2theora,0.13)
+AC_INIT(ffmpeg2theora,0.13-svn)
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([dist-bzip2])
 
-AM_DISABLE_SHARED
-AM_ENABLE_STATIC
-
 AC_PROG_CC
 AM_PROG_LIBTOOL
 
-dnl ffmpeg integration here
-AC_ARG_WITH(ffmpegprefix,
-       AS_HELP_STRING([--with-ffmpegprefix],
-	[prefix to ffmpeg source, if libavcodec and libavformat are not in . (default=.)]),
-       ffmpegprefix="$withval", ffmpegprefix="ffmpeg")
+AC_MSG_CHECKING(whether to link statically)
+AC_ARG_WITH(static-linking,
+[  --with-static-linking   Link binaries statically],
+[ case "$withval" in
+  no)
+     AC_MSG_RESULT(no)
+     ;;
+  *)
+    AC_MSG_RESULT(yes)
+    LDFLAGS="-static $LDFLAGS"
+    ;;
+  esac],
+AC_MSG_RESULT(no)
+)
 
-dnl only check for libavcodec.a and libformat.a if not crosscompiling
-dnl
-dnl so LIBPREF and LIBSUF are configured by default,
+PKG_CHECK_MODULES(FFMPEG, libavformat libavcodec, HAVE_FFMPEG=yes, HAVE_FFMPEG=no)
+if test x$HAVE_FFMPEG = xno; then
+    export PKG_CONFIG_PATH=./ffmpeg:$PKG_CONFIG_PATH
+    PKG_CHECK_MODULES(FFMPEG, libavformat libavcodec, HAVE_FFMPEG=yes, 
+        AC_MSG_ERROR([
 
-LIBPREF=lib
-LIBSUF=.a
-case "$host" in
-	*mingw*)
-		LIBPREF=
-		LIBSUF=.lib
-	;;
-esac
-if test "$cross_compiling" = yes; then
-  HAVE_FFMPEG=yes
-  LIBPREF=
-  LIBSUF=.lib
-else
-  AC_CHECK_FILES([$ffmpegprefix/libavcodec/${LIBPREF}avcodec$LIBSUF $ffmpegprefix/libavformat/${LIBPREF}avformat$LIBSUF],[HAVE_FFMPEG=yes])
+could not find ffmpeg. please update PKG_CONFIG_PATH to point to ffmpegs source
+folder or run ./get_ffmpeg_cvs.sh (for more information see INSTALL)
+])
+)
 fi
-
-dnl if not using ffmpegprefix try to look for shared files
-if test "x$HAVE_FFMPEG" != xyes; then
-	AC_CHECK_PROG(HAVE_FFMPEG_CONFIG, ffmpeg-config, yes)
-	if test "x$HAVE_FFMPEG_CONFIG" == xyes; then
-		FFMPEG_CFLAGS=`ffmpeg-config --cflags`
-		FFMPEG_LIBS=`ffmpeg-config --libs avformat`
-	else
-		if test "$ffmpegprefix" == ffmpeg; then
-			AC_CHECK_HEADER(ffmpeg/avcodec.h,[HAVE_SHARED_AVCODEC=yes])
-			AC_CHECK_HEADER(ffmpeg/avformat.h, [HAVE_SHARED_AVFORMAT=yes])
-			AC_CHECK_FILE(/usr/local/include/ffmpeg, [HAVE_FFMPEG_LOCAL=yes])
-		fi
-		if test "x$HAVE_SHARED_AVCODEC$HAVE_SHARED_AVCODEC" != xyesyes; then
-			AC_MSG_ERROR([
-		you need libavcodec and libavformat from ffmpeg cvs
-		to get it run get_ffmpeg_cvs.sh or point configure to
-		your local copy with i.e.
-		./configure --with-ffmpegprefix=/usr/local/src/ffmpeg
-		(see INSTALL for more information)
-		])
-		else
-			if test "x$HAVE_FFMPEG_LOCAL" != xyes; then
-				FFMPEG_CFLAGS="-I/usr/include/ffmpeg"
-			else
-				FFMPEG_CFLAGS="-I/usr/local/include/ffmpeg"
-			fi
-			FFMPEG_EXTLIBS="-lm -lz"
-			FFMPEG_LIBS="-L/usr/local/lib -L/usr/lib -lavformat -lavcodec $FFMPEG_EXTLIBS"
-		fi
-	fi
-else
-	FFMPEG_CFLAGS="-I$ffmpegprefix/libavformat -I$ffmpegprefix/libavcodec"
-	FFMPEG_EXTLIBS="-lm -lz"
-	FFMPEG_LIBS="$ffmpegprefix/libavformat/${LIBPREF}avformat$LIBSUF $ffmpegprefix/libavcodec/${LIBPREF}avcodec$LIBSUF $FFMPEG_EXTLIBS"
-fi
-
-
-AC_CHECK_LIB(faad,faacDecClose, [
-  AC_CHECK_HEADER(faad.h, [HAVE_FAAD=yes])
-    ],,[-lm -lz])
-AC_CHECK_LIB(faad,NeAACDecInit, [
-  AC_CHECK_HEADER(faad.h, [HAVE_FAAD=yes])
-    ],,[-lm -lz])
-if test "x$HAVE_FAAD" = xyes; then
-	FFMPEG_EXTLIBS="-lfaad"
-	FFMPEG_LIBS="$FFMPEG_LIBS $FFMPEG_EXTLIBS"
-fi
 AC_SUBST(FFMPEG_CFLAGS)
 AC_SUBST(FFMPEG_LIBS)
 
-
-AC_CHECK_LIB(dts,dts_init, [
-  AC_CHECK_HEADER(dts.h, [HAVE_DTS=yes])
-    ],,[-lm -lz])
-if test "x$HAVE_DTS" = xyes; then
-	FFMPEG_LIBS="$FFMPEG_LIBS -ldts"
-fi
-
 PKG_CHECK_MODULES(XIPH,ogg >= 1.1 vorbis vorbisenc theora )
 
 AC_SUBST(XIPH_CFLAGS)

Modified: trunk/ffmpeg2theora/get_ffmpeg_cvs.sh
===================================================================
--- trunk/ffmpeg2theora/get_ffmpeg_cvs.sh	2005-08-06 16:35:53 UTC (rev 9708)
+++ trunk/ffmpeg2theora/get_ffmpeg_cvs.sh	2005-08-06 16:47:58 UTC (rev 9709)
@@ -1,2 +1,5 @@
 #!/bin/sh
 cvs -z3 -d:pserver:anonymous at cvs.mplayerhq.hu:/cvsroot/ffmpeg/ co ffmpeg
+cd ffmpeg
+./configure --enable-libogg --enable-theora --disable-mp3lame --enable-a52 --enable-pthreads --enable-vhook --enable-dv1394 --enable-gpl
+make 



More information about the commits mailing list