OSDN Git Service

* tests/lha-test7: sleep 1 to make sure for updating tests.
[lha/lha.git] / configure.ac
index 1731dea..159a6d8 100644 (file)
@@ -1,5 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 AC_INIT([LHa for UNIX], 1.14i-ac20021115, jca02266@nifty.ne.jp, lha)
+AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
@@ -22,7 +23,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 utime.h inttypes.h stdint.h)
+AC_CHECK_HEADERS(pwd.h grp.h utime.h inttypes.h stdint.h fnmatch.h)
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -31,7 +32,7 @@ AC_STRUCT_TM
 AC_STRUCT_TIMEZONE
 
 AC_CHECK_SIZEOF(long)
-AC_CHECK_TYPES([uid_t, gid_t, long long, uint64_t])
+AC_CHECK_TYPES([uid_t, gid_t, long long, uint64_t, ssize_t])
 AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct stat.st_ino],,,
 [
 #if HAVE_SYS_TYPES_H
@@ -56,12 +57,13 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct stat.st_ino],,,
 AC_TYPE_SIGNAL
 AC_FUNC_FORK
 AC_FUNC_UTIME_NULL
+AC_FUNC_FNMATCH
 AC_CHECK_FUNCS(strchr strdup memcpy memset memmove strcasecmp)
 AC_CHECK_FUNCS(mktime timelocal tzset ftime gettimeofday utime)
 AC_CHECK_FUNCS(mkdir rmdir ftruncate chsize lchown mkstemp link)
 AC_CHECK_FUNCS(getpwuid getgrgid getpwnam getgrnam)
-AC_CHECK_FUNCS(iconv)
-AC_REPLACE_FUNCS(vsnprintf)
+AC_CHECK_FUNCS(iconv basename)
+AC_REPLACE_FUNCS(vsnprintf fnmatch)
 
 if test $ac_header_dirent = no; then
   AC_LIBOBJ(lhdir)
@@ -268,6 +270,22 @@ if test "x$enable_backup_archive" = xyes; then
            [Define to 1 if you want to leave an old archive])
 fi
 
-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
+# enable this option if you need to ignore '.file' files
+# (mainly for the Mac OS X) *experimental*
+AC_MSG_CHECKING(whether enable -X option which ignore dot files)
+AC_ARG_ENABLE(ignore-dot-files,
+  AC_HELP_STRING([--enable-ignore-dot-files],
+                [enable -X option [[default=no]]]),
+  ,
+  # default
+  enable_ignore_dot_files=no)
+
+AC_MSG_RESULT($enable_ignore_dot_files)
+if test "x$enable_ignore_dot_files" = xyes; then
+  AC_DEFINE(IGNORE_DOT_FILES, 1,
+           [Define to 1 if you want to ignore dot files with -X command line switch])
+fi
+
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile olddoc/Makefile])
 AC_CONFIG_FILES([tests/Makefile tests/lha-test])
 AC_OUTPUT