summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-12-11 18:50:51 +0300
committerMatthieu Patou <mat@matws.net>2010-12-11 19:21:09 +0300
commit617871ee28e925171462d4821f60aa9f79fab94e (patch)
tree707bcfacee9b545c96495dd5fb72bd865ed62fe5 /lib
parent097075c31f79f59a498cc89ca715e5936b41b465 (diff)
downloadsamba-617871ee28e925171462d4821f60aa9f79fab94e.tar.gz
samba-617871ee28e925171462d4821f60aa9f79fab94e.tar.bz2
samba-617871ee28e925171462d4821f60aa9f79fab94e.zip
build: add a dependency on lib iconv for lib intl if we are not able to find it
This is due that on some platform lib intl depend on lib iconv, failling to provide this library cause waf to be unable to link with lib intl and makes it think that the library doesn't exists !
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wscript13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 8b5980758d..86a4bdb8d8 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -210,7 +210,18 @@ def configure(conf):
conf.CHECK_FUNCS_IN('res_search', 'resolv', checklibc=True,
headers='netinet/in.h arpa/nameser.h resolv.h')
- conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h')
+
+ if not conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h'):
+ # Some hosts need lib iconv for linking with lib intl
+ # So we try with flags just in case it helps.
+ oldflags = conf.env['LDFLAGS_INTL']
+ conf.env['LDFLAGS_INTL'] = "-liconv"
+ if not conf.CHECK_LIB('intl'):
+ conf.env['LDFLAGS_INTL'] = oldflags
+ else:
+ conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h')
+
+ conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')
conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h')
conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True)