blob: df32c2c1333228ea84208097c208f0bb14f61fa5 (
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
26
27
28
29
30
|
diff --git a/meson.build b/meson.build
index af79bd4d..90c4d6ad 100644
--- a/meson.build
+++ b/meson.build
@@ -69,9 +69,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)
else
libhugetlbfs_dep = dependency('', required: false)
endif
diff --git a/meson_options.txt b/meson_options.txt
index c61dae0f..a05a7e0f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -70,3 +70,9 @@ option(
type : 'string',
description : 'override the git version string'
)
+option(
+ 'hugepages',
+ type: 'boolean',
+ value : false,
+ description : 'Enable support for hugetlbfs'
+)
|