about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-02-01 10:52:50 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-02-01 10:52:50 +0000
commitd1d67428480b8fb1b38d3408fad6ca53e14823cc (patch)
treee910011f4598d169c1fe760061c0411269699316
parent8b53cc45bd7f1e1f1b2aa5db09903ca8b40f6d70 (diff)
downloadzsh-d1d67428480b8fb1b38d3408fad6ca53e14823cc.tar.gz
zsh-d1d67428480b8fb1b38d3408fad6ca53e14823cc.tar.xz
zsh-d1d67428480b8fb1b38d3408fad6ca53e14823cc.zip
20759, 20760, 20765: Improve Cygwin configuration
-rw-r--r--ChangeLog6
-rw-r--r--Src/system.h2
-rw-r--r--Src/utils.c4
-rw-r--r--configure.ac10
4 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b3288f9ef..6de969f92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-01  Peter Stephenson  <pws@csr.com>
+
+	* Peter A. Castro: 20759 updated as 20760 and 20765: configure.ac,
+	Src/system.h, Src/utils.c: Improve configuration of libiconv and
+	pcre on Cygwin.
+
 2005-01-28  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* unposted: Completion/Unix/Command/_rsync: Added new options
diff --git a/Src/system.h b/Src/system.h
index 65e681771..37f7d9fe3 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -700,7 +700,7 @@ extern short ospeed;
 #else
 # ifdef HAVE_LANGINFO_H
 #   include <langinfo.h>
-#   if defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
+#   if defined(HAVE_ICONV_H) || defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
 #     include <iconv.h>
 #   endif
 # endif
diff --git a/Src/utils.c b/Src/utils.c
index 21416a535..26e6b934a 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3510,7 +3510,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
     size_t count;
 #else
     unsigned int wval;
-# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && (defined(HAVE_ICONV) || defined(HAVE_LIBICONV))
+# if defined(HAVE_NL_LANGINFO) && defined(CODESET) && (defined(HAVE_ICONV_H) || defined(HAVE_ICONV) || defined(HAVE_LIBICONV))
     iconv_t cd;
     char inbuf[4];
     size_t inbytes, outbytes;
@@ -3631,7 +3631,7 @@ getkeystring(char *s, int *len, int fromwhere, int *misc)
 		    t += ucs4toutf8(t, wval);
 		    continue;
 		} else {
-#   if defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
+#   if defined(HAVE_ICONV_H) || defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
     	    	    inbytes = 4;
 		    outbytes = 6;
     	    	    inptr = inbuf;
diff --git a/configure.ac b/configure.ac
index 1b87dadaf..321cf56fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -529,7 +529,7 @@ AC_CHECK_HEADERS(sys/time.h sys/times.h sys/select.h termcap.h termio.h \
 		 locale.h errno.h stdio.h stdlib.h unistd.h sys/capability.h \
 		 utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
 		 netinet/in_systm.h pcre.h langinfo.h wchar.h stddef.h \
-		 sys/stropts.h)
+		 sys/stropts.h iconv.h)
 if test $dynamic = yes; then
   AC_CHECK_HEADERS(dlfcn.h)
   AC_CHECK_HEADERS(dl.h)
@@ -729,9 +729,15 @@ AC_CHECK_LIB(socket, socket)
 
 AC_CHECK_LIB(iconv, iconv)
 
+if test "$host_os" = cygwin; then
+dnl cygwin iconv() is really libiconv()
+AC_CHECK_LIB(iconv, libiconv)
+fi
+
 if test x$enable_pcre = xyes; then
 dnl pcre-config should probably be employed here
-AC_SEARCH_LIBS(pcre_compile, pcre)
+dnl AC_SEARCH_LIBS(pcre_compile, pcre)
+  LIBS="`pcre-config --libs` $LIBS"
 fi
 
 dnl ---------------------