The Samba-Bugzilla – Attachment 5053 Details for
Bug 4832
iconv library is not used.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.3.
0001-s3-aclocal.m4-Fix-iconv-checks-clean-up-m4-code.patch (text/plain), 4.05 KB, created by
Kai Blin
on 2009-12-04 03:07:49 UTC
(
hide
)
Description:
Patch for 3.3.
Filename:
MIME Type:
Creator:
Kai Blin
Created:
2009-12-04 03:07:49 UTC
Size:
4.05 KB
patch
obsolete
>From d8928ca781a226e3cf4be3935b4a6da6ed94e89b Mon Sep 17 00:00:00 2001 >From: Kai Blin <kai@samba.org> >Date: Fri, 4 Dec 2009 09:47:25 +0100 >Subject: [PATCH] s3 aclocal.m4: Fix iconv checks, clean up m4 code > >The check for iconv requiring giconv.h and libgiconv as well as >the check for iconv requiring biconv.h and libbiconv were using the wrong >variable to check for previous successful test results. This caused the checks >to always fall back to libbiconv on systems where that library was available. > >In the course of fixing this, I had to clean up the indentation in that piece of >code, and I also rewrote/added some comments. > >Many thanks to Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp> for the initial >patch and diagnosis. >(cherry picked from commit f5aff324cb9d965bbc75634596c3c40ffc588183) >--- > source/m4/aclocal.m4 | 57 ++++++++++++++++++++++++++----------------------- > 1 files changed, 30 insertions(+), 27 deletions(-) > >diff --git a/source/m4/aclocal.m4 b/source/m4/aclocal.m4 >index 9a4213d..52498a0 100644 >--- a/source/m4/aclocal.m4 >+++ b/source/m4/aclocal.m4 >@@ -420,45 +420,47 @@ AC_DEFUN(jm_ICONV, > jm_cv_giconv=no > jm_save_LIBS="$LIBS" > >- dnl Check for include in funny place but no lib needed >- if test "$jm_cv_func_iconv" != yes; then >- AC_TRY_LINK([#include <stdlib.h> >+ dnl Check for include in giconv.h but no lib needed >+ if test "$jm_cv_func_iconv" != yes; then >+ AC_TRY_LINK([#include <stdlib.h> > #include <giconv.h>], >+ [iconv_t cd = iconv_open("",""); >+ iconv(cd,NULL,NULL,NULL,NULL); >+ iconv_close(cd);], >+ jm_cv_func_iconv=yes >+ jm_cv_include="giconv.h" >+ jm_cv_giconv="yes" >+ jm_cv_lib_iconv="") >+ >+ dnl Standard iconv.h include, lib in glibc or libc ... >+ if test "$jm_cv_func_iconv" != yes; then >+ AC_TRY_LINK([#include <stdlib.h> >+#include <iconv.h>], > [iconv_t cd = iconv_open("",""); > iconv(cd,NULL,NULL,NULL,NULL); > iconv_close(cd);], >+ jm_cv_include="iconv.h" > jm_cv_func_iconv=yes >- jm_cv_include="giconv.h" >- jm_cv_giconv="yes" > jm_cv_lib_iconv="") > >- dnl Standard iconv.h include, lib in glibc or libc ... >+ dnl Include in giconv.h, libgiconv needed to link > if test "$jm_cv_func_iconv" != yes; then >+ jm_save_LIBS="$LIBS" >+ LIBS="$LIBS -lgiconv" > AC_TRY_LINK([#include <stdlib.h> >-#include <iconv.h>], >+#include <giconv.h>], > [iconv_t cd = iconv_open("",""); > iconv(cd,NULL,NULL,NULL,NULL); > iconv_close(cd);], >- jm_cv_include="iconv.h" >- jm_cv_func_iconv=yes >- jm_cv_lib_iconv="") >- >- if test "$jm_cv_lib_iconv" != yes; then >- jm_save_LIBS="$LIBS" >- LIBS="$LIBS -lgiconv" >- AC_TRY_LINK([#include <stdlib.h> >-#include <giconv.h>], >- [iconv_t cd = iconv_open("",""); >- iconv(cd,NULL,NULL,NULL,NULL); >- iconv_close(cd);], >- jm_cv_lib_iconv=yes >- jm_cv_func_iconv=yes >- jm_cv_include="giconv.h" >- jm_cv_giconv=yes >- jm_cv_lib_iconv="giconv") >+ jm_cv_lib_iconv=yes >+ jm_cv_func_iconv=yes >+ jm_cv_include="giconv.h" >+ jm_cv_giconv=yes >+ jm_cv_lib_iconv="giconv") > >- LIBS="$jm_save_LIBS" >+ LIBS="$jm_save_LIBS" > >+ dnl Include in iconv.h, libiconv needed to link > if test "$jm_cv_func_iconv" != yes; then > jm_save_LIBS="$LIBS" > LIBS="$LIBS -liconv" >@@ -472,7 +474,8 @@ AC_DEFUN(jm_ICONV, > jm_cv_lib_iconv="iconv") > LIBS="$jm_save_LIBS" > >- if test "$jm_cv_lib_iconv" != yes; then >+ dnl Include in biconv.h, libbiconv needed to link >+ if test "$jm_cv_func_iconv" != yes; then > jm_save_LIBS="$LIBS" > LIBS="$LIBS -lbiconv" > AC_TRY_LINK([#include <stdlib.h> >@@ -487,7 +490,7 @@ AC_DEFUN(jm_ICONV, > jm_cv_lib_iconv="biconv") > > LIBS="$jm_save_LIBS" >- fi >+ fi > fi > fi > fi >-- >1.6.3.3 >
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
Flags:
bjacke
:
review+
Actions:
View
Attachments on
bug 4832
: 5053 |
5054