-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -111,59 +111,6 @@ | ||
gl_INIT | ||
|
||
ICONV_CONVERTS_EUC_CN=no | ||
-# partly based on gnulib/m4/iconv.m4 | ||
-if test "x$am_func_iconv" = "xyes" ; then | ||
- AC_CACHE_CHECK([whether iconv converts EUC-CN to UTF-8], [texinfo_cv_sys_iconv_converts_euc_cn], [ | ||
- euc_cn_save_LIBS="$LIBS" | ||
- #if test $am_cv_lib_iconv = yes; then | ||
- LIBS="$LIBS $LIBICONV" | ||
- #fi | ||
- texinfo_cv_sys_iconv_converts_euc_cn=no | ||
- for euc_cn_iconv_const in '' 'const'; do | ||
- AC_RUN_IFELSE( | ||
- [AC_LANG_PROGRAM( | ||
- [[ | ||
-#include <iconv.h> | ||
-#include <string.h> | ||
- | ||
-#ifndef ICONV_CONST | ||
-# define ICONV_CONST $euc_cn_iconv_const | ||
-#endif | ||
- ]], | ||
- [[int result = 0; | ||
- { | ||
- iconv_t cd_euc_cn_to_utf8 = iconv_open ("UTF-8", "EUC-CN"); | ||
- if (cd_euc_cn_to_utf8 != (iconv_t)(-1)) | ||
- { | ||
- static ICONV_CONST char input[] = "abc"; | ||
- char buf[10]; | ||
- ICONV_CONST char *inptr = input; | ||
- size_t inbytesleft = strlen (input); | ||
- char *outptr = buf; | ||
- size_t outbytesleft = sizeof (buf); | ||
- size_t res = iconv (cd_euc_cn_to_utf8, | ||
- &inptr, &inbytesleft, | ||
- &outptr, &outbytesleft); | ||
- if (res != 0) | ||
- result |= 2; | ||
- if (strcmp(buf, input)) | ||
- result |= 4; | ||
- iconv_close (cd_euc_cn_to_utf8); | ||
- } | ||
- else | ||
- result |= 1; | ||
- } | ||
- return result; | ||
-]])], | ||
- [texinfo_cv_sys_iconv_converts_euc_cn=yes], ,) | ||
- test "$texinfo_cv_sys_iconv_converts_euc_cn" = no || break | ||
- done | ||
- LIBS="$euc_cn_save_LIBS" | ||
- ]) | ||
- if test "$texinfo_cv_sys_iconv_converts_euc_cn" = yes; then | ||
- ICONV_CONVERTS_EUC_CN=yes | ||
- fi | ||
-fi | ||
|
||
AC_SUBST([ICONV_CONVERTS_EUC_CN]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters