1 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h)
8 dnl Checks for programs.
10 AC_PROG_GCC_TRADITIONAL
14 dnl on MINIX, define _MINIX and _POSIX_SOURCE
17 dnl Checks for libraries.
19 dnl Checks for header files.
22 AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/time.h)
24 dnl Checks for typedefs, structures, and compiler characteristics.
29 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
36 ], [struct tm t; t.tm_gmtoff;],
37 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)
40 if test "x$ac_cv_struct_tm_gmtoff" = xyes; then
41 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if your struct tm has tm_gmtoff])
44 AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_struct_st_ino,
46 #include <sys/types.h>
48 ], [struct stat s; s.st_ino;],
49 ac_cv_struct_st_ino=yes, ac_cv_struct_st_ino=no)
52 if test "x$ac_cv_struct_st_ino" = xyes; then
53 AC_DEFINE(HAVE_ST_INO, 1, [Define if your struct stat has st_ino])
56 dnl Checks for library functions.
59 AC_CHECK_FUNCS(strchr memcpy)
60 AC_CHECK_FUNCS(mktime timelocal tzset ftime gettimeofday)
61 AC_CHECK_FUNCS(mkdir rmdir strdup memset ftruncate lchown mkstemp)
62 AC_CHECK_FUNCS(strcasecmp link)
64 if test $ac_header_dirent = no; then
68 dnl support kanji code conversion
70 AC_ARG_ENABLE(text_conv,
71 [ --enable-text-conv support text code convert from/to EUC [default=yes]],
72 , enable_text_conv=yes)
74 if test $enable_text_conv = yes; then
79 AC_SUBST(SUPPORT_LZHUFF_METHOD)
80 SUPPORT_LZHUFF_METHOD=-DSUPPORT_LH7
82 dnl whether use the -lh567- method
83 AC_MSG_CHECKING(default archive method is )
84 AC_ARG_WITH(default_method,
85 [ --with-default-method=[567] create the -lh[567]- archive default [default=5]],
88 *) AC_MSG_ERROR(you should have specified 5, 6 or 7);;
90 with_default_method=5)
92 AC_MSG_RESULT(-lh$with_default_method-)
93 AC_DEFINE_UNQUOTED(DEFAULT_LZHUFF_METHOD, LZHUFF${with_default_method}_METHOD_NUM, [Define it to 5, 6 or 7 which you want to use -lhX- method, default])
96 AC_MSG_CHECKING(template of the temporary file is )
98 [ --with-tmp-file=TEMPLATE temporary file template [default=/tmp/lhXXXXXX]],
100 yes|no) AC_MSG_ERROR(you should have specified path name);;
102 with_tmp_file=/tmp/lhXXXXXX)
104 AC_MSG_RESULT($with_tmp_file)
105 AC_DEFINE_UNQUOTED(TMP_FILENAME_TEMPLATE, "$with_tmp_file",
106 [temporary file template])
108 dnl incremental indicator
109 AC_ARG_ENABLE(indicator,
110 [ --enable-indicator need incremental indicator [default=yes]],
113 enable_indicator=yes)
115 if test "x$enable_indicator" = xyes; then
116 AC_DEFINE(NEED_INCREMENTAL_INDICATOR, 1, [Define you want to use the incremental indicator])
119 dnl support multibyte filename
120 AC_ARG_ENABLE(multibyte-char,
121 [ --enable-multibyte-char support multibyte(sjis) filename [default=yes]],
124 enable_multibyte_char=yes)
126 if test "x$enable_multibyte_char" = xyes; then
127 AC_DEFINE(MULTIBYTE_CHAR, 1, [Define you want to use multibyte filename])
130 AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])