From 4aafa69ea3635c8c0e4822924f870949f37f6f49 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 25 Jul 2013 19:41:02 +0200 Subject: [PATCH] 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 Reviewed-by: Andrew Bartlett Autobuild-User(master): Christian Ambach Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104 (cherry picked from commit da891e2101c568d2f0b9a2bda78702826ea68f3c) --- lib/replace/wscript | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/replace/wscript b/lib/replace/wscript index ad9669d7d09..0dc85ac6851 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -386,6 +386,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') -- 2.11.4.GIT