From 624bcd314c3047bcfddd0db144cbaa32df1f9c0e Mon Sep 17 00:00:00 2001 From: Naveen Narayanan Date: Mon, 2 Sep 2019 04:16:28 +0200 Subject: [PATCH] libwine: Only link libi386 with the libraries that need it. In particular it does not make sense to link executables and dlls built with MinGW with it. Signed-off-by: Francois Gouget Signed-off-by: Alexandre Julliard --- configure | 10 ++++------ configure.ac | 2 +- include/config.h.in | 3 --- libs/wine/Makefile.in | 3 ++- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/configure b/configure index e374edfdc5d..a52e346b685 100755 --- a/configure +++ b/configure @@ -752,6 +752,7 @@ LDRPATH_INSTALL DLLFLAGS CPP OPENGL_LIBS +I386_LIBS ICOTOOL CONVERT RSVG @@ -6857,11 +6858,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_i386_i386_set_ldt" >&5 $as_echo "$ac_cv_lib_i386_i386_set_ldt" >&6; } if test "x$ac_cv_lib_i386_i386_set_ldt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBI386 1 -_ACEOF - - LIBS="-li386 $LIBS" + I386_LIBS="-li386" fi @@ -19770,7 +19767,8 @@ ac_config_commands="$ac_config_commands include/stamp-h" $as_echo_n "creating Makefile rules..." >&6 -ALL_VARS_RULES="OPENGL_LIBS = $OPENGL_LIBS +ALL_VARS_RULES="I386_LIBS = $I386_LIBS +OPENGL_LIBS = $OPENGL_LIBS COREFOUNDATION_LIBS = $COREFOUNDATION_LIBS IOKIT_LIBS = $IOKIT_LIBS FORCEFEEDBACK_LIBS = $FORCEFEEDBACK_LIBS diff --git a/configure.ac b/configure.ac index ff81a172f9b..1592812bf7f 100644 --- a/configure.ac +++ b/configure.ac @@ -409,7 +409,7 @@ WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false], dnl **** Check for some libraries **** dnl Check for -li386 for NetBSD and OpenBSD -AC_CHECK_LIB(i386,i386_set_ldt) +AC_CHECK_LIB(i386,i386_set_ldt,[AC_SUBST(I386_LIBS, "-li386")]) AC_SUBST(OPENGL_LIBS,"") diff --git a/include/config.h.in b/include/config.h.in index 791e3a64933..924e11eac01 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -398,9 +398,6 @@ /* Define to 1 if you have the `gettextpo' library (-lgettextpo). */ #undef HAVE_LIBGETTEXTPO -/* Define to 1 if you have the `i386' library (-li386). */ -#undef HAVE_LIBI386 - /* Define to 1 if you have the `kstat' library (-lkstat). */ #undef HAVE_LIBKSTAT diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 789d09a2185..f7dd34b058d 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -1,4 +1,5 @@ -EXTRALIBS = $(DL_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) +EXTRALIBS = $(DL_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(I386_LIBS) + C_SRCS = \ config.c \