configure: Use --rpath when linking dlls too.
This commit is contained in:
parent
02ff174bf1
commit
1fd32cfa13
|
@ -311,7 +311,7 @@ ac_includes_default="\
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDEXERPATH COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS MAIN_BINARY EXTRA_BINARIES LDD LIBOBJS LTLIBOBJS'
|
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS DLLDEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os WIN16_FILES WIN16_INSTALL SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN EGREP LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS FONTFORGE PKG_CONFIG PRELINK LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS XML2LIBS XML2INCL XSLTLIBS XSLTINCL CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS LCMSLIBS LDAPLIBS FREETYPELIBS FREETYPEINCL ft_devel ft_devel2 FONTSSUBDIRS ARTSCCONFIG ARTSLIBS ARTSINCL ESDCONFIG ESDLIBS ESDINCL ALSALIBS AUDIOIOLIBS EXTRACFLAGS BUILTINFLAG DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDEXERPATH LDDLLRPATH COREFOUNDATIONLIB IOKITLIB CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS SOCKETLIBS MAIN_BINARY EXTRA_BINARIES LDD LIBOBJS LTLIBOBJS'
|
||||||
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
|
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_IMPLIB_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
|
||||||
|
|
||||||
# Initialize some variables set by options.
|
# Initialize some variables set by options.
|
||||||
|
@ -12899,6 +12899,8 @@ echo "${ECHO_T}$ac_cv_ld_rpath" >&6
|
||||||
then
|
then
|
||||||
LDEXERPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
|
LDEXERPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"
|
||||||
|
|
||||||
|
LDDLLRPATH="-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(dlldir) \$(libdir)\`"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
|
@ -20183,6 +20185,7 @@ s,@DLLWRAP@,$DLLWRAP,;t t
|
||||||
s,@ac_ct_DLLWRAP@,$ac_ct_DLLWRAP,;t t
|
s,@ac_ct_DLLWRAP@,$ac_ct_DLLWRAP,;t t
|
||||||
s,@LDEXECFLAGS@,$LDEXECFLAGS,;t t
|
s,@LDEXECFLAGS@,$LDEXECFLAGS,;t t
|
||||||
s,@LDEXERPATH@,$LDEXERPATH,;t t
|
s,@LDEXERPATH@,$LDEXERPATH,;t t
|
||||||
|
s,@LDDLLRPATH@,$LDDLLRPATH,;t t
|
||||||
s,@COREFOUNDATIONLIB@,$COREFOUNDATIONLIB,;t t
|
s,@COREFOUNDATIONLIB@,$COREFOUNDATIONLIB,;t t
|
||||||
s,@IOKITLIB@,$IOKITLIB,;t t
|
s,@IOKITLIB@,$IOKITLIB,;t t
|
||||||
s,@CROSSTEST@,$CROSSTEST,;t t
|
s,@CROSSTEST@,$CROSSTEST,;t t
|
||||||
|
|
|
@ -997,6 +997,7 @@ case $host_os in
|
||||||
if test "$ac_cv_ld_rpath" = "yes"
|
if test "$ac_cv_ld_rpath" = "yes"
|
||||||
then
|
then
|
||||||
AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
|
AC_SUBST(LDEXERPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(bindir) \$(libdir)\`"])
|
||||||
|
AC_SUBST(LDDLLRPATH,["-Wl,--rpath,\\\$\$ORIGIN/\`\$(RELPATH) \$(dlldir) \$(libdir)\`"])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
|
|
|
@ -13,6 +13,7 @@ DLLDEFS = @DLLDEFS@
|
||||||
DLLFLAGS = @DLLFLAGS@
|
DLLFLAGS = @DLLFLAGS@
|
||||||
DLLEXT = @DLLEXT@
|
DLLEXT = @DLLEXT@
|
||||||
IMPLIBEXT = @IMPLIBEXT@
|
IMPLIBEXT = @IMPLIBEXT@
|
||||||
|
LDRPATH = @LDDLLRPATH@
|
||||||
DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS)
|
DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS)
|
||||||
BASEMODULE = $(MODULE:%.dll=%)
|
BASEMODULE = $(MODULE:%.dll=%)
|
||||||
MAINSPEC = $(BASEMODULE).spec
|
MAINSPEC = $(BASEMODULE).spec
|
||||||
|
@ -32,7 +33,7 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS)
|
||||||
# Rules for .so files
|
# Rules for .so files
|
||||||
|
|
||||||
$(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in
|
$(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in
|
||||||
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) -o $@ -L$(DLLDIR) $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
|
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) $(LDRPATH) -o $@ -L$(DLLDIR) $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
|
||||||
|
|
||||||
# Rules for .dll files
|
# Rules for .dll files
|
||||||
|
|
||||||
|
|
|
@ -26,19 +26,19 @@ all: $(WINE_BINARIES) $(MODULE) $(MANPAGES)
|
||||||
|
|
||||||
LIBPTHREAD = @LIBPTHREAD@
|
LIBPTHREAD = @LIBPTHREAD@
|
||||||
LDEXECFLAGS = @LDEXECFLAGS@
|
LDEXECFLAGS = @LDEXECFLAGS@
|
||||||
LDEXERPATH = @LDEXERPATH@
|
LDRPATH = @LDEXERPATH@
|
||||||
|
|
||||||
wine-glibc: glibc.o Makefile.in
|
wine-glibc: glibc.o Makefile.in
|
||||||
$(CC) -o $@ glibc.o $(LDEXERPATH) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
|
$(CC) -o $@ glibc.o $(LDRPATH) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
|
||||||
|
|
||||||
wine-preloader: preloader.o Makefile.in
|
wine-preloader: preloader.o Makefile.in
|
||||||
$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
|
$(CC) -o $@ -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o $(LIBPORT) $(LDFLAGS)
|
||||||
|
|
||||||
wine-kthread: $(KTHREAD_OBJS) Makefile.in
|
wine-kthread: $(KTHREAD_OBJS) Makefile.in
|
||||||
$(CC) -o $@ $(LDEXECFLAGS) $(LDEXERPATH) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
|
$(CC) -o $@ $(LDEXECFLAGS) $(LDRPATH) $(KTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(EXTRALIBS) $(LDFLAGS)
|
||||||
|
|
||||||
wine-pthread: $(PTHREAD_OBJS) Makefile.in
|
wine-pthread: $(PTHREAD_OBJS) Makefile.in
|
||||||
$(CC) -o $@ $(LDEXECFLAGS) $(LDEXERPATH) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
|
$(CC) -o $@ $(LDEXECFLAGS) $(LDRPATH) $(PTHREAD_OBJS) $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS)
|
||||||
|
|
||||||
$(MODULE): $(MAIN_BINARY)
|
$(MODULE): $(MAIN_BINARY)
|
||||||
$(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
|
$(RM) $(MODULE) && $(LN_S) $(MAIN_BINARY) $(MODULE)
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
DLLDEFS = @DLLDEFS@
|
DLLDEFS = @DLLDEFS@
|
||||||
DLLFLAGS = @DLLFLAGS@
|
DLLFLAGS = @DLLFLAGS@
|
||||||
|
LDRPATH = @LDDLLRPATH@
|
||||||
DEFS = $(DLLDEFS) $(EXTRADEFS)
|
DEFS = $(DLLDEFS) $(EXTRADEFS)
|
||||||
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
|
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
|
||||||
ALL_LIBS = $(ALL_IMPORTS:%=-l%) -L$(LIBDIR) -lwine $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
|
ALL_LIBS = $(ALL_IMPORTS:%=-l%) -L$(LIBDIR) -lwine $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
|
||||||
|
@ -24,7 +25,7 @@ all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)
|
||||||
# Rules for .so main module
|
# Rules for .so main module
|
||||||
|
|
||||||
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
|
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
|
||||||
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ -L$(DLLDIR) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
|
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LDRPATH) -L$(DLLDIR) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
|
||||||
|
|
||||||
$(BASEMODULE): $(WINEWRAPPER)
|
$(BASEMODULE): $(WINEWRAPPER)
|
||||||
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
|
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
|
||||||
|
|
Loading…
Reference in New Issue