From 32123f5a602dd3b581e46aead900f31257f0e163 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 19 May 2014 11:48:47 +0300 Subject: libw32dll linker fix libw32dll on NetBSD uses i386_set_ldt. This function lives in libi386.so, so this needs to be linked. For this reason, lhe attached patches test for i386_set_ldt in libi386 and add it to the linker command line if found. --- configure.ac | 4 ++++ src/libw32dll/wine/Makefile.am | 2 ++ 2 files changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 214a5c4b8..7a5038778 100644 --- a/configure.ac +++ b/configure.ac @@ -272,6 +272,10 @@ AC_CHECK_LIB([nsl], [gethostbyname], [NET_LIBS="-lnsl $NET_LIBS"]) AC_CHECK_LIB([resolv], [hstrerror], [NET_LIBS="-lresolv $NET_LIBS"]) AC_SUBST(NET_LIBS) +WINE_LIBS="" +AC_CHECK_LIB(i386, i386_set_ldt, WINE_LIBS="-li386 $WINE_LIBS",) +AC_SUBST(WINE_LIBS) + AC_CHECK_LIB([rt], [clock_getres], [RT_LIBS="-lrt" AC_DEFINE(HAVE_POSIX_TIMERS, 1, [Define this if you have POSIX timers.])], diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index a3aeb5684..a09ee27e9 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -51,6 +51,8 @@ noinst_HEADERS = \ noinst_LTLIBRARIES = libwine.la +libwine_la_LIBADD = ${WINE_LIBS} + libwine_la_SOURCES = \ afl.c \ driver.c \ -- cgit v1.2.3