Diego Biurrun <[email protected]> writes:
> None of the compiled binaries use any of libpostproc's symbols except for
> printing version information from cmdutils.c. Thus the dependency is
> completely silly and could be dropped.
>
> This work-in-progress patch implements this in draft form.
> ---
> Makefile | 5 ++---
> cmdutils.c | 2 --
> common.mak | 2 +-
> configure | 4 ++--
> 4 files changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9f7b436..8e0255e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -63,13 +63,12 @@ BASENAMES = ffmpeg ffplay ffprobe ffserver
> ALLPROGS = $(BASENAMES:%=%$(EXESUF))
> ALLMANPAGES = $(BASENAMES:%=%.1)
>
> -ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
> +DIRS-$(CONFIG_POSTPROC) += postproc
>
> FFLIBS-$(CONFIG_AVDEVICE) += avdevice
> FFLIBS-$(CONFIG_AVFILTER) += avfilter
> FFLIBS-$(CONFIG_AVFORMAT) += avformat
> FFLIBS-$(CONFIG_AVCODEC) += avcodec
> -FFLIBS-$(CONFIG_POSTPROC) += postproc
> FFLIBS-$(CONFIG_SWSCALE) += swscale
>
> FFLIBS := avutil
> @@ -107,7 +106,7 @@ SUBDIR := $(1)/
> include $(SRC_PATH)/$(1)/Makefile
> endef
>
> -$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
> +$(foreach D,$(FFLIBS) $(DIRS-yes),$(eval $(call DOSUBDIR,lib$(D))))
>
> ffplay.o: CFLAGS += $(SDL_CFLAGS)
> ffplay$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
This is ugly.
> diff --git a/cmdutils.c b/cmdutils.c
> index 943a77c..616d60f 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -33,7 +33,6 @@
> #include "libavfilter/avfilter.h"
> #include "libavdevice/avdevice.h"
> #include "libswscale/swscale.h"
> -#include "libpostproc/postprocess.h"
> #include "libavutil/avstring.h"
> #include "libavutil/parseutils.h"
> #include "libavutil/pixdesc.h"
> @@ -526,7 +525,6 @@ static void print_all_libs_info(FILE* outstream, int
> flags)
> PRINT_LIB_INFO(outstream, avdevice, AVDEVICE, flags);
> PRINT_LIB_INFO(outstream, avfilter, AVFILTER, flags);
> PRINT_LIB_INFO(outstream, swscale, SWSCALE, flags);
> - PRINT_LIB_INFO(outstream, postproc, POSTPROC, flags);
> }
>
> void show_banner(void)
> diff --git a/common.mak b/common.mak
> index bd21046..cd82f7b 100644
> --- a/common.mak
> +++ b/common.mak
> @@ -12,7 +12,7 @@ FFLIBS := $(FFLIBS-yes) $(FFLIBS)
> TESTPROGS += $(TESTPROGS-yes)
>
> FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
> -FFLDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
> +FFLDFLAGS := $(FFLIBS:%=-Llib%) $(LDFLAGS)
This intentionally adds -L flags for all the dirs. Leave it that way.
> EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
> OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
> diff --git a/configure b/configure
> index e315afa..45d1d44 100755
> --- a/configure
> +++ b/configure
> @@ -2958,7 +2958,7 @@ enabled extra_warnings && check_cflags -Winline
>
> # add some linker flags
> check_ldflags -Wl,--warn-common
> -check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale
> -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice
> -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec
> -Wl,-rpath-link,libavutil
> +check_ldflags -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter
> -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat
> -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
> test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
OK but unnecessary.
> echo "X{};" > $TMPV
> @@ -3391,5 +3391,5 @@ pkgconfig_generate libavcodec "Libav codec library"
> "$LIBAVCODEC_VERSION" "$extr
> pkgconfig_generate libavformat "Libav container format library"
> "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
> pkgconfig_generate libavdevice "Libav device handling library"
> "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
> pkgconfig_generate libavfilter "Libav video filtering library"
> "$LIBAVFILTER_VERSION" "$extralibs"
> -pkgconfig_generate libpostproc "Libav post processing library"
> "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
> +pkgconfig_generate libpostproc "Libav postprocessing library"
> "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
> pkgconfig_generate libswscale "Libav image rescaling library"
> "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
Unrelated, please separate.
--
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel