]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
OVT: have configure check for presence of linux/unistd.h
authorVMware, Inc <>
Wed, 24 Feb 2010 21:03:30 +0000 (13:03 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 24 Feb 2010 21:03:30 +0000 (13:03 -0800)
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>
open-vm-tools/configure.ac

index 71c4bf928ac220d91a09a423cdb1470c29b67260..7be4fc5fba3fcac444b8ee0e44ef2e2f4f88684d 100644 (file)
@@ -812,6 +812,14 @@ AC_CHECK_HEADER(
    [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],