Not everyone installs kernel-headers/linux-userspace-headers package
and without it compilation fails with a puzzling error. We better
check that the required header is present upfront.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
[HAVE_WCHAR_H="yes"],
[HAVE_WCHAR_H="no"])
+if test "$os" = "linux"; then
+ # Make sure kernel-headers package is installed.
+ AC_CHECK_HEADER(
+ [linux/unistd.h],
+ [],
+ [AC_MSG_ERROR(linux/unistd.h is not found. Please install kernel-headers/linux-userspace-headers/linux-libc-dev package.)])
+fi
+
if test "$enable_multimon" != "no"; then
AC_CHECK_HEADER(
[X11/extensions/panoramiXproto.h],