summaryrefslogtreecommitdiff
path: root/lib/util/charset/wscript_configure
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2010-10-31 16:24:46 +0300
committerMatthieu Patou <mat@matws.net>2010-10-31 18:51:54 +0300
commit9f0fb0261ecdecb093ced28024a36973bf1938b9 (patch)
tree62df03e045130aadb16d659f5e25c7db164401a6 /lib/util/charset/wscript_configure
parent97c0def79d123406b44289a131c054ebe863823d (diff)
downloadsamba-9f0fb0261ecdecb093ced28024a36973bf1938b9.tar.gz
samba-9f0fb0261ecdecb093ced28024a36973bf1938b9.tar.bz2
samba-9f0fb0261ecdecb093ced28024a36973bf1938b9.zip
build: check that if we provide -liconv we can build shared libs
On Solaris with sun studio compiling an executable with -liconv even if there is no libiconv.so or libiconv.a will work but not for a shared lib. This problem leads to build problem as the linker won't be able to find libiconv when building shared lib as liconv is wrongly specified
Diffstat (limited to 'lib/util/charset/wscript_configure')
-rw-r--r--lib/util/charset/wscript_configure6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index 274a2d7630..e54bfcc924 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -4,6 +4,12 @@
# as the external libiconv can use a macro to override iconv_open to libiconv_open
# and then we may find the wrong iconv.h later due to other packages looking
# in /usr/local
+# We check for the lib iconv when building a shared lib has some compiler/linker
+# managed to link when specifying -liconv a executable even if there is no
+# libiconv.so or libiconv.a
+
+conf.CHECK_LIB(libs="iconv", shlib=True)
+
if (conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=False, headers='iconv.h') or
conf.CHECK_FUNCS('iconv_open', headers='iconv.h')):
conf.DEFINE('HAVE_NATIVE_ICONV', 1)