From 10935a33544824207c4e7df946908c857d20c946 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Mar 2010 00:22:54 -0600 Subject: build: optionally enable builtin popt --- lib/popt/wscript | 23 +++++++++++++++++++++++ lib/popt/wscript_build | 8 -------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 lib/popt/wscript delete mode 100644 lib/popt/wscript_build (limited to 'lib/popt') 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') diff --git a/lib/popt/wscript_build b/lib/popt/wscript_build deleted file mode 100644 index de0e625b0b..0000000000 --- a/lib/popt/wscript_build +++ /dev/null @@ -1,8 +0,0 @@ -# AUTOGENERATED by mktowscript.pl from ../../lib/popt/config.mk -# Please remove this notice if hand editing - - -bld.SAMBA_SUBSYSTEM('LIBPOPT', - source='findme.c popt.c poptconfig.c popthelp.c poptparse.c', - ) - -- cgit