build:wafsamba: dead code removal in gettext detection
authorThomas Nagy <tnagy@waf.io>
Sun, 25 Oct 2015 12:30:59 +0000 (13:30 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 27 Oct 2015 02:34:28 +0000 (03:34 +0100)
Since the --gettext-location command-line option has no effect, the misleading
code is removed. The samba functions ADD_CFLAGS must also be used in the future

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 27 03:34:28 CET 2015 on sn-devel-104

buildtools/wafsamba/wscript
lib/replace/wscript

index aca444be4010b170870ae0cc8d165ec6cbc9ab9c..f3e019c0b73bf4280e9038f68691461fac6c5b9c 100755 (executable)
@@ -78,9 +78,6 @@ def set_options(opt):
                    help='additional directory to search for libiconv',
                    action='store', dest='iconv_open', default='/usr/local',
                    match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h'])
-    opt.add_option('--with-gettext',
-                   help='additional directory to search for gettext',
-                   action='store', dest='gettext_location', default='None')
     opt.add_option('--without-gettext',
                    help=("Disable use of gettext"),
                    action="store_true", dest='disable_gettext', default=False)
index 0be52f7a431e6e0c9ca8c52f2428e263a0670714..a1c2094a00b7d07e6bff67fad4f99119f3da7fd6 100644 (file)
@@ -361,13 +361,6 @@ removeea setea
     # try to find libintl (if --without-gettext is not given)
     conf.env.intl_libs=''
     if not Options.options.disable_gettext:
-        # any extra path given to look at?
-        if not Options.options.gettext_location == 'None':
-           conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]);
-           conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]);
-        else:
-           conf.env['CFLAGS'].extend(["-I/usr/local"]);
-           conf.env['LDFLAGS'].extend(["-L/usr/local"]);
         conf.CHECK_HEADERS('libintl.h')
         conf.CHECK_LIB('intl')
         conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h")
@@ -407,10 +400,6 @@ removeea setea
        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')
-
     conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h')
 
     PTHREAD_CFLAGS='error'