s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them
[kai/samba-autobuild/.git] / lib / popt / wscript
1 #!/usr/bin/env python
2
3 import Options
4
5 def set_options(opt):
6     opt.add_option('--with-included-popt',
7                    help=("use bundled popt library, not from system"),
8                    action="store_true", dest='INCLUDED_POPT', default=False)
9
10 def configure(conf):
11     conf.CHECK_HEADERS('float.h')
12     if not Options.options.INCLUDED_POPT:
13         if conf.CHECK_FUNCS_IN('poptGetContext', 'popt', headers='popt.h'):
14             conf.DEFINE('HAVE_SYSTEM_POPT', 1)
15
16 def build(bld):
17     if not bld.CONFIG_SET('HAVE_SYSTEM_POPT'):
18         bld.SAMBA_SUBSYSTEM('LIBPOPT',
19                             source='findme.c popt.c poptconfig.c popthelp.c poptparse.c',
20                             cflags='-DDBL_EPSILON=__DBL_EPSILON__'
21                             )
22         bld.TARGET_ALIAS('LIBPOPT', 'popt')
23     else:
24         bld.TARGET_ALIAS('popt', 'LIBPOPT')