Generalize dlsym() configuration.

Generalize dlsym() configuration to succeed if dlsym() is in libc rather
than libdl.
This commit is contained in:
Jason Evans 2012-03-19 10:25:27 -07:00
parent e24c7af35d
commit 650285d5be

View File

@ -777,8 +777,10 @@ fi
) )
if test "x$enable_lazy_lock" = "x1" ; then if test "x$enable_lazy_lock" = "x1" ; then
AC_CHECK_HEADERS([dlfcn.h], , [AC_MSG_ERROR([dlfcn.h is missing])]) AC_CHECK_HEADERS([dlfcn.h], , [AC_MSG_ERROR([dlfcn.h is missing])])
AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS -ldl"], AC_CHECK_FUNC([dlsym], [],
[AC_CHECK_LIB([dl], [dlsym], [LIBS="$LIBS -ldl"],
[AC_MSG_ERROR([libdl is missing])]) [AC_MSG_ERROR([libdl is missing])])
])
AC_DEFINE([JEMALLOC_LAZY_LOCK], [ ]) AC_DEFINE([JEMALLOC_LAZY_LOCK], [ ])
fi fi
AC_SUBST([enable_lazy_lock]) AC_SUBST([enable_lazy_lock])