1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/third_party/popt/wscript
Amitay Isaacs 156ac24453 popt: Add check for iconv library
On glibc based systems, there is no separate iconv library.  Adding a
dependency without checking for the library breaks build on glibc based
systems.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-07-28 00:25:29 +02:00

25 lines
679 B
Python

#!/usr/bin/env python
import Options
def configure(conf):
if conf.CHECK_POPT():
conf.define('USING_SYSTEM_POPT', 1)
return
conf.CHECK_HEADERS('float.h')
conf.CHECK_FUNCS('stpcpy')
conf.CHECK_LIB('iconv', shlib=True)
def build(bld):
if bld.CONFIG_SET('USING_SYSTEM_POPT'):
return
cflags = '-DPACKAGE="popt" -DPOPT_SYSCONFDIR="%s"' % bld.env.SYSCONFDIR
bld.SAMBA_LIBRARY('popt',
source='popt.c poptconfig.c popthelp.c poptint.c poptparse.c',
cflags=cflags,
deps='iconv',
allow_warnings=True,
private_library=True)