[Ffmpeg-devel] [patch] ldconfig as config.mak variable

Jacob Meuser jakemsr
Sun May 15 02:07:33 CEST 2005


On OpenBSD, calling 'ldconfig' rebuilds the hinst file, but with only
the libraries in /usr/lib (which kills gmake, and the build process
immediately).  The preferred way to add new libraries to ld's cache is
with 'ldconfig -m $dir'.

The attached patch introduces an LDCONFIG variable to configure and
config.mak, which defaults to 'ldconfig', and replaces the 'ldconfig'
calls in the Makefiles with $(LDCONFIG).  And for OpenBSD, LDCONFIG
is set to 'ldconfig -m \$(libdir)'.

-- 
<jakemsr at jakemsr.com>
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.178
diff -u -r1.178 configure
--- configure	10 May 2005 08:30:36 -0000	1.178
+++ configure	11 May 2005 07:43:08 -0000
@@ -195,6 +195,7 @@
 ffplay="yes"
 LDFLAGS=-Wl,--warn-common
 FFSLDFLAGS=-Wl,-E
+LDCONFIG="ldconfig"
 LIBPREF="lib"
 LIBSUF=".a"
 SLIBPREF="lib"
@@ -271,6 +272,7 @@
 make="gmake"
 CFLAGS="$CFLAGS \$(PIC)"
 LDFLAGS="$LDFLAGS -export-dynamic -pthread"
+LDCONFIG="ldconfig -m \$(libdir)"
 extralibs="$extralibs -lossaudio"
 ;;
 FreeBSD)
@@ -1201,6 +1203,7 @@
 echo "OPTFLAGS=$CFLAGS" >> config.mak
 echo "SHCFLAGS=$SHCFLAGS">>config.mak
 echo "LDFLAGS=$LDFLAGS" >> config.mak
+echo "LDCONFIG=$LDCONFIG" >> config.mak
 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
 echo "BUILDSUF=$BUILDSUF" >> config.mak
Index: libavcodec/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.186
diff -u -r1.186 Makefile
--- libavcodec/Makefile	10 May 2005 21:02:20 -0000	1.186
+++ libavcodec/Makefile	11 May 2005 07:43:08 -0000
@@ -454,7 +454,7 @@
 	install -d $(libdir)
 	install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavcodec-$(VERSION).so
 	ln -sf libavcodec-$(VERSION).so $(libdir)/libavcodec.so
-	ldconfig || true
+	$(LDCONFIG) || true
 endif
 ifeq ($(CONFIG_PP),yes)
 	$(MAKE) -C libpostproc $@
Index: libavcodec/libpostproc/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/libpostproc/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- libavcodec/libpostproc/Makefile	23 Mar 2005 14:10:22 -0000	1.21
+++ libavcodec/libpostproc/Makefile	11 May 2005 07:43:15 -0000
@@ -57,7 +57,7 @@
 	install -d $(libdir)
 	install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
 	ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
-	ldconfig || true
+	$(LDCONFIG) || true
 endif
 endif
 	mkdir -p $(prefix)/include/postproc
Index: libavformat/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v
retrieving revision 1.87
diff -u -r1.87 Makefile
--- libavformat/Makefile	8 May 2005 15:04:59 -0000	1.87
+++ libavformat/Makefile	11 May 2005 07:43:15 -0000
@@ -111,7 +111,7 @@
 	install -d $(libdir)
 	install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
 	ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
-	ldconfig || true
+	$(LDCONFIG) || true
 endif
 else
 install:



More information about the ffmpeg-devel mailing list