Link with libdl only where needed.

This commit is contained in:
Alexandre Julliard 2001-12-31 22:28:35 +00:00
parent 8ae5761dd0
commit 562089b5d6
3 changed files with 261 additions and 255 deletions

509
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -113,11 +113,13 @@ AC_CHECK_FUNCS(openpty,,
LIBS="$LIBS -lutil"]
)])
DLLIBS=""
AC_SUBST(DLLIBS)
AC_CHECK_HEADERS(dlfcn.h,
[AC_CHECK_FUNCS(dlopen,,
[AC_CHECK_LIB(dl,dlopen,
[AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
LIBS="$LIBS -ldl"],
DLLIBS="-ldl"],
LIBEXT="a")]
)],
LIBEXT="a"

View File

@ -7,6 +7,7 @@ LIBEXT = @LIBEXT@
MODULE = none
SOVERSION = 1.0
SONAME = libwine.so
EXTRALIBS = @DLLIBS@
C_SRCS = \
debug.c \
@ -20,7 +21,7 @@ all: libwine.$(LIBEXT)
@MAKE_RULES@
libwine.so.$(SOVERSION): $(OBJS)
$(LDSHARED) $(OBJS) $(LIBS) -o $@
$(LDSHARED) $(OBJS) $(EXTRALIBS) $(LIBS) -o $@
libwine.so: libwine.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@