Build problem with libiconv
Ken Cross
kcross at nssolutions.com
Mon Feb 17 12:04:55 GMT 2003
Samba-folk:
When building SAMBA_3_0 on NetBSD (and I think any OS except Linux,
Solaris, or OSF) with iconv support, configure can't figure out that
iconv is really present. It's because in <iconv.h>, it defines:
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
where LIBICONV_PLUG is defined on OS's with plug libraries (Linux,
Solaris, or OSF). What I've done locally to fix it is:
Index: configure.in
===================================================================
RCS file: /cvsroot/samba/source/configure.in,v
retrieving revision 1.300.2.43
diff -p -u -r1.300.2.43 configure.in
--- configure.in 14 Feb 2003 00:47:27 -0000 1.300.2.43
+++ configure.in 17 Feb 2003 11:56:37 -0000
@@ -1490,7 +1490,7 @@ AC_ARG_WITH(libiconv,
AC_MSG_RESULT(yes)
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
- AC_CHECK_LIB(iconv, iconv_open)
+ AC_CHECK_LIB(iconv, libiconv_open)
AC_DEFINE_UNQUOTED(WITH_LIBICONV, "${withval}",[Path to iconv])
;;
esac ],
However, I think this'll break OS's with plug libraries (Linux, Solaris,
or OSF). What configure should really do is try one (iconv_open) then
the other (libiconv_open). (I'm not sure what's involved in that or I'd
have done it.)
Ken
________________________________
Ken Cross
Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at nssolutions.com
More information about the samba-technical
mailing list