Commit 149e03c7 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Add -ldl to default libs if necessary.

parent ac531be9
...@@ -629,7 +629,6 @@ LDAP_LIBS ...@@ -629,7 +629,6 @@ LDAP_LIBS
LDAP_CFLAGS LDAP_CFLAGS
RT_LIBS RT_LIBS
POLL_LIBS POLL_LIBS
DL_LIBS
TOOLSEXT TOOLSEXT
MSVCRTFLAGS MSVCRTFLAGS
EXCESS_PRECISION_CFLAGS EXCESS_PRECISION_CFLAGS
...@@ -17789,7 +17788,6 @@ for ac_func in \ ...@@ -17789,7 +17788,6 @@ for ac_func in \
__res_get_state \ __res_get_state \
__res_getservers \ __res_getservers \
_spawnvp \ _spawnvp \
dlopen \
epoll_create \ epoll_create \
ffs \ ffs \
finitef \ finitef \
...@@ -17847,15 +17845,12 @@ done ...@@ -17847,15 +17845,12 @@ done
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
if test "$ac_cv_func_dlopen" = no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
then $as_echo_n "checking for library containing dlopen... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 if ${ac_cv_search_dlopen+:} false; then :
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
ac_check_lib_save_LIBS=$LIBS ac_func_search_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
...@@ -17874,24 +17869,38 @@ return dlopen (); ...@@ -17874,24 +17869,38 @@ return dlopen ();
return 0; return 0;
} }
_ACEOF _ACEOF
if ac_fn_c_try_link "$LINENO"; then : for ac_lib in '' dl; do
ac_cv_lib_dl_dlopen=yes if test -z "$ac_lib"; then
else ac_res="none required"
ac_cv_lib_dl_dlopen=no else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_dlopen=$ac_res
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext
LIBS=$ac_check_lib_save_LIBS if ${ac_cv_search_dlopen+:} false; then :
break
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 done
$as_echo "$ac_cv_lib_dl_dlopen" >&6; } if ${ac_cv_search_dlopen+:} false; then :
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
DL_LIBS="-ldl"
else
ac_cv_search_dlopen=no
fi fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
$as_echo "$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi fi
ac_wine_check_funcs_save_LIBS="$LIBS" ac_wine_check_funcs_save_LIBS="$LIBS"
LIBS="$LIBS $DL_LIBS" LIBS="$LIBS $DL_LIBS"
for ac_func in dladdr for ac_func in dladdr
...@@ -20006,7 +20015,6 @@ NETAPI_LIBS = $NETAPI_LIBS ...@@ -20006,7 +20015,6 @@ NETAPI_LIBS = $NETAPI_LIBS
VKD3D_CFLAGS = $VKD3D_CFLAGS VKD3D_CFLAGS = $VKD3D_CFLAGS
VKD3D_LIBS = $VKD3D_LIBS VKD3D_LIBS = $VKD3D_LIBS
EXCESS_PRECISION_CFLAGS = $EXCESS_PRECISION_CFLAGS EXCESS_PRECISION_CFLAGS = $EXCESS_PRECISION_CFLAGS
DL_LIBS = $DL_LIBS
POLL_LIBS = $POLL_LIBS POLL_LIBS = $POLL_LIBS
RT_LIBS = $RT_LIBS RT_LIBS = $RT_LIBS
LDAP_CFLAGS = $LDAP_CFLAGS LDAP_CFLAGS = $LDAP_CFLAGS
......
...@@ -2132,7 +2132,6 @@ AC_CHECK_FUNCS(\ ...@@ -2132,7 +2132,6 @@ AC_CHECK_FUNCS(\
__res_get_state \ __res_get_state \
__res_getservers \ __res_getservers \
_spawnvp \ _spawnvp \
dlopen \
epoll_create \ epoll_create \
ffs \ ffs \
finitef \ finitef \
...@@ -2180,10 +2179,7 @@ AC_CHECK_FUNCS(\ ...@@ -2180,10 +2179,7 @@ AC_CHECK_FUNCS(\
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
dnl Check for -ldl dnl Check for -ldl
if test "$ac_cv_func_dlopen" = no AC_SEARCH_LIBS(dlopen, dl)
then
AC_CHECK_LIB(dl,dlopen,[AC_DEFINE(HAVE_DLOPEN,1) AC_SUBST(DL_LIBS,"-ldl")])
fi
WINE_CHECK_LIB_FUNCS(dladdr,[$DL_LIBS]) WINE_CHECK_LIB_FUNCS(dladdr,[$DL_LIBS])
dnl Check for -lpoll for Mac OS X/Darwin dnl Check for -lpoll for Mac OS X/Darwin
......
...@@ -110,9 +110,6 @@ ...@@ -110,9 +110,6 @@
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the `dlopen' function. */
#undef HAVE_DLOPEN
/* Define to 1 if you have the <EGL/egl.h> header file. */ /* Define to 1 if you have the <EGL/egl.h> header file. */
#undef HAVE_EGL_EGL_H #undef HAVE_EGL_EGL_H
......
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
#define mkdir(path,mode) mkdir(path) #define mkdir(path,mode) mkdir(path)
static inline void *dlopen(const char *name, int flags) { return NULL; }
static inline void *dlsym(void *handle, const char *name) { return NULL; }
static inline int dlclose(void *handle) { return 0; }
static inline const char *dlerror(void) { return "No dlopen support on Windows"; }
#ifdef _MSC_VER #ifdef _MSC_VER
#define ftruncate chsize #define ftruncate chsize
......
EXTRALIBS = $(DL_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(I386_LIBS) EXTRALIBS = $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(I386_LIBS)
C_SRCS = \ C_SRCS = \
c_037.c \ c_037.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment