summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-24 07:51:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-24 07:51:48 +0000
commit8d843cc9cc0e989d3929f204f77223cd08730c7a (patch)
tree1fcba17d10325d9d7ccb68b2eb48cd9bbba6a534 /meson.build
parentReleasing debian version 1.5-3. (diff)
downloadlibnvme-8d843cc9cc0e989d3929f204f77223cd08730c7a.tar.xz
libnvme-8d843cc9cc0e989d3929f204f77223cd08730c7a.zip
Merging upstream version 1.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build27
1 files changed, 22 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 77415eb..3030ee5 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@
project(
'libnvme', ['c'],
meson_version: '>= 0.50.0',
- version: '1.5',
+ version: '1.7.1',
license: 'LGPL-2.1-or-later',
default_options: [
'c_std=gnu99',
@@ -20,8 +20,14 @@ project(
]
)
-maj_min = meson.project_version().split('-rc')[0]
-library_version = maj_min + '.0'
+vstr = meson.project_version().split('-rc')[0]
+vid = vstr.split('.')
+library_version = '.'.join(vid[0], vid[1])
+if vid.length() == 3
+ library_version = '.'.join(library_version, vid[2])
+else
+ library_version = library_version + '.0'
+endif
################################################################################
cc = meson.get_compiler('c')
@@ -230,6 +236,16 @@ conf.set(
),
description: 'Is network address and service translation available'
)
+conf.set(
+ 'HAVE_GLIBC_IOCTL',
+ cc.compiles(
+ '''#include <sys/ioctl.h>
+ int ioctl(int fd, unsigned long request, ...);
+ ''',
+ name: 'ioctl has glibc-style prototype'
+ ),
+ description: 'Is ioctl the glibc interface (rather than POSIX)'
+)
if cc.has_function_attribute('fallthrough')
conf.set('fallthrough', '__attribute__((__fallthrough__))')
@@ -253,7 +269,6 @@ add_project_arguments(
[
'-fomit-frame-pointer',
'-D_GNU_SOURCE',
- '-include', 'internal/config.h',
],
language : 'c',
)
@@ -264,7 +279,9 @@ subdir('internal')
subdir('ccan')
subdir('src')
subdir('libnvme')
-subdir('test')
+if get_option('tests')
+ subdir('test')
+endif
subdir('examples')
subdir('doc')