Package wafadmin :: Package Tools :: Module config_c
[hide private]
[frames] | no frames]

Module config_c

source code

c/c++ configuration routines

classes such as program_enumerator are attached to the Configure class, avoiding lots of imports in user scripts

Usage example (see demos/adv/wscript): program_enumerator -> conf.create_program_enumerator

The functions preceded by "@conf" are attached in the same manner

Classes [hide private]
  attached_conf
no decorators for classes, so we use a metaclass map 'conf.create_classname()' to 'classname()'
  enumerator_base
  configurator_base
  program_enumerator
  function_enumerator
  library_enumerator
find a library in a list of paths
  header_enumerator
find a header in a list of paths
  cfgtool_configurator
  pkgconfig_configurator
pkgconfig_configurator is a frontend to pkg-config variables:
  test_configurator
  library_configurator
  framework_configurator
  header_configurator
  common_include_configurator
Looks for a given header.
  check_data
Functions [hide private]
 
define(self, define, value, quote=1)
store a single define and its state into an internal list for later writing to a config header file.
source code
 
undefine(self, define)
store a single define and its state into an internal list for later writing to a config header file
source code
 
define_cond(self, name, value)
Conditionally define a name.
source code
 
is_defined(self, key) source code
 
get_define(self, define)
get the value of a previously stored define
source code
 
have_define(self, name)
prefix the define with 'HAVE_' and make sure it has valid characters.
source code
 
write_config_header(self, configfile='', env='')
save the defines into a file
source code
 
run_check(self, obj)
compile, link and run if necessary
source code
 
cc_check_features(self, kind='cc') source code
 
cxx_check_features(self) source code
 
check_pkg(self, modname, destvar='', vnum='', pkgpath='', pkgbin='', pkgvars=[], pkgdefs={}, mandatory=False)
wrapper provided for convenience
source code
 
pkgconfig_fetch_variable(self, pkgname, variable, pkgpath='', pkgbin='', pkgversion=0) source code
Variables [hide private]
  stdincpath = ['/usr/include/', '/usr/local/include/']
standard include paths
  stdlibpath = ['/usr/lib/', '/usr/local/lib/', '/lib']
standard library search paths
Function Details [hide private]

define(self, define, value, quote=1)

source code 

store a single define and its state into an internal list for later writing to a config header file. Value can only be a string or int; other types not supported. String values will appear properly quoted in the generated header file.

Decorators:
  • @conf

undefine(self, define)

source code 

store a single define and its state into an internal list for later writing to a config header file

Decorators:
  • @conf

define_cond(self, name, value)

source code 

Conditionally define a name. Formally equivalent to: if value: define(name, 1) else: undefine(name)

Decorators:
  • @conf

is_defined(self, key)

source code 
Decorators:
  • @conf

get_define(self, define)

source code 

get the value of a previously stored define

Decorators:
  • @conf

have_define(self, name)

source code 

prefix the define with 'HAVE_' and make sure it has valid characters.

Decorators:
  • @conf

write_config_header(self, configfile='', env='')

source code 

save the defines into a file

Decorators:
  • @conf

run_check(self, obj)

source code 

compile, link and run if necessary

Parameters:
  • obj - data of type check_data
Returns:
(False if a error during build happens) or ( (True if build ok) or (a {'result': ''} if execute was set))
Decorators:
  • @conf

cc_check_features(self, kind='cc')

source code 
Decorators:
  • @conftest

cxx_check_features(self)

source code 
Decorators:
  • @conftest

check_pkg(self, modname, destvar='', vnum='', pkgpath='', pkgbin='', pkgvars=[], pkgdefs={}, mandatory=False)

source code 

wrapper provided for convenience

Decorators:
  • @conf

pkgconfig_fetch_variable(self, pkgname, variable, pkgpath='', pkgbin='', pkgversion=0)

source code 
Decorators:
  • @conf