[xiph-commits] r9489 - trunk/ffmpeg2theora
j at motherfish-iii.xiph.org
j at motherfish-iii.xiph.org
Sun Jun 19 15:17:57 PDT 2005
Author: j
Date: 2005-06-19 15:17:53 -0700 (Sun, 19 Jun 2005)
New Revision: 9489
Modified:
trunk/ffmpeg2theora/configure.ac
Log:
patch to use ffmpge-config if present to determine
compiler flags needed for libav*, thanks to
Hubert Chan <hubert at uhoreg.ca>
Modified: trunk/ffmpeg2theora/configure.ac
===================================================================
--- trunk/ffmpeg2theora/configure.ac 2005-06-19 13:50:39 UTC (rev 9488)
+++ trunk/ffmpeg2theora/configure.ac 2005-06-19 22:17:53 UTC (rev 9489)
@@ -38,29 +38,34 @@
dnl if not using ffmpegprefix try to look for shared files
if test "x$HAVE_FFMPEG" != xyes; then
- 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)
- ])
+ 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 "x$HAVE_FFMPEG_LOCAL" != xyes; then
- FFMPEG_CFLAGS="-I/usr/include/ffmpeg"
+ 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
- FFMPEG_CFLAGS="-I/usr/local/include/ffmpeg"
+ 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
- FFMPEG_EXTLIBS="-lm -lz"
- FFMPEG_LIBS="-L/usr/local/lib -L/usr/lib -lavformat -lavcodec $FFMPEG_EXTLIBS"
fi
-
else
FFMPEG_CFLAGS="-I$ffmpegprefix/libavformat -I$ffmpegprefix/libavcodec"
FFMPEG_EXTLIBS="-lm -lz"
More information about the commits
mailing list