Changeset 0adb6a63ec58c8d0343906fe60dd0320582e553e

Show
Ignore:
Timestamp:
04/20/03 13:57:13 (5 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1050839833 +0000
git-parent:

[50000c8a82333af7c047a92bc34b7f46d35ad57b]

git-author:
Gildas Bazin <gbazin@videolan.org> 1050839833 +0000
Message:

* configure.ac.in, modules/codec/ffmpeg/*, modules/encoder/ffmpeg/*, modules/stream_out/transcode.c: fixed detection of the ffmpeg headers/libs when they are installed in their default location.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac.in

    r0d1fb8a r0adb6a6  
    15081508then 
    15091509  AC_ARG_WITH(ffmpeg, 
    1510     [    --with-ffmpeg=PATH    path to ffmpeg installation],[],[]) 
    1511   if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x" 
    1512   then 
     1510    [    --with-ffmpeg=PATH    path to ffmpeg installation]) 
     1511  AC_ARG_WITH(ffmpeg-tree, 
     1512    [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking]) 
     1513 
     1514  dnl 
     1515  dnl test for --with-ffmpeg 
     1516  dnl 
     1517  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"; then 
    15131518    CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${with_ffmpeg}/include/ffmpeg" 
    15141519    LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${with_ffmpeg}/lib" 
     
    15161521    CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${with_ffmpeg}/include/ffmpeg" 
    15171522    LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${with_ffmpeg}/lib" 
    1518  
    1519   fi 
    1520  
    1521   dnl Add postprocessing modules 
    1522   PLUGINS="${PLUGINS} postprocessing_c" 
    1523   if test "x${ac_cv_mmx_inline}" != "xno"; then 
    1524     PLUGINS="${PLUGINS} postprocessing_mmx" 
    1525   fi 
    1526  
    1527   if test "x${ac_cv_mmxext_inline}" != "xno"; then 
    1528     PLUGINS="${PLUGINS} postprocessing_mmxext" 
    1529   fi 
    1530  
    1531   AC_ARG_WITH(ffmpeg-tree, 
    1532   [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking]) 
    1533   if test "x${with_ffmpeg_tree}" != "x" 
    1534   then 
    1535     AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree}) 
    1536     real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" 
    1537     if test "x${real_ffmpeg_tree}" = x 
    1538     then 
    1539       dnl  The given directory can't be found 
    1540       AC_MSG_RESULT(no) 
    1541       AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}]) 
    1542     fi 
    1543     if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a" 
    1544     then 
    1545       dnl  Use a custom libffmpeg 
    1546       AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a) 
    1547       BUILTINS="${BUILTINS} ffmpeg stream_out_transcode" 
    1548       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec" 
    1549       CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec" 
    1550  
    1551       dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X 
    1552       dnl       linker would miserably barf on multiple definitions. 
    1553       LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${real_ffmpeg_tree}/libavcodec" 
    1554       CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${real_ffmpeg_tree}/libavcodec" 
    1555  
    1556     else 
    1557       dnl  The given libavcodec wasn't built 
    1558       AC_MSG_RESULT(no) 
    1559       AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}]) 
    1560     fi 
    1561   else 
     1523  fi 
     1524 
     1525  dnl 
     1526  dnl test for !(--with-ffmpeg) && !(--with-ffmpeg-tree) 
     1527  dnl 
     1528  if test "x${with_ffmpeg_tree}" == "xno" -o "x${with_ffmpeg_tree}" == "x";then 
     1529    if test "x${with_ffmpeg}" == "xno" -o "x${with_ffmpeg}" == "x"; then 
     1530      AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h) 
     1531    fi 
     1532  fi 
     1533 
     1534  dnl 
     1535  dnl test for !(--with-ffmpeg-tree) 
     1536  dnl 
     1537  if test "x${with_ffmpeg}" == "xno" -o "x${with_ffmpeg}" == "x"; then 
    15621538    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" 
    15631539    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" 
    15641540    AC_CHECK_LIB(avcodec, avcodec_init, [ 
    15651541      BUILTINS="${BUILTINS} ffmpeg stream_out_transcode" 
    1566       LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec"  
     1542      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lavcodec" 
    15671543      dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X 
    15681544      dnl       linker would miserably barf on multiple definitions. 
     
    15711547    LDFLAGS="${LDFLAGS_save}" 
    15721548    CPPFLAGS="${CPPFLAGS_save}" 
     1549  fi 
     1550 
     1551  dnl 
     1552  dnl test for --with-ffmpeg-tree 
     1553  dnl 
     1554  if test "x${with_ffmpeg_tree}" != "xno" -a "x${with_ffmpeg_tree}" != "x";then 
     1555    AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree}) 
     1556    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`" 
     1557    if test "x${real_ffmpeg_tree}" = x; then 
     1558      dnl  The given directory can't be found 
     1559      AC_MSG_RESULT(no) 
     1560      AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}]) 
     1561    fi 
     1562    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then 
     1563      dnl  Use a custom libffmpeg 
     1564      AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a) 
     1565      BUILTINS="${BUILTINS} ffmpeg stream_out_transcode" 
     1566      LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -L${real_ffmpeg_tree}/libavcodec -lavcodec" 
     1567      CPPFLAGS_ffmpeg="${CPPFLAGS_ffmpeg} -I${real_ffmpeg_tree}/libavcodec" 
     1568 
     1569      dnl  XXX: we don't link with -lavcodec a 2nd time because the OS X 
     1570      dnl       linker would miserably barf on multiple definitions. 
     1571      LDFLAGS_stream_out_transcode="${LDFLAGS_stream_out_transcode} -L${real_ffmpeg_tree}/libavcodec" 
     1572      CPPFLAGS_stream_out_transcode="${CPPFLAGS_stream_out_transcode} -I${real_ffmpeg_tree}/libavcodec" 
     1573    else 
     1574      dnl  The given libavcodec wasn't built 
     1575      AC_MSG_RESULT(no) 
     1576      AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}]) 
     1577    fi 
     1578  fi 
     1579 
     1580  dnl Add postprocessing modules 
     1581  PLUGINS="${PLUGINS} postprocessing_c" 
     1582  if test "x${ac_cv_mmx_inline}" != "xno"; then 
     1583    PLUGINS="${PLUGINS} postprocessing_mmx" 
     1584  fi 
     1585 
     1586  if test "x${ac_cv_mmxext_inline}" != "xno"; then 
     1587    PLUGINS="${PLUGINS} postprocessing_mmxext" 
    15731588  fi 
    15741589fi 
  • modules/codec/ffmpeg/audio.c

    r5e99f4d r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: audio.c,v 1.15 2003/04/17 10:58:30 fenrir Exp $ 
     5 * $Id: audio.c,v 1.16 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    4646#include "aout_internal.h" 
    4747 
    48 #include "avcodec.h"                                            /* ffmpeg */ 
     48/* ffmpeg header */ 
     49#ifdef HAVE_FFMPEG_AVCODEC_H 
     50#   include <ffmpeg/avcodec.h> 
     51#else 
     52#   include <avcodec.h> 
     53#endif 
    4954 
    5055//#include "postprocessing/postprocessing.h" 
  • modules/codec/ffmpeg/ffmpeg.c

    r5e99f4d r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: ffmpeg.c,v 1.30 2003/04/17 10:58:30 fenrir Exp $ 
     5 * $Id: ffmpeg.c,v 1.31 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    3939#endif 
    4040 
    41 #include "avcodec.h" /* ffmpeg */ 
     41/* ffmpeg header */ 
     42#ifdef HAVE_FFMPEG_AVCODEC_H 
     43#   include <ffmpeg/avcodec.h> 
     44#else 
     45#   include <avcodec.h> 
     46#endif 
    4247 
    4348#if LIBAVCODEC_BUILD < 4655 
     
    4954 
    5055#ifdef LIBAVCODEC_PP 
    51 #   include "libpostproc/postprocess.h" 
     56#   ifndef HAVE_POSTPROC_POSTPROCESS_H 
     57#       include <postproc/postprocess.h> 
     58#   else 
     59#       include <libpostproc/postprocess.h> 
     60#   endif 
    5261#else 
    5362#   include "postprocessing/postprocessing.h" 
  • modules/codec/ffmpeg/video.c

    r5e99f4d r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: video.c,v 1.20 2003/04/17 10:58:30 fenrir Exp $ 
     5 * $Id: video.c,v 1.21 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    4040#endif 
    4141 
    42 #include "avcodec.h"                                               /* ffmpeg */ 
     42/* ffmpeg header */ 
     43#ifdef HAVE_FFMPEG_AVCODEC_H 
     44#   include <ffmpeg/avcodec.h> 
     45#else 
     46#   include <avcodec.h> 
     47#endif 
     48 
    4349#include "ffmpeg.h" 
    4450 
    4551#ifdef LIBAVCODEC_PP 
    46 #   include "libpostproc/postprocess.h" 
     52#   ifdef HAVE_POSTPROC_POSTPROCESS_H 
     53#       include <postproc/postprocess.h> 
     54#   else 
     55#       include <libpostproc/postprocess.h> 
     56#   endif 
    4757#else 
    4858#   include "postprocessing/postprocessing.h" 
  • modules/encoder/ffmpeg/audio.c

    r412d64b r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: audio.c,v 1.1 2003/01/22 10:41:57 fenrir Exp $ 
     5 * $Id: audio.c,v 1.2 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar 
     
    3434#include "codecs.h" 
    3535 
    36 #include <avcodec.h> 
     36/* ffmpeg header */ 
     37#ifdef HAVE_FFMPEG_AVCODEC_H 
     38#   include <ffmpeg/avcodec.h> 
     39#else 
     40#   include <avcodec.h> 
     41#endif 
    3742 
    3843/***************************************************************************** 
  • modules/encoder/ffmpeg/video.c

    r412d64b r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: video.c,v 1.1 2003/01/22 10:41:57 fenrir Exp $ 
     5 * $Id: video.c,v 1.2 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar 
     
    3535#include "encoder.h" 
    3636 
    37 #include <avcodec.h> 
     37/* ffmpeg header */ 
     38#ifdef HAVE_FFMPEG_AVCODEC_H 
     39#   include <ffmpeg/avcodec.h> 
     40#else 
     41#   include <avcodec.h> 
     42#endif 
    3843 
    3944int  E_( OpenEncoderVideo ) ( vlc_object_t * ); 
  • modules/stream_out/transcode.c

    r88e6ced r0adb6a6  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: transcode.c,v 1.3 2003/04/16 16:33:35 fenrir Exp $ 
     5 * $Id: transcode.c,v 1.4 2003/04/20 11:57:13 gbazin Exp $ 
    66 * 
    77 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 
     
    3232#include <vlc/sout.h> 
    3333 
    34 #include <avcodec.h> 
     34/* ffmpeg header */ 
     35#ifdef HAVE_FFMPEG_AVCODEC_H 
     36#   include <ffmpeg/avcodec.h> 
     37#else 
     38#   include <avcodec.h> 
     39#endif 
    3540 
    3641/*****************************************************************************