[Ffmpeg-devel] [patch] make SONAME encoding optional

Jacob Meuser jakemsr
Sun Dec 18 02:49:21 CET 2005


the SONAME stuff is wrong for OpenBSD.  SONAMES should have both major
and minor numbers there.  but in general, SONAMES aren't used in OpenBSD.

patch below adds a --disable-sonames option to disable SONAME encoding.

I figure this is more flexible than adding OS specific stuff.

the patch also changes the libpostproc Makefile to use LIBVERSION
in SHFLAGS like the other library Makefiles do.

-- 
<jakemsr at jakemsr.com>

Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.220
diff -u -r1.220 configure
--- configure	17 Dec 2005 18:14:25 -0000	1.220
+++ configure	18 Dec 2005 01:38:27 -0000
@@ -79,6 +79,7 @@
 echo "  --enable-small           optimize for size instead of speed"
 echo "  --enable-memalign-hack   emulate memalign, interferes with memory debuggers"
 echo "  --disable-strip          disable stripping of executables and shared libraries"
+echo "  --disable-sonames        disable encoding SONAME into shared libraries"
 echo "  --enable-codec=CODEC     enables CODEC"
 echo "  --disable-codec=CODEC    disables CODEC"
 echo "  --disable-encoders       disables all encoders"
@@ -205,6 +206,7 @@
 optimize="yes"
 debug="yes"
 dostrip="yes"
+dosonames="yes"
 installstrip="-s"
 extralibs="-lm"
 simpleidct="yes"
@@ -215,7 +217,6 @@
 dlfcn="no"
 dlopen="no"
 mpegaudio_hp="yes"
-SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)'
 netserver="no"
 need_inet_aton="no"
 ffserver="yes"
@@ -568,6 +569,8 @@
   ;;
   --disable-strip) dostrip="no"
   ;;
+  --disable-sonames) dosonames="no"
+  ;;
   --enable-codec=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-codec=}"
   ;;
   --disable-codec=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-codec=}##\"`"
@@ -1244,6 +1247,7 @@
 echo "pp support       $pp"
 echo "debug symbols    $debug"
 echo "strip symbols    $dostrip"
+echo "use SONAME       $dosonames"
 echo "optimize         $optimize"
 echo "shared pp        $shared_pp"
 echo "video hooking    $vhook"
@@ -1295,6 +1299,13 @@
 echo "STRIP=echo ignoring strip" >> config.mak
 echo "INSTALLSTRIP=" >> config.mak
 fi
+if test -z "$SHFLAGS" ; then
+  if test "$dosonames" = "yes" ; then
+  SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)'
+  else
+  SHFLAGS="-shared"
+  fi
+fi
 
 # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when building
 # shared modules on OS/X (vhook/Makefile).
Index: libavcodec/libpostproc/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/libpostproc/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- libavcodec/libpostproc/Makefile	26 Sep 2005 10:05:13 -0000	1.26
+++ libavcodec/libpostproc/Makefile	18 Dec 2005 01:38:28 -0000
@@ -12,7 +12,7 @@
 else
 SPPLIBMAJOR = $(SPPLIBNAME).$(SPPMAJOR)
 SPPLIB = $(SPPLIBNAME).$(SPPVERSION)
-SHFLAGS = -shared -Wl,-soname,$(SPPLIB)
+LIBVERSION = $(SPPLIB)
 endif
 endif
 PPLIB = $(LIBPREF)postproc$(LIBSUF)





More information about the ffmpeg-devel mailing list