[SCM] libav/experimental: Create shared libraries using versioned filenames and add -rpath-link to LDFLAGS so linker finds them when using --as-needed (which is default in some installations). Using --as-needed is generally a good thing, so add that explicitly as well.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:47:41 UTC 2013
The following commit has been merged in the experimental branch:
commit baa3a937815c8bcd47b84cd4a3b450705197b27a
Author: Måns Rullgård <mans at mansr.com>
Date: Thu May 11 20:36:00 2006 +0000
Create shared libraries using versioned filenames and add -rpath-link
to LDFLAGS so linker finds them when using --as-needed (which is default
in some installations). Using --as-needed is generally a good thing, so
add that explicitly as well.
Originally committed as revision 5362 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/common.mak b/common.mak
index 24ccaed..94272c5 100644
--- a/common.mak
+++ b/common.mak
@@ -31,7 +31,10 @@ $(LIB): $(STATIC_OBJS)
$(AR) rc $@ $^ $(EXTRAOBJS)
$(RANLIB) $@
-$(SLIBNAME): $(SHARED_OBJS)
+$(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
+ ln -sf $^ $@
+
+$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
ifeq ($(CONFIG_WIN32),yes)
-lib /machine:i386 /def:$(@:.dll=.def)
diff --git a/configure b/configure
index 4ff62c7..f2b8bac 100755
--- a/configure
+++ b/configure
@@ -228,7 +228,7 @@ vhook="default"
dlfcn="no"
dlopen="no"
mpegaudio_hp="yes"
-SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)'
+SHFLAGS='-shared -Wl,-soname,$@'
netserver="no"
need_inet_aton="no"
protocols="yes"
@@ -383,7 +383,7 @@ cygwin="yes"
EXESUF=".exe"
;;
Linux)
-LDFLAGS="$LDFLAGS -rdynamic"
+LDFLAGS="$LDFLAGS -rdynamic -Wl,--as-needed -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil"
;;
IRIX*)
ranlib="echo ignoring ranlib"
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list