--- /dev/null
+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')
+++ /dev/null
-# 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',
- )
-
opt.recurse('../lib/nss_wrapper')
opt.recurse('../lib/socket_wrapper')
opt.recurse('../lib/uid_wrapper')
+ opt.recurse('../lib/popt')
def configure(conf):
conf.define('PACKAGE_NAME', 'samba')
conf.sub_config('../lib/nss_wrapper')
conf.sub_config('../lib/socket_wrapper')
conf.sub_config('../lib/uid_wrapper')
+ conf.sub_config('../lib/popt')
conf.sub_config('lib/smbreadline')
conf.SAMBA_CONFIG_H('include/config.h')
# this sets up some aliases
bld.TARGET_ALIAS('attr', 'XATTR')
bld.TARGET_ALIAS('execinfo', 'EXECINFO')
-bld.TARGET_ALIAS('popt', 'LIBPOPT')
bld.TARGET_ALIAS('tevent', 'LIBTEVENT_EXT')
bld.TARGET_ALIAS('z', 'ZLIB')
bld.TARGET_ALIAS('pam', 'PAM')
bld.BUILD_SUBDIR('../lib/socket_wrapper')
bld.BUILD_SUBDIR('../lib/nss_wrapper')
bld.BUILD_SUBDIR('../lib/uid_wrapper')
+bld.BUILD_SUBDIR('../lib/popt')
bld.BUILD_SUBDIR('lib/stream')
bld.BUILD_SUBDIR('../lib/util')
bld.BUILD_SUBDIR('../lib/tdr')