summaryrefslogtreecommitdiff
blob: d39f95826aaee2b6f485f82ec313de4bf31c5ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/meson.build b/meson.build
index 24fa16e2..fc3ef0d7 100644
--- a/meson.build
+++ b/meson.build
@@ -66,9 +66,9 @@ endif
 conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c available?')
 
 # Check for libhugetlbfs availability (optional)
-if cc.has_header('hugetlbfs.h')
+if get_option('hugepages') and cc.has_header('hugetlbfs.h')
   libhugetlbfs_dep = cc.find_library('hugetlbfs',
-                                     required : false)
+                                     required : true)
   have_libhugetlbfs = libhugetlbfs_dep.found()
 else
   libhugetlbfs_dep = []
diff --git a/meson_options.txt b/meson_options.txt
index 677942ae..752ecd40 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,3 +10,4 @@ option('docs', type : 'combo', choices : ['false', 'html', 'man', 'all'], descri
 option('docs-build', type : 'boolean', value : false, description : 'build documentation')
 option('pdc-enabled', type: 'boolean', value : false, description : 'set default Persistent Discovery Controllers behavior')
 option('json-c', type: 'feature', value: 'auto', description: 'JSON suppport')
+option('hugepages', type: 'boolean', value : false, description : 'Enable support for hugetlbfs')