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