250 |
[LIBADD_DL= |
[LIBADD_DL= |
251 |
AC_SUBST(LIBADD_DL) |
AC_SUBST(LIBADD_DL) |
252 |
AC_LANG_PUSH([C]) |
AC_LANG_PUSH([C]) |
253 |
AC_CHECK_LIB([dl], [dlopen], |
|
254 |
[AC_DEFINE([HAVE_LIBDL], [1], |
AC_CHECK_FUNC([shl_load], |
255 |
[Define if you have the libdl library or equivalent.]) |
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
256 |
LIBADD_DL="-ldl"], |
[Define if you have the shl_load function.])], |
257 |
[AC_TRY_LINK([#if HAVE_DLFCN_H |
[AC_CHECK_LIB([dld], [shl_load], |
258 |
|
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
259 |
|
[Define if you have the shl_load function.]) |
260 |
|
LIBADD_DL="$LIBADD_DL -ldld"], |
261 |
|
[AC_CHECK_LIB([dl], [dlopen], |
262 |
|
[AC_DEFINE([HAVE_LIBDL], [1], |
263 |
|
[Define if you have the libdl library or equivalent.]) |
264 |
|
LIBADD_DL="-ldl"], |
265 |
|
[AC_TRY_LINK([#if HAVE_DLFCN_H |
266 |
# include <dlfcn.h> |
# include <dlfcn.h> |
267 |
#endif |
#endif |
268 |
], |
], |
269 |
[dlopen(0, 0);], |
[dlopen(0, 0);], |
270 |
[AC_DEFINE(HAVE_LIBDL, 1, |
[AC_DEFINE([HAVE_LIBDL], [1], |
271 |
[Define if you have the libdl library or equivalent.])], |
[Define if you have the libdl library or equivalent.])], |
272 |
[AC_CHECK_LIB(svld, dlopen, |
[AC_CHECK_LIB([svld], [dlopen], |
273 |
[AC_DEFINE(HAVE_LIBDL, 1, |
[AC_DEFINE([HAVE_LIBDL], [1], |
274 |
[Define if you have the libdl library or equivalent.]) |
[Define if you have the libdl library or equivalent.]) |
275 |
LIBADD_DL="-lsvld" |
LIBADD_DL="-lsvld"], |
276 |
|
[AC_CHECK_LIB([dld], [dld_link], |
277 |
|
[AC_DEFINE([HAVE_DLD], [1], |
278 |
|
[Define if you have the GNU dld library.]) |
279 |
|
LIBADD_DL="$LIBADD_DL -ldld" |
280 |
|
]) |
281 |
|
]) |
282 |
]) |
]) |
283 |
]) |
]) |
284 |
]) |
]) |
285 |
|
]) |
|
AC_CHECK_FUNC(shl_load, |
|
|
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
|
|
[Define if you have the shl_load function.])], |
|
|
[AC_CHECK_LIB([dld], [shl_load], |
|
|
[AC_DEFINE([HAVE_SHL_LOAD], [1], |
|
|
[Define if you have the shl_load function.]) |
|
|
LIBADD_DL="$LIBADD_DL -ldld" |
|
|
]) |
|
|
]) |
|
|
|
|
|
AC_CHECK_LIB([dld], [dld_link], |
|
|
[AC_DEFINE([HAVE_DLD], [1], |
|
|
[Define if you have the GNU dld library.]) |
|
|
test x"$ac_cv_lib_dld_shl_load" = xyes || LIBADD_DL="$LIBADD_DL -ldld" |
|
|
]) |
|
286 |
|
|
287 |
if test x"$ac_cv_func_dlopen" = xyes || test x"$ac_cv_lib_dl_dlopen" = xyes |
if test x"$ac_cv_func_dlopen" = xyes || test x"$ac_cv_lib_dl_dlopen" = xyes |
288 |
then |
then |