Move all definitions of external dependencies into configure instead of
defining it in configure and the Makefiles in a random fashion. patch by j -- at -- v2v -- dot -- cc Originally committed as revision 4628 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5af837972c
commit
c99dd23307
37
Makefile
37
Makefile
@ -38,43 +38,6 @@ ifeq ($(BUILD_SHARED),yes)
|
||||
DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
|
||||
else
|
||||
DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
|
||||
ifeq ($(CONFIG_MP3LAME),yes)
|
||||
EXTRALIBS+=-lmp3lame
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBOGG),yes)
|
||||
ifeq ($(CONFIG_LIBVORBIS),yes)
|
||||
EXTRALIBS+= -lvorbisenc -lvorbis
|
||||
endif
|
||||
ifeq ($(CONFIG_LIBTHEORA),yes)
|
||||
EXTRALIBS+= -ltheora
|
||||
endif
|
||||
EXTRALIBS+= -logg
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FAAD),yes)
|
||||
ifeq ($(CONFIG_FAADBIN),yes)
|
||||
# no libs needed
|
||||
else
|
||||
EXTRALIBS += -lfaad
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FAAC),yes)
|
||||
EXTRALIBS+=-lfaac
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XVID),yes)
|
||||
EXTRALIBS+=-lxvidcore
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBGSM),yes)
|
||||
EXTRALIBS+=-lgsm
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DC1394),yes)
|
||||
EXTRALIBS+=-ldc1394_control -lraw1394
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VHOOK),yes)
|
||||
|
44
configure
vendored
44
configure
vendored
@ -375,6 +375,7 @@ SLIBPREF=""
|
||||
SLIBSUF=".dll"
|
||||
EXESUF=".exe"
|
||||
extralibs=""
|
||||
pkg_requires=""
|
||||
v4l="no"
|
||||
audio_oss="no"
|
||||
dv1394="no"
|
||||
@ -470,6 +471,7 @@ for opt do
|
||||
--disable-audio-oss) audio_oss="no"
|
||||
;;
|
||||
--disable-audio-beos) audio_beos="no"
|
||||
extralibs="$extralibs -lbe -lmedia"
|
||||
;;
|
||||
--disable-dv1394) dv1394="no"
|
||||
;;
|
||||
@ -481,33 +483,48 @@ for opt do
|
||||
;;
|
||||
--enable-a52bin) a52bin="yes"
|
||||
;;
|
||||
--enable-dts) dts="yes" ; extralibs="$extralibs -ldts"
|
||||
--enable-dts) dts="yes"
|
||||
extralibs="$extralibs -ldts"
|
||||
;;
|
||||
--enable-pp) pp="yes"
|
||||
;;
|
||||
--enable-shared-pp) shared_pp="yes"
|
||||
;;
|
||||
--enable-libgsm) libgsm="yes"
|
||||
extralibs="$extralibs -lgsm"
|
||||
;;
|
||||
--enable-mp3lame) mp3lame="yes"; extralibs="$extralibs -lmp3lame"
|
||||
--enable-mp3lame) mp3lame="yes"
|
||||
extralibs="$extralibs -lmp3lame"
|
||||
;;
|
||||
--enable-libogg) libogg="yes"
|
||||
extralibs="$extralibs -logg"
|
||||
pkg_requires="$pkg_requires ogg >= 1.1"
|
||||
;;
|
||||
--enable-vorbis) vorbis="yes"
|
||||
extralibs="$extralibs -lvorbis -lvorbisenc"
|
||||
pkg_requires="$pkg_requires vorbis vorbisenc"
|
||||
;;
|
||||
--enable-theora) theora="yes"
|
||||
extralibs="$extralibs -ltheora"
|
||||
pkg_requires="$pkg_requires theora"
|
||||
;;
|
||||
--enable-faad) faad="yes"
|
||||
extralibs="$extralibs -lfaad"
|
||||
;;
|
||||
--enable-faadbin) faadbin="yes"
|
||||
;;
|
||||
--enable-faac) faac="yes"; extralibs="$extralibs -lfaac"
|
||||
--enable-faac) faac="yes"
|
||||
extralibs="$extralibs -lfaac"
|
||||
;;
|
||||
--enable-xvid) xvid="yes"
|
||||
extralibs="$extralibs -lxvidcore"
|
||||
;;
|
||||
--enable-x264) x264="yes"; extralibs="$extralibs -lx264"
|
||||
--enable-x264) x264="yes"
|
||||
extralibs="$extralibs -lx264"
|
||||
;;
|
||||
--enable-dc1394) dc1394="yes"
|
||||
extralibs="$extralibs -ldc1394_control -lraw1394"
|
||||
pkg_requires="$pkg_requires libraw1394"
|
||||
;;
|
||||
--disable-vhook) vhook="no"
|
||||
;;
|
||||
@ -1772,17 +1789,6 @@ lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcode
|
||||
lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
|
||||
lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
|
||||
|
||||
requires=
|
||||
test "$dc1394" = "yes" && extralibs="$extralibs -ldc1394_control" && requires="$requires libraw1394"
|
||||
test "$libgsm" = "yes" && extralibs="$extralibs -lgsm"
|
||||
test "$libogg" = "yes" && requires="$requires ogg >= 1.1"
|
||||
test "$vorbis" = "yes" && requires="$requires vorbis"
|
||||
test "$mp3lame" = "yes" && extralibs="$extralibs -lmp3lame"
|
||||
test "$theora" = "yes" && requires="$requires theora"
|
||||
test "$faad" = "yes" && test "$faadbin" = "no" && extralibs="$extralibs -lfaad"
|
||||
test "$faac" = "yes" && extralibs="$extralibs -lfaac"
|
||||
test "$xvid" = "yes" && extralibs="$extralibs -lxvidcore"
|
||||
|
||||
# libavutil.pc
|
||||
cat <<EOF >libavutil.pc
|
||||
prefix=$prefix
|
||||
@ -1824,7 +1830,7 @@ includedir=\${prefix}/include
|
||||
Name: libavcodec
|
||||
Description: FFmpeg codec library
|
||||
Version: $lavc_version
|
||||
Requires: $requires libavutil = $lavu_version
|
||||
Requires: $pkg_requires libavutil = $lavu_version
|
||||
Conflicts:
|
||||
Libs: -L\${libdir} -lavcodec $extralibs
|
||||
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
|
||||
@ -1839,7 +1845,7 @@ includedir=\${pcfiledir}/libavcodec
|
||||
Name: libavcodec
|
||||
Description: FFmpeg codec library
|
||||
Version: $lavc_version
|
||||
Requires: $requires libavutil = $lavu_version
|
||||
Requires: $pkg_requires libavutil = $lavu_version
|
||||
Conflicts:
|
||||
Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
|
||||
Cflags: -I\${includedir}
|
||||
@ -1855,7 +1861,7 @@ includedir=\${prefix}/include
|
||||
Name: libavformat
|
||||
Description: FFmpeg container format library
|
||||
Version: $lavf_version
|
||||
Requires: $requires libavcodec = $lavc_version
|
||||
Requires: $pkg_requires libavcodec = $lavc_version
|
||||
Conflicts:
|
||||
Libs: -L\${libdir} -lavformat $extralibs
|
||||
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
|
||||
@ -1870,7 +1876,7 @@ includedir=\${pcfiledir}/libavformat
|
||||
Name: libavformat
|
||||
Description: FFmpeg container format library
|
||||
Version: $lavf_version
|
||||
Requires: $requires libavcodec = $lavc_version
|
||||
Requires: $pkg_requires libavcodec = $lavc_version
|
||||
Conflicts:
|
||||
Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
|
||||
Cflags: -I\${includedir}
|
||||
|
@ -240,32 +240,22 @@ EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
|
||||
# currently using libdts for dts decoding
|
||||
ifeq ($(CONFIG_DTS),yes)
|
||||
OBJS+= dtsdec.o
|
||||
CFLAGS += $(DTS_INC)
|
||||
EXTRALIBS += -ldts
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FAAD),yes)
|
||||
OBJS+= faad.o
|
||||
ifeq ($(CONFIG_FAADBIN),yes)
|
||||
# no libs needed
|
||||
else
|
||||
EXTRALIBS += -lfaad
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FAAC),yes)
|
||||
OBJS+= faac.o
|
||||
EXTRALIBS += -lfaac
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XVID),yes)
|
||||
OBJS+= xvidff.o
|
||||
EXTRALIBS += -lxvidcore
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_X264),yes)
|
||||
OBJS+= x264.o
|
||||
EXTRALIBS += -lx264
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PP),yes)
|
||||
@ -279,24 +269,19 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_MP3LAME),yes)
|
||||
OBJS += mp3lameaudio.o
|
||||
EXTRALIBS += -lmp3lame
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBOGG),yes)
|
||||
ifeq ($(CONFIG_LIBVORBIS),yes)
|
||||
OBJS += oggvorbis.o
|
||||
EXTRALIBS += -lvorbisenc -lvorbis
|
||||
endif
|
||||
ifeq ($(CONFIG_LIBTHEORA), yes)
|
||||
OBJS += oggtheora.o
|
||||
EXTRALIBS += -ltheora
|
||||
endif
|
||||
EXTRALIBS += -logg
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBGSM),yes)
|
||||
OBJS += libgsm.o
|
||||
EXTRALIBS += -lgsm
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_GPROF),yes)
|
||||
|
@ -60,7 +60,6 @@ EXTRALIBS += -L../libavutil -lavutil$(BUILDSUF)
|
||||
|
||||
ifeq ($(CONFIG_AUDIO_BEOS),yes)
|
||||
PPOBJS+= beosaudio.o
|
||||
EXTRALIBS+=-lbe -lmedia
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NETWORK),yes)
|
||||
@ -86,9 +85,6 @@ AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
|
||||
ifeq ($(CONFIG_DARWIN),yes)
|
||||
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
|
||||
endif
|
||||
ifeq ($(CONFIG_MP3LAME),yes)
|
||||
AVCLIBS+=-lmp3lame
|
||||
endif
|
||||
endif
|
||||
|
||||
SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
|
||||
|
Loading…
Reference in New Issue
Block a user