waf/quotas: fail configure when quotas were requested but not found
authorBjörn Jacke <bj@sernet.de>
Thu, 7 Feb 2019 03:39:04 +0000 (04:39 +0100)
committerBjoern Jacke <bjacke@samba.org>
Sun, 17 Feb 2019 12:33:14 +0000 (13:33 +0100)
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/wscript

index d7679c72e23d7ee689c6c2fb9f7f5562bedb9ffc..a7891a829a8c7be3ae49e35466c8a221cb242b6d 100644 (file)
@@ -46,7 +46,7 @@ def options(opt):
     opt.samba_add_onoff_option('cups', with_name="enable", without_name="disable")
     opt.samba_add_onoff_option('iprint', with_name="enable", without_name="disable")
     opt.samba_add_onoff_option('pam')
-    opt.samba_add_onoff_option('quotas')
+    opt.samba_add_onoff_option('quotas', default=None)
     opt.samba_add_onoff_option('sendfile-support', default=None)
     opt.samba_add_onoff_option('utmp')
     opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
@@ -1396,7 +1396,7 @@ main() {
     conf.CHECK_FUNCS_IN('getspnam', 'sec')
 
     legacy_quota_libs = ''
-    if Options.options.with_quotas:
+    if not Options.options.with_quotas == False:
         # For quotas on Veritas VxFS filesystems
         conf.CHECK_HEADERS('sys/fs/vx_quota.h')
         # For sys/quota.h and linux/quota.h
@@ -1504,6 +1504,9 @@ main() {
                 legacy_quota_libs = ''
     conf.env['legacy_quota_libs'] = legacy_quota_libs
 
+    if Options.options.with_quotas == True and not conf.CONFIG_SET('WITH_QUOTAS'):
+        conf.fatal('quota support not found but it was equested !')
+
     conf.CHECK_CODE('(void)unshare(CLONE_FS);',
                     headers='sched.h',
                     define='HAVE_UNSHARE_CLONE_FS',