s4-waf: look for libiconv before checking libc
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Mar 2010 05:18:18 +0000 (16:18 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:08 +0000 (20:27 +1000)
This is needed for solaris8

lib/util/charset/wscript_configure

index 0322bea4463bcf0fea1a02dcb90a8db04408566c..fe99600803521e116cba71318f2215afc1c136b7 100644 (file)
@@ -1,2 +1,7 @@
-if conf.CHECK_FUNCS_IN('iconv_open', 'iconv', checklibc=True, headers='iconv.h'):
+# rather strangely, we need to look for libiconv before checking libc
+# 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
+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)