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"]
|
LIBS="$LIBS -lutil"]
|
||||||
)])
|
)])
|
||||||
|
|
||||||
|
DLLIBS=""
|
||||||
|
AC_SUBST(DLLIBS)
|
||||||
AC_CHECK_HEADERS(dlfcn.h,
|
AC_CHECK_HEADERS(dlfcn.h,
|
||||||
[AC_CHECK_FUNCS(dlopen,,
|
[AC_CHECK_FUNCS(dlopen,,
|
||||||
[AC_CHECK_LIB(dl,dlopen,
|
[AC_CHECK_LIB(dl,dlopen,
|
||||||
[AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
|
[AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
|
||||||
LIBS="$LIBS -ldl"],
|
DLLIBS="-ldl"],
|
||||||
LIBEXT="a")]
|
LIBEXT="a")]
|
||||||
)],
|
)],
|
||||||
LIBEXT="a"
|
LIBEXT="a"
|
||||||
|
|
|
@ -7,6 +7,7 @@ LIBEXT = @LIBEXT@
|
||||||
MODULE = none
|
MODULE = none
|
||||||
SOVERSION = 1.0
|
SOVERSION = 1.0
|
||||||
SONAME = libwine.so
|
SONAME = libwine.so
|
||||||
|
EXTRALIBS = @DLLIBS@
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
debug.c \
|
debug.c \
|
||||||
|
@ -20,7 +21,7 @@ all: libwine.$(LIBEXT)
|
||||||
@MAKE_RULES@
|
@MAKE_RULES@
|
||||||
|
|
||||||
libwine.so.$(SOVERSION): $(OBJS)
|
libwine.so.$(SOVERSION): $(OBJS)
|
||||||
$(LDSHARED) $(OBJS) $(LIBS) -o $@
|
$(LDSHARED) $(OBJS) $(EXTRALIBS) $(LIBS) -o $@
|
||||||
|
|
||||||
libwine.so: libwine.so.$(SOVERSION)
|
libwine.so: libwine.so.$(SOVERSION)
|
||||||
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
|
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
|
||||||
|
|
Loading…
Reference in New Issue