The Samba-Bugzilla – Attachment 9554 Details for
Bug 9911
Build Samba 4.0.x on AIX with IBM XL C/C++ (gettext detection issues)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
9911_5.patch (text/plain), 6.97 KB, created by
Christian Ambach
on 2014-01-06 20:12:33 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Christian Ambach
Created:
2014-01-06 20:12:33 UTC
Size:
6.97 KB
patch
obsolete
>From 9e656650db8958cbe6957ca5912bcd72e9b959f4 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Wed, 4 Dec 2013 22:50:11 +0100 >Subject: [PATCH 1/5] waf: improve iconv checks > >there are broken iconv implementations around (e.g. on AIX) that you >can compile against but that refuse any mapping requests > >make sure we do the same as the autoconf-based build did and >fall back to our own code > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=10308 > >Signed-off-by: Christian Ambach <ambi@samba.org> >--- > source3/build/charset.py | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/source3/build/charset.py b/source3/build/charset.py >index 44852a6..8cef7da 100644 >--- a/source3/build/charset.py >+++ b/source3/build/charset.py >@@ -33,6 +33,12 @@ def CHECK_SAMBA3_CHARSET(conf, crossbuild=False): > default_unix_charset="UTF-8" > # TODO: this used to warn about the set charset on cross builds > >+ if default_dos_charset is False or default_unix_charset is False: >+ # we found iconv, but it failed to convert anything (e.g. on AIX) >+ conf.undefine('HAVE_NATIVE_ICONV'); >+ default_dos_charset = "ASCII" >+ default_unix_charset = "UTF8" >+ > conf.DEFINE('DEFAULT_DOS_CHARSET', default_dos_charset, quote=True) > conf.DEFINE('DEFAULT_UNIX_CHARSET', default_unix_charset, quote=True) > >-- >1.8.1.2 > > >From 31e590b8e20ff4ee1175ff1c732c0ced50515d77 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 2 Jan 2014 22:22:23 +0100 >Subject: [PATCH 2/5] lib/replace add prototypes for libintl functions > >one some platforms (e.g. AIX), libintl.h is not there, but libintl.a is >so the functions can be used if prototypes are there > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 >Signed-off-by: Christian Ambach <ambi@samba.org> >--- > lib/replace/replace.h | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > >diff --git a/lib/replace/replace.h b/lib/replace/replace.h >index c0b7997..8cab307 100644 >--- a/lib/replace/replace.h >+++ b/lib/replace/replace.h >@@ -899,4 +899,25 @@ int usleep(useconds_t); > void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); > #endif > >+/* prototypes of libintl functions */ >+#ifndef HAVE_DECL_GETTEXT >+char* gettext(const char* msgid); >+#endif >+ >+#ifndef HAVE_DECL_DGETTEXT >+char* dgettext(const char* domainname, const char* msgid); >+#endif >+ >+#ifndef HAVE_DECL_BINDTEXTDOMAIN >+char* bindtextdomain(const char* domainname, const char* dirname); >+#endif >+ >+#ifndef HAVE_DECL_TEXTDOMAIN >+char* textdomain(const char* domainname); >+#endif >+ >+#ifndef HAVE_DECL_BIND_TEXTDOMAIN_CODESET >+char* bind_textdomain_codeset(const char* domainname, const char* codeset); >+#endif >+ > #endif /* _LIBREPLACE_REPLACE_H */ >-- >1.8.1.2 > > >From f6e1453f8f397ab750770eb5738ed69ebfaef1f8 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 2 Jan 2014 22:23:16 +0100 >Subject: [PATCH 3/5] waf:lib/replace fix up libintl related checks > >on a default installation of AIX, libintl.a exists but no >libintl.h >So check for the declarations of those functions as well >to make sure that replace.h can declare those functions >if necessary > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 > >Signed-off-by: Christian Ambach <ambi@samba.org> >--- > lib/replace/wscript | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index a316032..a8d9ee1 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -371,6 +371,7 @@ removeea setea > if not Options.options.disable_gettext: > conf.CHECK_HEADERS('libintl.h') > conf.CHECK_LIB('intl') >+ conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h") > # *textdomain functions are not strictly necessary > conf.CHECK_FUNCS_IN('bindtextdomain textdomain bind_textdomain_codeset', > '', checklibc=True, headers='libintl.h') >-- >1.8.1.2 > > >From 600c7c93a8575766470244323e93c217017c5abf Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 12 Dec 2013 22:10:36 +0100 >Subject: [PATCH 4/5] waf:lib/replace fix gettext detection > >if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS >so we can find it during configure and build > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 >Signed-off-by: Christian Ambach <ambi@samba.org> >--- > lib/replace/wscript | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index a8d9ee1..fe0a9fd 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -369,6 +369,10 @@ removeea setea > > conf.env.intl_libs='' > if not Options.options.disable_gettext: >+ # any extra path given to look at? >+ if Options.options.gettext_location: >+ conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]); >+ conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]); > conf.CHECK_HEADERS('libintl.h') > conf.CHECK_LIB('intl') > conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h") >-- >1.8.1.2 > > >From 291c7ef9cdf440a667742493b4a9bc2b9f59b987 Mon Sep 17 00:00:00 2001 >From: Christian Ambach <ambi@samba.org> >Date: Thu, 12 Dec 2013 22:12:07 +0100 >Subject: [PATCH 5/5] waf:lib/replace change detection of gettext > >convert this to an automatic check: if no option is given, try to find gettext >and if found, use it >if user has specified --with-gettext, then bail out if it could not be found >in case of --without-gettext, skip all gettext related configure checks > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911 >Signed-off-by: Christian Ambach <ambi@samba.org> >Reviewed-By: Jelmer Vernooij <jelmer@samba.org> >--- > lib/replace/wscript | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/lib/replace/wscript b/lib/replace/wscript >index fe0a9fd..bee2563 100644 >--- a/lib/replace/wscript >+++ b/lib/replace/wscript >@@ -367,6 +367,7 @@ removeea setea > headers='netinet/in.h arpa/nameser.h resolv.h') > > >+ # 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? >@@ -402,10 +403,10 @@ removeea setea > if conf.env['HAVE_GETTEXT'] and conf.env['HAVE_DGETTEXT']: > # save for dependency definitions > conf.env.intl_libs='iconv intl' >- else: >- conf.fatal('library gettext not found, try specifying the path to ' + >- 'it with --with-gettext=</path/to/gettext> or ' + >- '--without-gettext to build without''') >+ >+ # did the user insist on gettext (--with-gettext)? >+ if Options.options.gettext_location and not conf.env['HAVE_GETTEXT'] and 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') > >-- >1.8.1.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9911
:
8964
|
8987
|
8998
|
9007
|
9106
|
9107
|
9114
|
9115
|
9127
|
9419
|
9482
|
9483
|
9500
|
9554
|
9746
|
9747