Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TPF
jack2
Commits
4e8e7ecd
Unverified
Commit
4e8e7ecd
authored
May 17, 2016
by
Karl Linden
Browse files
Use conf.check instead of conf.check_cc.
parent
ff0463bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/wscript
View file @
4e8e7ecd
...
...
@@ -10,12 +10,12 @@ def configure(conf):
if
conf
.
env
[
'IS_WINDOWS'
]:
try
:
conf
.
check
_cc
(
function_name
=
'regcomp'
,
header_name
=
'regex.h'
,
lib
=
'regex'
,
uselib_store
=
"REGEX"
,
define_name
=
'HAVE_REGEX_H'
)
conf
.
check
(
function_name
=
'regcomp'
,
header_name
=
'regex.h'
,
lib
=
'regex'
,
uselib_store
=
"REGEX"
,
define_name
=
'HAVE_REGEX_H'
)
except
:
conf
.
check
_cc
(
function_name
=
'regcomp'
,
header_name
=
'regex.h'
,
lib
=
'tre'
,
uselib_store
=
"REGEX"
,
define_name
=
'HAVE_REGEX_H'
)
conf
.
check
_cc
(
function_name
=
'htons'
,
header_name
=
'winsock2.h'
,
lib
=
'ws2_32'
,
uselib_store
=
"WS2_32"
,
define_name
=
'HAVE_WINSOCK2_H'
)
conf
.
check
_cc
(
function_name
=
'timeGetDevCaps'
,
header_name
=
[
'windows.h'
,
'mmsystem.h'
],
lib
=
'winmm'
,
uselib_store
=
"WINMM"
,
define_name
=
'HAVE_MMSYSTEM_H'
)
conf
.
check
_cc
(
function_name
=
'EnumProcesses'
,
header_name
=
[
'windows.h'
,
'psapi.h'
],
lib
=
'psapi'
,
uselib_store
=
"PSAPI"
,
define_name
=
'HAVE_PSAPI_H'
)
conf
.
check
(
function_name
=
'regcomp'
,
header_name
=
'regex.h'
,
lib
=
'tre'
,
uselib_store
=
"REGEX"
,
define_name
=
'HAVE_REGEX_H'
)
conf
.
check
(
function_name
=
'htons'
,
header_name
=
'winsock2.h'
,
lib
=
'ws2_32'
,
uselib_store
=
"WS2_32"
,
define_name
=
'HAVE_WINSOCK2_H'
)
conf
.
check
(
function_name
=
'timeGetDevCaps'
,
header_name
=
[
'windows.h'
,
'mmsystem.h'
],
lib
=
'winmm'
,
uselib_store
=
"WINMM"
,
define_name
=
'HAVE_MMSYSTEM_H'
)
conf
.
check
(
function_name
=
'EnumProcesses'
,
header_name
=
[
'windows.h'
,
'psapi.h'
],
lib
=
'psapi'
,
uselib_store
=
"PSAPI"
,
define_name
=
'HAVE_PSAPI_H'
)
def
create_jack_process_obj
(
bld
,
target
,
sources
,
uselib
=
None
):
process
=
bld
(
features
=
[
'cxx'
,
'cxxshlib'
])
...
...
wscript
View file @
4e8e7ecd
...
...
@@ -106,11 +106,11 @@ class AutoOption:
def
add_library
(
self
,
library
,
uselib_store
=
None
):
"""
Add a required library that should be checked during configuration. The
library will be checked using the conf.check
_cc
function. If the
library will be checked using the conf.check function. If the
uselib_store arugment is not given it defaults to LIBRARY (the uppercase
of the library argument). The uselib_store argument will be passed to
check
_cc
which means LIB_LIBRARY, CFLAGS_LIBRARY and DEFINES_LIBRARY,
etc.
will be defined if the option is enabled.
check which means LIB_LIBRARY, CFLAGS_LIBRARY and DEFINES_LIBRARY,
etc.
will be defined if the option is enabled.
"""
if
not
uselib_store
:
uselib_store
=
library
.
upper
().
replace
(
'-'
,
'_'
)
...
...
@@ -119,7 +119,7 @@ class AutoOption:
def
add_header
(
self
,
header
):
"""
Add a required header that should be checked during configuration. The
header will be checked using the conf.check
_cc
function which means
header will be checked using the conf.check function which means
HAVE_HEADER_H will be defined if found.
"""
self
.
headers
.
append
(
header
)
...
...
@@ -192,7 +192,7 @@ class AutoOption:
# check for libraries
for
lib
,
uselib_store
in
self
.
libs
:
try
:
conf
.
check
_cc
(
lib
=
lib
,
uselib_store
=
uselib_store
,
use
=
use
)
conf
.
check
(
lib
=
lib
,
uselib_store
=
uselib_store
,
use
=
use
)
except
conf
.
errors
.
ConfigurationError
:
all_found
=
False
self
.
libs_not_found
.
append
(
lib
)
...
...
@@ -200,7 +200,7 @@ class AutoOption:
# check for headers
for
header
in
self
.
headers
:
try
:
conf
.
check
_cc
(
header_name
=
header
,
use
=
use
)
conf
.
check
(
header_name
=
header
,
use
=
use
)
except
conf
.
errors
.
ConfigurationError
:
all_found
=
False
self
.
headers_not_found
.
append
(
header
)
...
...
@@ -348,13 +348,16 @@ def check_for_celt_error(conf):
# before. Thus a fragment with both stdio.h and readline/readline.h need to be
# test-compiled to find out whether readline is available.
def
check_for_readline
(
conf
):
# FIXME: This check can be incorporated into the AutoOptions class by
# passing header_name=['stdio.h', 'readline/readline.h'] to check.
try
:
conf
.
check_cc
(
fragment
=
'''
#include <stdio.h>
#include <readline/readline.h>
int main(void) { return 0; }'''
,
execute
=
False
,
msg
=
'Checking for header readline/readline.h'
)
conf
.
check
(
fragment
=
'''
#include <stdio.h>
#include <readline/readline.h>
int main(void) { return 0; }'''
,
execute
=
False
,
msg
=
'Checking for header readline/readline.h'
,
errmsg
=
'not found'
)
return
True
except
conf
.
errors
.
ConfigurationError
:
return
False
...
...
@@ -363,13 +366,15 @@ def check_for_readline_error(conf):
print_error
(
'--readline requires the readline/readline.h header, but it cannot be found.'
)
def
check_for_mmsystem
(
conf
):
# FIXME: See comment in check_for_readline.
try
:
conf
.
check_cc
(
fragment
=
'''
#include <windows.h>
#include <mmsystem.h>
int main(void) { return 0; }'''
,
execute
=
False
,
msg
=
'Checking for header mmsystem.h'
)
conf
.
check
(
fragment
=
'''
#include <windows.h>
#include <mmsystem.h>
int main(void) { return 0; }'''
,
execute
=
False
,
msg
=
'Checking for header mmsystem.h'
,
errmsg
=
'not found'
)
return
True
except
conf
.
errors
.
ConfigurationError
:
return
False
...
...
@@ -477,7 +482,7 @@ def configure(conf):
configure_auto_options
(
conf
)
# Check for functions.
conf
.
check
_cc
(
conf
.
check
(
function_name
=
'ppoll'
,
header_name
=
[
'poll.h'
,
'signal.h'
],
defines
=
[
'_GNU_SOURCE'
],
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment