AC_CHECK_LIB([dl], [dlopen], [res=yes], [res=no])
if test "x$res" = "xyes"; then
AC_CHECK_LIB([dl], [dladdr], AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.]))
AC_CHECK_LIB([dl], [dlopen], [res=yes], [res=no])
if test "x$res" = "xyes"; then
AC_CHECK_LIB([dl], [dladdr], AC_DEFINE([HAVE_DLADDR], [1], [Define to 1 if you have the `dladdr' function.]))