From ec150ba85fdb96502a5a7907d70feecbe41b83b6 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 21 Nov 2013 23:02:38 +0100 Subject: [PATCH] waf: fix up libintl related checks checklibc=True and link=True gives back false-positives on AIX for gettext/dgettext and so the build fails later when libintl.h is not available So let's check this very pedantically Signed-off-by: Christian Ambach --- lib/replace/wscript | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index b6fb10b..3e43366 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -369,26 +369,28 @@ removeea setea conf.CHECK_LIB('intl') # *textdomain functions are not strictly necessary conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset', - '', checklibc=True, headers='libintl.h') + '', checklibc=False, link=False, headers='libintl.h') # gettext and dgettext must exist # on some systems (the ones with glibc, those are in libc) - if conf.CHECK_FUNCS_IN('dgettext gettext', '', checklibc=True, headers='libintl.h'): + if conf.CHECK_FUNCS_IN('dgettext gettext', '', checklibc=False, + link=False, headers='libintl.h'): # save for dependency definitions conf.env.intl_libs='' # others (e.g. FreeBSD) have seperate libintl - elif conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', checklibc=False, headers='libintl.h'): + elif conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', checklibc=False, + link=False, headers='libintl.h'): # save for dependency definitions conf.env.intl_libs='intl' # recheck with libintl conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset', - 'intl', checklibc=False, headers='libintl.h') + 'intl', checklibc=False, link=False, headers='libintl.h') else: # Some hosts need lib iconv for linking with lib intl # So we try with flags just in case it helps. oldflags = conf.env['EXTRA_LDFLAGS']; conf.env['EXTRA_LDFLAGS'].extend("-liconv") conf.CHECK_FUNCS_IN('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', - 'intl', checklibc=False, headers='libintl.h') + 'intl', checklibc=False, link=False, headers='libintl.h') conf.env['EXTRA_LDFLAGS'] = oldflags if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']: # save for dependency definitions -- 1.8.1.2