opt.tool_options('gnu_dirs')
opt.add_option('--bundled-libraries',
- help=("list of bundled libraries. Can be 'NONE' or 'ALL' [auto]"),
+ help=("comma separated list of bundled libraries. May include !LIBNAME to disable bundling a library. Can be 'NONE' or 'ALL' [auto]"),
action="store", dest='BUNDLED_LIBS', default='')
extension_default = Options.options['BUNDLED_EXTENSION_DEFAULT']
extension_exception = Options.options['BUNDLED_EXTENSION_EXCEPTION']
opt.add_option('--bundled-extension-exception',
- help=("list of libraries to not apply extension to [%s]" % extension_exception),
+ help=("comman separated list of libraries to not apply extension to [%s]" % extension_exception),
action="store", dest='BUNDLED_EXTENSION_EXCEPTION', default=extension_exception)
builtin_defauilt = Options.options['BUILTIN_LIBRARIES_DEFAULT']
opt.add_option('--builtin-libraries',
- help=("list of libraries to build directly into binaries [%s]" % builtin_defauilt),
+ help=("command separated list of libraries to build directly into binaries [%s]" % builtin_defauilt),
action="store", dest='BUILTIN_LIBRARIES', default=builtin_defauilt)
- opt.add_option('--libdir',
- help=("object code libraries [PREFIX/lib]"),
- action="store", dest='LIBDIR', default='${PREFIX}/lib')
- opt.add_option('--bindir',
- help=("user executables [PREFIX/bin]"),
- action="store", dest='BINDIR', default='${PREFIX}/bin')
- opt.add_option('--sbindir',
- help=("system admin executables [PREFIX/sbin]"),
- action="store", dest='SBINDIR', default='${PREFIX}/sbin')
+ opt.add_option('--minimum-library-version',
+ help=("list of minimum system library versions (LIBNAME1:version,LIBNAME2:version)"),
+ action="store", dest='MINIMUM_LIBRARY_VERSION', default='')
+
opt.add_option('--with-modulesdir',
help=("modules directory [PREFIX/modules]"),
action="store", dest='MODULESDIR', default='${PREFIX}/modules')
opt.add_option('--enable-developer',
help=("Turn on developer warnings and debugging"),
action="store_true", dest='developer', default=False)
+ opt.add_option('--picky-developer',
+ help=("Treat all warnings as errors (enable -Werror)"),
+ action="store_true", dest='picky_developer', default=False)
+ opt.add_option('--fatal-errors',
+ help=("Stop compilation on first error (enable -Wfatal-errors)"),
+ action="store_true", dest='fatal_errors', default=False)
opt.add_option('--enable-gccdeps',
help=("Enable use gcc -MD dependency module"),
action="store_true", dest='enable_gccdeps', default=False)
help=("Enable even more compiler warnings"),
action='store_true', dest='pedantic', default=False)
+ opt.add_option('--cross-compile',
+ help=("configure for cross-compilation"),
+ action='store_true', dest='CROSS_COMPILE', default=False)
+ opt.add_option('--cross-execute',
+ help=("command prefix to use for cross-execution in configure"),
+ action='store', dest='CROSS_EXECUTE', default='')
+ opt.add_option('--hostcc',
+ help=("set host compiler when cross compiling"),
+ action='store', dest='HOSTCC', default=False)
+
+
@wafsamba.runonce
def configure(conf):
conf.env.hlist = []
conf.check_tool('compiler_cc')
+ # we need git for 'waf dist'
+ conf.find_program('git', var='GIT')
+
if Options.options.enable_gccdeps:
# don't enable gccdeps by default as it needs a very recent version gcc
conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba")
# make the install paths available in environment
- conf.env.LIBDIR = Options.options.LIBDIR
- conf.env.BINDIR = Options.options.BINDIR
- conf.env.SBINDIR = Options.options.SBINDIR
+ conf.env.LIBDIR = Options.options.LIBDIR or '${PREFIX}/lib'
+ conf.env.BINDIR = Options.options.BINDIR or '${PREFIX}/bin'
+ conf.env.SBINDIR = Options.options.SBINDIR or '${PREFIX}/sbin'
conf.env.MODULESDIR = Options.options.MODULESDIR
conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',')
conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',')
conf.env.BUNDLED_EXTENSION = Options.options.BUNDLED_EXTENSION
conf.env.BUNDLED_EXTENSION_EXCEPTION = Options.options.BUNDLED_EXTENSION_EXCEPTION.split(',')
+ conf.env.CROSS_COMPILE = Options.options.CROSS_COMPILE
+ conf.env.CROSS_EXECUTE = Options.options.CROSS_EXECUTE
+ conf.env.HOSTCC = Options.options.HOSTCC
+
# see if we can compile and run a simple C program
conf.CHECK_CODE('printf("hello world\\n")',
define='HAVE_SIMPLE_C_PROG',
headers='stdio.h',
msg='Checking simple C program')
+ # see if we can build shared libs
+ if not conf.CHECK_LIBRARY_SUPPORT():
+ conf.env.DISABLE_SHARED = True
+
# check for rpath
- if not conf.env.DISABLE_SHARED and conf.CHECK_RPATH_SUPPORT():
+ if not conf.env.DISABLE_SHARED and conf.CHECK_LIBRARY_SUPPORT(rpath=True):
conf.env.RPATH_ON_BUILD = not Options.options.disable_rpath_build
conf.env.RPATH_ON_INSTALL = (conf.env.RPATH_ON_BUILD and
not Options.options.disable_rpath_install)
conf.env.RPATH_ON_BUILD = False
# we should use the PIC options in waf instead
- conf.ADD_CFLAGS('-fPIC')
+ conf.ADD_CFLAGS('-fPIC', testflags=True)
# check for pkgconfig
conf.check_cfg(atleast_pkgconfig_version='0.0.0')
add_headers=True)
conf.CHECK_HEADERS('strings.h inttypes.h stdint.h unistd.h minix/config.h', add_headers=True)
conf.CHECK_HEADERS('ctype.h standards.h stdbool.h stdint.h stdarg.h vararg.h', add_headers=True)
+ conf.CHECK_HEADERS('limits.h assert.h')
# see if we need special largefile flags
conf.CHECK_LARGEFILE()