DO NOT REPLY [Bug 5532] rsync / autoconf fails to detect libiconv on Solaris 10

samba-bugs at samba-bugs at
Mon Nov 3 10:54:30 GMT 2008

joern.clausen at changed:

           What    |Removed                     |Added
                 CC|                            |joern.clausen at uni-
                   |                            |

------- Comment #4 from joern.clausen at  2008-11-03 04:54 CST -------
I just stumbled over the same problem. I think this is what happens:

The code that uses iconv is enclosed in


So it is sufficient that the test for the iconv *type* succeeds, the usability
of the library itself does not matter.

The test "checking for library containing libiconv_open" fails, as Solaris'
libiconv is not suitable.

But the check "checking for iconv declaration" succeeds, if your compiler is a
gcc. It just so manages to compile the test using Sun's libiconv. It fails, if
you are using the Sun Studio compiler, which is much more picky and detects a
different prototype for the tested function. So with gcc, ICONV_CONST is
defined and the ifdef'ed code is used, with Sun's cc, ICONV_CONST is undefined
and libiconv is never touched again.

I think the solution would be to use a macro in the code that tested for the
usability of libiconv, not the type of the function iconv.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list