While browsing through Debian's bug database on the wine package (for
fun), I happened to come across a user report which seemed to suggest what
the Real Solution (tm) (R) (patent pending) to the long-lasting "libxxx.so
residing in /usr/lib/wine not found" problem would be... so I decided to
try that and see if it works. And it did.
This simple patch to our build system will install the .so files into
$prefix/lib/wine directory, and make all .so dependencies be resolved
correctly, the Right Way (patent definitely pending), without having to
add the $prefix/lib/wine directory to neither ld.so.conf nor
LD_LIBRARY_PATH... it's just a matter of using the -rpath link-time option
for something sensible.
With this, now even RPM packagers can get things right for a change!
But can I just submit this, or perhaps someone even better at autoconf
than me ought to also try to add a --dlldir configure option first?
Index: wine/configure.in
===================================================================
RCS file: /home/wine/wine/configure.in,v
retrieving revision 1.152
diff -u -r1.152 configure.in
--- wine/configure.in 2000/09/06 19:46:59 1.152
+++ wine/configure.in 2000/09/17 03:06:17
@@ -503,7 +503,7 @@
])
if test "$ac_cv_c_dll_linux" = "yes"
then
- LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(libdir)"
+ LDSHARED="\$(CC) -shared -Wl,-soname,\$(SONAME),-rpath,\$(dlldir)"
else
AC_CACHE_CHECK(whether we can build a UnixWare (Solaris) dll,
ac_cv_c_dll_unixware,
@@ -514,7 +514,7 @@
])
if test "$ac_cv_c_dll_unixware" = "yes"
then
- LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/\$(SONAME)"
+ LDSHARED="\$(CC) -Wl,-G,-h,\$(dlldir)/\$(SONAME)"
else
AC_CACHE_CHECK("whether we can build a NetBSD dll",
ac_cv_c_dll_netbsd,
@@ -1182,7 +1194,7 @@
if test "$wine_cv_opengl_version_threadsafe" = "yes" -a $OPENGL = "yes"
then
echo
- echo "*** Warning: you explicitely linked in a thread-safe OpenGL version. If you"
+ echo "*** Warning: you explicitly linked in a thread-safe OpenGL version. If you"
echo "*** experience unusual crashes on DirectDraw games, try first to disable
OpenGL"
echo "*** support before reporting bugs."
fi
Index: wine/Make.rules.in
===================================================================
RCS file: /home/wine/wine/Make.rules.in,v
retrieving revision 1.63
diff -u -r1.63 Make.rules.in
--- wine/Make.rules.in 2000/08/08 01:24:00 1.63
+++ wine/Make.rules.in 2000/09/17 03:06:17
@@ -71,6 +71,7 @@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
+dlldir = @libdir@/wine
infodir = @infodir@
mandir = @mandir@
prog_manext = 1
Index: wine/dlls/Makedll.rules.in
===================================================================
RCS file: /home/wine/wine/dlls/Makedll.rules.in,v
retrieving revision 1.6
diff -u -r1.6 Makedll.rules.in
--- wine/dlls/Makedll.rules.in 2000/08/03 00:04:24 1.6
+++ wine/dlls/Makedll.rules.in 2000/09/17 03:06:17
@@ -50,18 +50,18 @@
.PHONY: install_so install_a
install_so: lib$(MODULE).so.$(SOVERSION)
- [ -d $(libdir) ] || $(MKDIR) $(libdir)
- $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION)
$(libdir)/lib$(MODULE).so.$(SOVERSION)
- cd $(libdir) && for i in $(ALLNAMES); do $(RM) $$i && $(LN_S)
lib$(MODULE).so.$(SOVERSION) $$i; done
+ [ -d $(dlldir) ] || $(MKDIR) $(dlldir)
+ $(INSTALL_PROGRAM) lib$(MODULE).so.$(SOVERSION)
+$(dlldir)/lib$(MODULE).so.$(SOVERSION)
+ cd $(dlldir) && for i in $(ALLNAMES); do $(RM) $$i && $(LN_S)
+lib$(MODULE).so.$(SOVERSION) $$i; done
install_a: lib$(MODULE).a
- [ -d $(libdir) ] || $(MKDIR) $(libdir)
- $(INSTALL_DATA) lib$(MODULE).a $(libdir)/lib$(MODULE).a
+ [ -d $(dlldir) ] || $(MKDIR) $(dlldir)
+ $(INSTALL_DATA) lib$(MODULE).a $(dlldir)/lib$(MODULE).a
install:: $(LIBEXT:%=install_%)
uninstall::
- cd $(libdir) && $(RM) $(ALLNAMES) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).a
+ cd $(dlldir) && $(RM) $(ALLNAMES) lib$(MODULE).so.$(SOVERSION) lib$(MODULE).a
clean::
$(RM) lib$(MODULE).so.$(SOVERSION)