dlfcn="no"
dlopen="no"
mpegaudio_hp="yes"
-SHFLAGS=-shared
+SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)'
netserver="no"
need_inet_aton="no"
ffserver="yes"
echo "BUILD_VHOOK=yes" >> config.mak
echo "#define HAVE_VHOOK 1" >> $TMPH
fi
+
+lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
+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'`
+
+
+
if test "$lshared" = "yes" ; then
echo "BUILD_SHARED=yes" >> config.mak
echo "PIC=-fPIC -DPIC" >> config.mak
- echo "SPPMAJOR=0" >> config.mak
- echo "SPPVERSION=0.0.1" >> config.mak
+ echo "SPPMAJOR=${lavc_version/.*/}" >> config.mak
+ echo "SPPVERSION=$lavc_version" >> config.mak
+ echo "LAVCMAJOR=${lavc_version/.*/}" >> config.mak
+ echo "LAVCVERSION=$lavc_version" >> config.mak
+ echo "LAVFMAJOR=${lavf_version/.*/}" >> config.mak
+ echo "LAVFVERSION=$lavf_version" >> config.mak
+ echo "LAVUMAJOR=${lavu_version/.*/}" >> config.mak
+ echo "LAVUVERSION=$lavu_version" >> config.mak
fi
echo "EXTRALIBS=$extralibs" >> config.mak
version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
# build pkg-config files libav*.pc and libpostproc.pc
-lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
-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'`
-
# libavutil.pc
cat <<EOF >libavutil.pc
prefix=$prefix
$(CC) -o $@ $^ $(LIBAVUTIL) -lm
ifeq ($(BUILD_SHARED),yes)
+LIBVERSION=$(LAVCMAJOR)
install: all install-headers
ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
LIB= $(LIBPREF)avformat$(LIBSUF)
ifeq ($(BUILD_SHARED),yes)
+LIBVERSION=$(LAVFMAJOR)
SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
ifeq ($(CONFIG_DARWIN),yes)
LIB= $(LIBPREF)avutil$(LIBSUF)
ifeq ($(BUILD_SHARED),yes)
+LIBVERSION=$(LAVUMAJOR)
SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
ifeq ($(CONFIG_DARWIN),yes)
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)