diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 27 |
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') |