summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5147b09e4..e0ad7a218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-08  Oliver Kiddle  <opk@zsh.org>
+
+	* 21107: configure.ac: handle case where there is a native iconv
+	but GNU libiconv's iconv.h is picked up first
+
 2005-04-06  Clint Adams  <clint@zsh.org>
 
 	* 21096: Completion/X/Command/_gv: update for gv 3.6,
diff --git a/configure.ac b/configure.ac
index 8b967f365..81d5fb2e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -743,6 +743,11 @@ if test "x$ac_cv_header_iconv_h" = "xyes"; then
     if test "x$ac_found_iconv" != "xno"; then
       LIBS="-liconv $LIBS"
     fi
+  else
+    dnl Handle case where there is a native iconv but iconv.h is from libiconv
+    AC_CHECK_DECL(_libiconv_version,
+      [ AC_CHECK_LIB(iconv, libiconv, LIBS="-liconv $LIBS") ],,
+      [ #include <iconv.h> ])
   fi
 fi
 if test "x$ac_found_iconv" = xyes; then