196 |
# ------------- |
# ------------- |
197 |
AC_DEFUN(AC_LTDL_DLLIB, |
AC_DEFUN(AC_LTDL_DLLIB, |
198 |
[LIBADD_DL= |
[LIBADD_DL= |
199 |
AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, |
AC_SUBST(LIBADD_DL) |
200 |
[Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"], |
AC_CHECK_LIB([dl], [dlopen], |
201 |
[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1, |
[AC_DEFINE([HAVE_LIBDL], [1], |
202 |
[Define if you have the libdl library or equivalent.])], |
[Define if you have the libdl library or equivalent.]) |
203 |
[AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1, |
LIBADD_DL="-ldl"], |
204 |
[Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"] |
[AC_TRY_LINK([#if HAVE_DLFCN_H |
205 |
)])]) |
# include <dlfcn.h> |
206 |
|
#endif |
207 |
|
], |
208 |
|
[dlopen(0, 0);], |
209 |
|
[AC_DEFINE(HAVE_LIBDL, 1, |
210 |
|
[Define if you have the libdl library or equivalent.])], |
211 |
|
[AC_CHECK_LIB(svld, dlopen, |
212 |
|
[AC_DEFINE(HAVE_LIBDL, 1, |
213 |
|
[Define if you have the libdl library or equivalent.]) |
214 |
|
LIBADD_DL="-lsvld" |
215 |
|
]) |
216 |
|
]) |
217 |
|
]) |
218 |
|
|
219 |
AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, |
AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, |
220 |
[Define if you have the shl_load function.])], |
[Define if you have the shl_load function.])], |
221 |
[AC_CHECK_LIB(dld, shl_load, |
[AC_CHECK_LIB(dld, shl_load, |
226 |
AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, |
AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1, |
227 |
[Define if you have the GNU dld library.])dnl |
[Define if you have the GNU dld library.])dnl |
228 |
test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) |
test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"]) |
|
AC_SUBST(LIBADD_DL) |
|
229 |
|
|
230 |
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then |
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then |
231 |
LIBS_SAVE="$LIBS" |
LIBS_SAVE="$LIBS" |