diff --git a/Makefile.in b/Makefile.in index a219ffebbb1..5929a8158e8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -271,7 +271,8 @@ llib-lwine.ln : $(LIBLINTS) $(X11LINTS) libwine.so.1.0: $(LIBOBJS) $(X11OBJS) $(LDSHARED) -o$@ $(LIBOBJS) $(X11OBJS) $(LDOPTIONS) - ln -sf $@ libwine.so + $(RM) libwine.so + $(LN_S) $@ libwine.so install_emu: install_lib [ -d $(bindir) ] || $(MKDIR) $(bindir) @@ -285,8 +286,12 @@ install_lib: dummy [ -d $(libdir) ] || $(MKDIR) $(libdir) if [ -f wine.sym ]; then $(INSTALL_DATA) wine.sym $(libdir)/wine.sym; fi if [ $(LIB_TARGET) ]; then \ - $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \ - if [ $(LIB_TARGET) = libwine.so.1.0 ]; then $(LDCONFIG); fi \ + if [ $(LIB_TARGET) = libwine.so.1.0 ]; then \ + $(INSTALL_PROGRAM) $(LIB_TARGET) $(libdir); \ + $(LDCONFIG) || (cd $(libdir) ; $(RM) libwine.so ; $(LN_S) $(LIB_TARGET) libwine.so) ; \ + else \ + $(INSTALL_DATA) $(LIB_TARGET) $(libdir); \ + fi \ fi [ -d $(bindir) ] || $(MKDIR) $(bindir) $(INSTALL_PROGRAM) server/wineserver $(bindir)/wineserver diff --git a/configure b/configure index 884a0acaccf..5928e36d606 100755 --- a/configure +++ b/configure @@ -4119,7 +4119,7 @@ echo "$ac_t""$ac_cv_c_dll_linux" 1>&6 then BUILDFLAGS="-pic" DLLFLAGS="-fPIC" - LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so" + LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so,-rpath,\$(libdir)" else echo $ac_n "checking "whether we can build a UnixWare dll"""... $ac_c" 1>&6 echo "configure:4126: checking "whether we can build a UnixWare dll"" >&5 @@ -4155,7 +4155,7 @@ echo "$ac_t""$ac_cv_c_dll_unixware" 1>&6 then BUILDFLAGS="-pic" DLLFLAGS="-fPIC" - LDSHARED="\$(CC) -Wl,-G,-h,/usr/local/lib/libwine.so" + LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/libwine.so" else echo $ac_n "checking "whether we can build a NetBSD dll"""... $ac_c" 1>&6 echo "configure:4162: checking "whether we can build a NetBSD dll"" >&5 diff --git a/configure.in b/configure.in index d6e82f56d1a..4eea334842c 100644 --- a/configure.in +++ b/configure.in @@ -356,7 +356,7 @@ then then BUILDFLAGS="-pic" DLLFLAGS="-fPIC" - LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so" + LDSHARED="\$(CC) -shared -Wl,-soname,libwine.so,-rpath,\$(libdir)" else AC_CACHE_CHECK("whether we can build a UnixWare dll", ac_cv_c_dll_unixware, @@ -369,7 +369,7 @@ then then BUILDFLAGS="-pic" DLLFLAGS="-fPIC" - LDSHARED="\$(CC) -Wl,-G,-h,/usr/local/lib/libwine.so" + LDSHARED="\$(CC) -Wl,-G,-h,\$(libdir)/libwine.so" else AC_CACHE_CHECK("whether we can build a NetBSD dll", ac_cv_c_dll_netbsd,