build: Force order of library installation
[profile/ivi/pulseaudio-panda.git] / src / Makefile.am
index fe7794b..39e9522 100644 (file)
@@ -762,7 +762,8 @@ libpulse_mainloop_glib_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version
 ###################################
 
 if HAVE_OSS_WRAPPER
-pkglib_LTLIBRARIES += libpulsedsp.la
+padsplibdir = $(pkglibdir)
+padsplib_LTLIBRARIES = libpulsedsp.la
 bin_SCRIPTS += utils/padsp
 
 edit = @sed \
@@ -1991,4 +1992,23 @@ update-map-file:
 
 update-all: update-ffmpeg update-sbc update-map-file
 
+# Force installation order of libraries. libtool relinks on install time, in
+# which case libpulsecommon has to be install before others, but the padsp
+# preload library has to be done after the normal libraries (e.g. libpulse)
+# ...
+# Unfortunately automake behaviour means that rules without commands also
+# override build-in rules, so it's not trivial to add dependencies.
+# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328 for the workaround
+# ...
+# Isn't libtool/autotools fun!
+
+installlibLTLIBRARIES = install-libLTLIBRARIES
+$(installlibLTLIBRARIES): install-pkglibLTLIBRARIES
+
+installmodlibexecLTLIBRARIES = install-modlibexecLTLIBRARIES
+$(installmodlibexecLTLIBRARIES): install-pkglibLTLIBRARIES
+
+installpadsplibLTLIBRARIES = install-padsplibLTLIBRARIES
+$(installpadsplibLTLIBRARIES): install-libLTLIBRARIES
+
 .PHONY: utils/padsp massif update-all update-ffmpeg update-sbc update-map-file