aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-07-13 19:22:40 +0000
committerDavid Robillard <d@drobilla.net>2014-07-13 19:22:40 +0000
commit248b0c2d0cbbc4637af651dbee7da0f42e030185 (patch)
tree6613514021cf914da4a435b6e5b09ae4cc24f81c /wscript
parente2e92e913db744ec1b6f108fa7d557afd89266ef (diff)
downloadserd-248b0c2d0cbbc4637af651dbee7da0f42e030185.tar.gz
serd-248b0c2d0cbbc4637af651dbee7da0f42e030185.tar.bz2
serd-248b0c2d0cbbc4637af651dbee7da0f42e030185.zip
Add configure option to ignore POSIX functions even if present.
git-svn-id: http://svn.drobilla.net/serd/trunk@462 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'wscript')
-rw-r--r--wscript37
1 files changed, 20 insertions, 17 deletions
diff --git a/wscript b/wscript
index 3de68167..b35e0930 100644
--- a/wscript
+++ b/wscript
@@ -37,6 +37,8 @@ def options(opt):
help='Build programs as static binaries')
opt.add_option('--largefile', action='store_true', dest='largefile',
help='Build with large file support on 32-bit systems')
+ opt.add_option('--no-posix', action='store_true', dest='no_posix',
+ help='Do not use posix_memalign, posix_fadvise, and fileno, even if present')
def configure(conf):
conf.load('compiler_c')
@@ -71,23 +73,24 @@ def configure(conf):
lib = ['m'],
mandatory = False)
- conf.check(function_name = 'posix_memalign',
- header_name = 'stdlib.h',
- define_name = 'HAVE_POSIX_MEMALIGN',
- defines = ['_POSIX_C_SOURCE=201112L'],
- mandatory = False)
-
- conf.check(function_name = 'posix_fadvise',
- header_name = 'fcntl.h',
- define_name = 'HAVE_POSIX_FADVISE',
- defines = ['_POSIX_C_SOURCE=201112L'],
- mandatory = False)
-
- conf.check(function_name = 'fileno',
- header_name = 'stdio.h',
- define_name = 'HAVE_FILENO',
- defines = ['_POSIX_C_SOURCE=201112L'],
- mandatory = False)
+ if not Options.options.no_posix:
+ conf.check(function_name = 'posix_memalign',
+ header_name = 'stdlib.h',
+ define_name = 'HAVE_POSIX_MEMALIGN',
+ defines = ['_POSIX_C_SOURCE=201112L'],
+ mandatory = False)
+
+ conf.check(function_name = 'posix_fadvise',
+ header_name = 'fcntl.h',
+ define_name = 'HAVE_POSIX_FADVISE',
+ defines = ['_POSIX_C_SOURCE=201112L'],
+ mandatory = False)
+
+ conf.check(function_name = 'fileno',
+ header_name = 'stdio.h',
+ define_name = 'HAVE_FILENO',
+ defines = ['_POSIX_C_SOURCE=201112L'],
+ mandatory = False)
autowaf.define(conf, 'SERD_VERSION', SERD_VERSION)
autowaf.set_lib_env(conf, 'serd', SERD_VERSION)