diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-17 00:22:54 -0600 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:51 +1000 |
commit | 10935a33544824207c4e7df946908c857d20c946 (patch) | |
tree | 470f9b5d0393addca4abfe0c16a698fe6b763563 /lib/popt/wscript | |
parent | cb0bf90b1045d68315ce9d7c61cb1493bfb71306 (diff) | |
download | samba-10935a33544824207c4e7df946908c857d20c946.tar.gz samba-10935a33544824207c4e7df946908c857d20c946.tar.bz2 samba-10935a33544824207c4e7df946908c857d20c946.zip |
build: optionally enable builtin popt
Diffstat (limited to 'lib/popt/wscript')
-rw-r--r-- | lib/popt/wscript | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/popt/wscript b/lib/popt/wscript new file mode 100644 index 0000000000..ccdb290703 --- /dev/null +++ b/lib/popt/wscript @@ -0,0 +1,23 @@ +import Options + +def set_options(opt): + opt.add_option('--with-included-popt', + help=("use bundled popt library, not from system"), + action="store_true", dest='INCLUDED_POPT', default=False) + +def configure(conf): + conf.CHECK_HEADERS('float.h') + if not Options.options.INCLUDED_POPT: + if (conf.CHECK_HEADERS('popt.h') and + conf.CHECK_FUNCS_IN('poptGetContext', 'popt')): + conf.DEFINE('HAVE_SYSTEM_POPT', 1) + +def build(bld): + if not bld.CONFIG_SET('HAVE_SYSTEM_POPT'): + bld.SAMBA_SUBSYSTEM('LIBPOPT', + source='findme.c popt.c poptconfig.c popthelp.c poptparse.c', + cflags='-DDBL_EPSILON=__DBL_EPSILON__' + ) + bld.TARGET_ALIAS('LIBPOPT', 'popt') + else: + bld.TARGET_ALIAS('popt', 'LIBPOPT') |