Build problem with libiconv

Ken Cross kcross at
Mon Feb 17 12:04:55 GMT 2003


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:

 #define iconv_open libiconv_open

where LIBICONV_PLUG is defined on OS's with plug libraries (Linux,
Solaris, or OSF).  What I've done locally to fix it is:

RCS file: /cvsroot/samba/source/,v
retrieving revision 1.300.2.43
diff -p -u -r1.300.2.43
---        14 Feb 2003 00:47:27 -0000      1.300.2.43
+++        17 Feb 2003 11:56:37 -0000
@@ -1490,7 +1490,7 @@ AC_ARG_WITH(libiconv,
     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 Cross

Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at 

More information about the samba-technical mailing list