# Process this file with autoconf to produce a configure script.
-AC_INIT([LHa for UNIX], 1.14i-ac20020629, jca02266@nifty.ne.jp, lha)
+AC_INIT([LHa for UNIX], 1.14i-ac20020729, jca02266@nifty.ne.jp, lha)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/param.h sys/time.h)
-AC_CHECK_HEADERS(pwd.h grp.h)
+AC_CHECK_HEADERS(pwd.h grp.h utime.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_CHECK_FUNCS(mktime timelocal tzset ftime gettimeofday utime)
AC_CHECK_FUNCS(mkdir rmdir ftruncate lchown mkstemp link)
AC_CHECK_FUNCS(getpwuid getgrgid getpwnam getgrnam)
+AC_CHECK_FUNCS(iconv)
AC_REPLACE_FUNCS(vsnprintf)
if test $ac_header_dirent = no; then
main()
{
- char *s = "\xff";
+ char *s = "\377";
if (strchr(s, 0xff) != s) return 1;
- if (strchr(s, '\xff') != s) return 1;
+ if (strchr(s, '\377') != s) return 1;
+ if (strrchr(s, 0xff) != s) return 1;
+ if (strrchr(s, '\377') != s) return 1;
return 0; /* ok */
}
-], lha_cv_strchr_8bit_clean=yes,lha_cv_strchr_8bit_clean=no))
+], lha_cv_strchr_8bit_clean=yes,
+ lha_cv_strchr_8bit_clean=no,
+ lha_cv_strchr_8bit_clean=no))
-if test $lha_cv_strchr_8bit_clean = yes; then
+if test x$lha_cv_strchr_8bit_clean = xyes; then
AC_DEFINE(STRCHR_8BIT_CLEAN, 1,
[Define to 1 if strchr()/strrchr() works correctly.])
fi
if test x$enable_multibyte_filename != xno; then
AC_DEFINE_UNQUOTED(MULTIBYTE_FILENAME, $enable_multibyte_filename,
[Define to CODE_EUC or CODE_SJIS if you want to use multibyte filename])
+
+ case $target_os in
+ darwin*)
+ # for multibyte filename
+ LDFLAGS="$LDFLAGS -framework CoreFoundation"
+ ;;
+ esac
fi
# make user/group name extented header