diff --git a/configure b/configure index e983d2311d..ef914f735e 100755 --- a/configure +++ b/configure @@ -219,7 +219,7 @@ vhook="default" dlfcn="no" dlopen="no" mpegaudio_hp="yes" -SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)' +SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)' netserver="no" need_inet_aton="no" ffserver="yes" @@ -232,6 +232,8 @@ LIBPREF="lib" LIBSUF=".a" SLIBPREF="lib" SLIBSUF=".so" +SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)' +SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)' EXESUF="" BUILDSUF="" amr_nb="no" @@ -343,6 +345,8 @@ strip="strip -x" installstrip="" LDFLAGS="-Wl,-dynamic,-search_paths_first" SLIBSUF=".dylib" +SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)' +SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)' FFSLDFLAGS=-Wl,-bind_at_load ;; MINGW32*) @@ -1504,6 +1508,8 @@ if test "$lshared" = "yes" ; then echo "LAVFVERSION=$lavf_version" >> config.mak echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak echo "LAVUVERSION=$lavu_version" >> config.mak + echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak + echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak fi echo "EXTRALIBS=$extralibs" >> config.mak version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" | diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 2e91588961..5e3fd45cf0 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -399,6 +399,9 @@ OBJS := $(OBJS) $(ASM_OBJS) LIB= $(LIBPREF)avcodec$(LIBSUF) LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF) ifeq ($(BUILD_SHARED),yes) +LIBVERSION=$(LAVCVERSION) +LIBMAJOR=$(LAVCMAJOR) +NAME=avcodec SLIBNAME= $(SLIBPREF)avcodec$(SLIBSUF) endif TESTS= imgresample-test dct-test motion-test fft-test @@ -490,14 +493,17 @@ fft-test: fft-test.o $(LIB) $(CC) -o $@ $^ $(LIBAVUTIL) -lm ifeq ($(BUILD_SHARED),yes) -LIBVERSION=$(LAVCMAJOR) install: all install-headers ifeq ($(CONFIG_WIN32),yes) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" else install -d $(libdir) - install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavcodec-$(VERSION)$(SLIBSUF) - ln -sf $(SLIBPREF)avcodec-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ + $(libdir)/$(SLIBNAME_WITH_VERSION) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME_WITH_MAJOR) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME) $(LDCONFIG) || true endif ifeq ($(CONFIG_PP),yes) diff --git a/libavcodec/libpostproc/Makefile b/libavcodec/libpostproc/Makefile index f497d6a1b6..3026b96f59 100644 --- a/libavcodec/libpostproc/Makefile +++ b/libavcodec/libpostproc/Makefile @@ -5,6 +5,9 @@ VPATH=$(SRC_PATH)/libavcodec/libpostproc LIB = $(LIBPREF)postproc$(LIBSUF) ifeq ($(SHARED_PP),yes) +LIBVERSION=$(SPPVERSION) +LIBMAJOR=$(SPPMAJOR) +NAME=postproc SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF) endif @@ -53,8 +56,12 @@ ifeq ($(CONFIG_WIN32),yes) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" else install -d $(libdir) - install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libpostproc-$(VERSION)$(SLIBSUF) - ln -sf $(SLIBPREF)postproc-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ + $(libdir)/$(SLIBNAME_WITH_VERSION) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME_WITH_MAJOR) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME) $(LDCONFIG) || true endif endif diff --git a/libavformat/Makefile b/libavformat/Makefile index 8db1c59127..3b2ee7d4d0 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -80,7 +80,9 @@ endif LIB= $(LIBPREF)avformat$(LIBSUF) ifeq ($(BUILD_SHARED),yes) -LIBVERSION=$(LAVFMAJOR) +LIBVERSION=$(LAVFVERSION) +LIBMAJOR=$(LAVFMAJOR) +NAME=avformat SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF) AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil endif @@ -111,8 +113,12 @@ ifeq ($(CONFIG_WIN32),yes) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" else install -d $(libdir) - install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) - ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ + $(libdir)/$(SLIBNAME_WITH_VERSION) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME_WITH_MAJOR) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME) $(LDCONFIG) || true endif else diff --git a/libavutil/Makefile b/libavutil/Makefile index 47ce5520ee..efa40da08e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -22,7 +22,9 @@ SRCS := $(OBJS:.o=.c) LIB= $(LIBPREF)avutil$(LIBSUF) ifeq ($(BUILD_SHARED),yes) -LIBVERSION=$(LAVUMAJOR) +LIBVERSION=$(LAVUVERSION) +LIBMAJOR=$(LAVUMAJOR) +NAME=avutil SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF) endif @@ -62,8 +64,12 @@ ifeq ($(CONFIG_WIN32),yes) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" else install -d $(libdir) - install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF) - ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ + $(libdir)/$(SLIBNAME_WITH_VERSION) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME_WITH_MAJOR) + ln -sf $(SLIBNAME_WITH_VERSION) \ + $(libdir)/$(SLIBNAME) $(LDCONFIG) || true endif else