diff configure.in @ 114:e213bfcf9aa7 stable-0-6-24

patch from Chris Eagle to build on cygwin
author Carl Byington <carl@five-ten-sg.com>
date Thu, 11 Dec 2008 11:58:22 -0800
parents 554e9a422778
children ed2a260bbb98
line wrap: on
line diff
--- a/configure.in	Thu Dec 04 10:46:42 2008 -0800
+++ b/configure.in	Thu Dec 11 11:58:22 2008 -0800
@@ -1,5 +1,5 @@
 AC_PREREQ(2.59)
-AC_INIT(libpst,0.6.23,carl@five-ten-sg.com)
+AC_INIT(libpst,0.6.24,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
@@ -88,6 +88,31 @@
     AC_MSG_WARN([This should be building on Mac OSX, adding /usr/lib to the library path])
 fi
 
+AC_MSG_CHECKING([if iconv uses const arguments])
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([
+        #include <iconv.h>
+        int main(int argc, char **argv)
+        {
+            size_t  inlen = 100;
+            char buffer[[inlen]];
+            char *p = buffer;
+            size_t utf8_len = 2 * inlen + 1;
+            char utf8_buffer[[utf8_len]];
+            char *utf8_p = utf8_buffer;
+            iconv_t cd = 0;
+            iconv(cd, (const char**)&p, &inlen, &utf8_p, &utf8_len);
+        }
+    ],
+    [AC_DEFINE(ICONV_CONST,const,[do we have const headers])
+     AC_MSG_RESULT([yes])
+    ],
+    [AC_DEFINE(ICONV_CONST,,[do we have const headers])
+     AC_MSG_RESULT([no])
+    ])
+AC_LANG_POP([C++])
+
+
 # The following lines adds the --enable-pst-debug option to configure:
 #
 # Give the user the choice to enter one of these: