Bug 8018 - configure doesn't find iconv library
Summary: configure doesn't find iconv library
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.8
Hardware: All Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 19:29 UTC by Mike Bombich
Modified: 2011-03-21 02:39 UTC (History)
0 users

See Also:


Attachments
Adds "AC_SEARCH_LIBS(iconv, iconv)" to configure.ac (435 bytes, application/octet-stream)
2011-03-16 19:29 UTC, Mike Bombich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Bombich 2011-03-16 19:29:14 UTC
Created attachment 6296 [details]
Adds "AC_SEARCH_LIBS(iconv, iconv)" to configure.ac

The configure script looks for libiconv_open when determining if support is available for iconv. It should look for simply "iconv" on Mac OS X. I have attached a patch to adds this search criteria to configure.ac.


[bombich:~/Desktop/rsync-3.0.8] ./configure | grep iconv
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for library containing libiconv_open... no
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for iconv_open... no
checking for libiconv_open... no

[bombich:~/Desktop/rsync-3.0.8] make
...

[bombich:~/Desktop/rsync-3.0.8] ./rsync --version
rsync  version 3.0.8pre1  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, no iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

[bombich:~/Desktop/rsync-3.0.8] patch -p1 < ~/Desktop/rsync-iconv-osx.diff 
patching file configure.ac

[bombich:~/Desktop/rsync-3.0.8] make reconfigure | grep iconv
running CONFIG_SHELL=/bin/sh /bin/sh /Users/bombich/Desktop/rsync-3.0.8/configure.sh   --no-create
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for library containing iconv... -liconv
checking for library containing libiconv_open... no
checking for iconv declaration... 
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for iconv_open... yes

[bombich:~/Desktop/rsync-3.0.8] make
...

[bombich:~/Desktop/rsync-3.0.8] ./rsync --version
rsync  version 3.0.8pre1  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
Comment 1 Wayne Davison 2011-03-21 02:39:06 UTC
Interesting.  On my (older) OS X, configure is finding libiconv_open.  I have tweaked your suggested fix to look for iconv_open in addition to libiconv_open when checking if -liconv is needed.  (I like this better than looking for just iconv.)