From 23ba9ad6e20f751e7d68f24f8d2dca7cb1c7e335 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Sun, 21 Mar 2010 12:53:44 +0100 Subject: build: Check for Linux kernel oplocks --- source3/wscript | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3') diff --git a/source3/wscript b/source3/wscript index f0d85326c6..589f1b4da2 100644 --- a/source3/wscript +++ b/source3/wscript @@ -58,6 +58,19 @@ main() { }''', 'HAVE_KERNEL_CHANGE_NOTIFY', addmain=False, execute=True, msg="Checking for kernel change notify support") + # Check for Linux kernel oplocks + conf.CHECK_CODE(''' +#include +#include +#include +#ifndef F_NOTIFY +#define F_NOTIFY 1026 +#endif +main() { + exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0); +}''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True, + msg="Checking for Linux kernel oplocks") + # Look for CUPS conf.find_program('cups-config', var='CUPS_CONFIG') if conf.env.CUPS_CONFIG: -- cgit