X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=configure.ac;h=0ddae678cbb254b197ad8cfcec5ef8adb2b71619;hb=0fc409bdfa6c69ade5ae5d1cfb50b0a827cc9f1f;hp=4ba4fffd42b48220fa298bfcd8b62f32c0f9ee29;hpb=aaacd3696e258dfeffc81177b27898535775819f;p=lha%2Flha.git diff --git a/configure.ac b/configure.ac index 4ba4fff..0ddae67 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,34 @@ if test $ac_header_dirent = no; then AC_LIBOBJ(lhdir) fi +# checking whether 8 bit clean or not +AC_CACHE_CHECK([whether strchr()/strrchr() is 8bit clean], + [lha_cv_strchr_8bit_clean], + AC_TRY_RUN([ +#if STDC_HEADERS +# include +#else +# if !HAVE_STRCHR +# define strchr index +# define strrchr rindex +# endif +char *strchr (), *strrchr (); +#endif + +main() +{ + char *s = "\xff"; + if (strchr(s, 0xff) != s) return 1; + if (strchr(s, '\xff') != s) return 1; + return 0; /* ok */ +} +], lha_cv_strchr_8bit_clean=yes,lha_cv_strchr_8bit_clean=no)) + +if test $ac_cv_shell_true_works = yes; then + AC_DEFINE(STRCHR_8BIT_CLEAN, 1, + [Define to 1 if strchr()/strrchr() works correctly.]) +fi + # support kanji code conversion AC_SUBST(DEF_KCODE) AC_ARG_ENABLE(text_conv,