build,openbsd: remove kvm-related code
Remove the kvm.h include since 38323c9fb replaced the use of kvm_open()
with sysctl(),
Conditionally check for kvm_open() on non-OpenBSD platforms so LIBS (and
libuv.pc) does not unnecessarily contain "-lkvm".
Fixes: https://github.com/libuv/libuv/issues/1340
PR-URL: https://github.com/libuv/libuv/pull/1344
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
1217832e6f
commit
22fc92856d
@ -43,7 +43,6 @@ LT_INIT
|
||||
# TODO(bnoordhuis) Check for -pthread vs. -pthreads
|
||||
AC_CHECK_LIB([dl], [dlopen])
|
||||
AC_CHECK_LIB([kstat], [kstat_lookup])
|
||||
AC_CHECK_LIB([kvm], [kvm_open])
|
||||
AC_CHECK_LIB([nsl], [gethostbyname])
|
||||
AC_CHECK_LIB([perfstat], [perfstat_cpu])
|
||||
AC_CHECK_LIB([pthread], [pthread_mutex_init])
|
||||
@ -65,6 +64,9 @@ AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])
|
||||
AS_CASE([$host_os],[mingw*], [
|
||||
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32"
|
||||
])
|
||||
AS_CASE([$host_os], [openbsd*], [], [
|
||||
AC_CHECK_LIB([kvm], [kvm_open])
|
||||
])
|
||||
AC_CHECK_HEADERS([sys/ahafs_evProds.h])
|
||||
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
|
||||
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <kvm.h>
|
||||
#include <paths.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user