This version needs to solve about config.rpath, which AM_ICONV requires.
SVN-Revision: 3017
HAVE_POSIX_ICONV_IN_LIBC)
IF(HAVE_POSIX_ICONV_IN_LIBC)
SET(HAVE_ICONV true)
- SET(ICONV_IS_POSIX true)
+ SET(ICONV_CONST "const")
ELSE(HAVE_POSIX_ICONV_IN_LIBC)
# Try non-POSIX-conforming iconv() in libc
HAVE_NONPOSIX_ICONV_IN_LIBC)
IF(HAVE_NONPOSIX_ICONV_IN_LIBC)
SET(HAVE_ICONV true)
+ SET(ICONV_CONST "")
ELSE(HAVE_NONPOSIX_ICONV_IN_LIBC)
# iconv isn't in libc, try libiconv
HAVE_POSIX_ICONV_IN_LIBICONV)
IF(HAVE_POSIX_ICONV_IN_LIBICONV)
SET(HAVE_ICONV true)
- SET(ICONV_IS_POSIX true)
+ SET(ICONV_CONST "const")
LIST(APPEND ADDITIONAL_LIBS "iconv")
ELSE(HAVE_POSIX_ICONV_IN_LIBICONV)
HAVE_NONPOSIX_ICONV_IN_LIBICONV)
IF(HAVE_NONPOSIX_ICONV_IN_LIBICONV)
SET(HAVE_ICONV true)
+ SET(ICONV_CONST "")
LIST(APPEND ADDITIONAL_LIBS "iconv")
- ENDIF(HAVE_NONPOSIX_ICONV_IN_LIBICONV)
+ ENDIF(HAVE_NONPOSIX_ICONV_IN_LIBICONV)
ENDIF(HAVE_POSIX_ICONV_IN_LIBICONV)
ENDIF(HAVE_NONPOSIX_ICONV_IN_LIBC)
ENDIF(HAVE_POSIX_ICONV_IN_LIBC)
rm -f bsdtar
rm -f bsdtar_test
rm -f build/autoconf/compile
-rm -f build/autoconf/config.*
+rm -f build/autoconf/config.guess
+rm -f build/autoconf/config.sub
rm -f build/autoconf/depcomp
rm -f build/autoconf/install-sh
rm -f build/autoconf/libtool.m4
/* Define to 1 if you have the `iconv' function. */
#cmakedefine HAVE_ICONV 1
-/* Define to 1 if the 'iconv' function follows POSIX. */
-#cmakedefine ICONV_IS_POSIX 1
-
/* Define to 1 if you have the <iconv.h> header file. */
#cmakedefine HAVE_ICONV_H 1
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1
+/* Define as const if the declaration of iconv() needs const. */
+#cmakedefine ICONV_CONST ${ICONV_CONST}
+
/* Define to 1 if you have the `_ctime64_s' function. */
#cmakedefine HAVE__CTIME64_S 1
if test "x$with_iconv" != "xno"; then
AC_CHECK_HEADERS([iconv.h])
- AC_CHECK_LIB(iconv, iconv)
- AC_CHECK_FUNCS([iconv])
+ AM_ICONV
fi
AC_ARG_WITH([lzma],
archive_wstring_append_from_mbs(struct archive *a, struct archive_wstring *dest, const char *p, size_t len)
{
char buff[256];
-#if ICONV_IS_POSIX
- const char *inp;
-#else
- char *inp;
-#endif
+ ICONV_CONST char *inp;
size_t remaining;
iconv_t cd;
int return_value = 0; /* success */
archive_string_append_from_unicode_to_mbs(struct archive *a, struct archive_string *as, const wchar_t *w, size_t len)
{
char buff[256];
-#if ICONV_IS_POSIX
- const char *inp;
-#else
- char *inp;
-#endif
+ ICONV_CONST char *inp;
size_t remaining;
iconv_t cd;
int return_value = 0; /* success */