summaryrefslogtreecommitdiffstats
path: root/lib/replace
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-07-25 19:41:02 +0200
committerChristian Ambach <ambi@samba.org>2014-01-17 19:30:33 +0100
commitda891e2101c568d2f0b9a2bda78702826ea68f3c (patch)
treed846bd5f150499cccc3dcc52cdadd1e3d49d5f92 /lib/replace
parent31db0c8acdd68f396417e1f6504a91a40295bc89 (diff)
downloadsamba-da891e2101c568d2f0b9a2bda78702826ea68f3c.tar.gz
samba-da891e2101c568d2f0b9a2bda78702826ea68f3c.tar.xz
samba-da891e2101c568d2f0b9a2bda78702826ea68f3c.zip
waf:lib/replace gettext configure checks
Make sure we only try to work with gettext if we found the prototypes and were able to link Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/wscript9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 650dc065879..ab950184021 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -407,6 +407,15 @@ removeea setea
# save for dependency definitions
conf.env.intl_libs='iconv intl'
+ # did we find both prototypes and a library to link against?
+ # if not, unset the detected values (see Bug #9911)
+ if not (conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DECL_GETTEXT']):
+ conf.undefine('HAVE_GETTEXT')
+ conf.undefine('HAVE_DECL_GETTEXT')
+ if not (conf.env['HAVE_DGETTEXT'] and conf.env['HAVE_DECL_DGETTEXT']):
+ conf.undefine('HAVE_DGETTEXT')
+ conf.undefine('HAVE_DECL_DGETTEXT')
+
# did the user insist on gettext (--with-gettext)?
if Options.options.gettext_location != 'None' and (not conf.env['HAVE_GETTEXT'] or not conf.env['HAVE_DGETTEXT']):
conf.fatal('library gettext not found at specified location')