1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(lha, 1.14f)
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
20 dnl Checks for libraries.
22 dnl Checks for header files.
25 AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/time.h)
27 dnl Checks for typedefs, structures, and compiler characteristics.
32 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
39 ], [struct tm t; t.tm_gmtoff;],
40 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)
43 if test "x$ac_cv_struct_tm_gmtoff" = xyes; then
44 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if your struct tm has tm_gmtoff])
47 AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_struct_st_ino,
49 #include <sys/types.h>
51 ], [struct stat s; s.st_ino;],
52 ac_cv_struct_st_ino=yes, ac_cv_struct_st_ino=no)
55 if test "x$ac_cv_struct_st_ino" = xyes; then
56 AC_DEFINE(HAVE_ST_INO, 1, [Define if your struct stat has st_ino])
59 dnl Checks for library functions.
62 AC_CHECK_FUNCS(strchr memcpy)
63 AC_CHECK_FUNCS(mktime timelocal tzset ftime gettimeofday)
64 AC_CHECK_FUNCS(mkdir rmdir strdup memset ftruncate lchown)
65 AC_CHECK_FUNCS(strcasecmp)
68 if test $ac_header_dirent = no; then
69 LIBOBJS="$LIBOBJS lhdir.o"
72 dnl support kanji code conversion
74 AC_ARG_ENABLE(text_conv,
75 [ --enable-text-conv support text code convert from/to EUC [default=yes]],
76 , enable_text_conv=yes)
78 if test $enable_text_conv = yes; then
82 dnl whether use the -lh6- method
84 [ --enable-lh6 create the -lh6- archive default [default=no]],
87 if test "x$enable_lh6" = "xyes"; then
88 AC_DEFINE(SUPPORT_LH6, 1, [Define if you want to use the -lh6- method, default])
92 AC_MSG_CHECKING(template of the temporary file is )
94 [ --with-tmp-file=TEMPLATE temporary file template [default=/tmp/lhXXXXXX]],
96 yes|no) AC_MSG_ERROR(you should have specified path name);;
98 with_tmp_file=/tmp/lhXXXXXX)
100 AC_MSG_RESULT($with_tmp_file)
101 AC_DEFINE_UNQUOTED(TMP_FILENAME_TEMPLATE, "$with_tmp_file",
102 [temporary file template])
104 dnl incremental indicator
105 AC_ARG_ENABLE(indicator,
106 [ --enable-indicator need incremental indicator [default=yes]],
109 enable_indicator=yes)
111 if test "x$enable_indicator" = xyes; then
112 AC_DEFINE(NEED_INCREMENTAL_INDICATOR, 1, [Define you want to use the incremental indicator])
115 dnl support multibyte filename
116 AC_ARG_ENABLE(multibyte-char,
117 [ --enable-multibyte-char support multibyte(sjis) filename [default=yes]],
120 enable_multibyte_char=yes)
122 if test "x$enable_multibyte_char" = xyes; then
123 AC_DEFINE(MULTIBYTE_CHAR, 1, [Define you want to use multibyte filename])
126 AC_OUTPUT([Makefile src/Makefile man/Makefile])