OSDN Git Service

* src/header.c (get_header): fixed wrong end mark checking.
[lha/lha.git] / configure.ac
index 7c3aa3b..f9b3e23 100644 (file)
@@ -1,5 +1,5 @@
 # Process this file with autoconf to produce a configure script.
-AC_INIT([LHa for UNIX], 1.14i-ac20020706, 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)
@@ -22,7 +22,7 @@ AC_SEARCH_LIBS(opendir, [mingwex])
 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
@@ -59,6 +59,7 @@ AC_CHECK_FUNCS(strchr strdup memcpy memset memmove strcasecmp)
 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
@@ -81,14 +82,18 @@ char *strchr (), *strrchr ();
 
 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
@@ -179,6 +184,13 @@ AC_MSG_RESULT($enable_multibyte_filename)
 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