[patch] Search for libresid-builder.so instead of libresid-builder.la

Summarizing:

- libsidplay2 doesn't use libtool (libltdl), therefore libsidplay2 doesn't need libtool archives (.la) files for loading any plugins

- libresid-builder doesn't link against anything else than the C library

Therefore it doesn't make sense at all to install libtool files (.la) with the libsidplay2 package. So distributions don't even package the .la files from libsidplay2, and if they do, it's a mistake (bug).

And therefore it doesn't make any sense for moc to search for libresid-builder.la files from decoder_plugins/sidplay2/sidplay2.m4. It should simply search libresid-builder.so files since those are actually required for linking (-lresid-builder).

And yes I know that moc is using libtool's libltdl and for moc it actually makes sense to install the .la files with the package for the loader. But that's entirely different issue.
As in, moc should install .la files BUT libsidplay2 shouldn't!

This simple patch will take care of the problem, it was also reported here http://bugs.gentoo.org/416619

--- decoder_plugins/sidplay2/sidplay2.m4
+++ decoder_plugins/sidplay2/sidplay2.m4
@@ -19,10 +19,10 @@
if test "x$sidutils_OK" = "xyes"; then
s2lib=`$PKG_CONFIG --variable=libdir libsidplay2 2>/dev/null`
resid_OK="no"
- AC_CHECK_FILE([$s2lib/libresid-builder.la],
- [resid_lib="$s2lib/libresid-builder.la"
+ AC_CHECK_FILE([$s2lib/libresid-builder.so],
+ [resid_lib="$s2lib/libresid-builder.so"
resid_OK="yes"],
- [resid_lib="$s2lib/sidplay/builders/libresid-builder.la"
+ [resid_lib="$s2lib/sidplay/builders/libresid-builder.so"
AC_CHECK_FILE($resid_lib, [resid_OK="yes"],)])
if test "x$resid_OK" = "xyes"; then
sidplay2_LDFLAGS="$resid_lib"

If you want to read more about useless .la files, here is some very nice posts:

http://blog.flameeyes.eu/2008/04/what-about-those-la-files
http://blog.flameeyes.eu/2010/10/libtool-archives-and-their-pointless-points
http://blog.flameeyes.eu/2010/01/more-pointless-la-files
http://blog.flameeyes.eu/2009/09/removing-la-files-for-dum-w-uncertain-people
http://blog.flameeyes.eu/2009/07/identifying-pointless-la-files-for-plugins (this one is in particular matching moc :-)

Because the forums doesn't allow attaching files, here is the direct link to the patch:

https://bugs.gentoo.org/attachment.cgi?id=312445

or

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/moc/files/moc-libresid-builder.so_not_la.patch?view=log

Thank for doing that research, ssuominen. It is a known issue
for which a patch is already in the pipeline.

And that patch has now been committed to SVN as r2441.