if test "x$enable_numa" = xno; then
AC_DEFINE([NUMA_DISABLE], [1], [disable NUMA/Node support in top])
else
- AC_SEARCH_LIBS([dlopen], [dl], [],
- [AC_MSG_ERROR([dynamic linking unavailable, circumvent with --disable-numa])])
- DL_LIB="$ac_cv_search_dlopen"
+ AC_CHECK_LIB(dl, dlopen, [have_dlopen=yes], [have_dlopen=no])
+ if test "x$have_dlopen" = xno; then
+ AC_MSG_ERROR([dynamic linking unavailable, circumvent with --disable-numa])
+ fi
+ DL_LIB="-ldl"
fi
AC_SUBST([DL_LIB])