Link with libdl only where needed.
This commit is contained in:
parent
8ae5761dd0
commit
562089b5d6
|
@ -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"
|
||||
|
|
|
@ -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) $@
|
||||
|
|
Loading…
Reference in New Issue