dnl Process this file with autoconf to produce a configure script. AC_INIT(src/lha.h) AM_INIT_AUTOMAKE(lha, 1.14f) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST dnl Checks for programs. AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL AC_PROG_MAKE_SET dnl on MINIX, define _MINIX and _POSIX_SOURCE AC_MINIX AC_EXEEXT AC_OBJEXT dnl Checks for libraries. dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h sys/file.h sys/time.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, [AC_TRY_COMPILE([ #if TM_IN_SYS_TIME #include #else #include #endif ], [struct tm t; t.tm_gmtoff;], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no) ]) if test "x$ac_cv_struct_tm_gmtoff" = xyes; then AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if your struct tm has tm_gmtoff]) fi AC_CACHE_CHECK([for st_ino in struct stat], ac_cv_struct_st_ino, [AC_TRY_COMPILE([ #include #include ], [struct stat s; s.st_ino;], ac_cv_struct_st_ino=yes, ac_cv_struct_st_ino=no) ]) if test "x$ac_cv_struct_st_ino" = xyes; then AC_DEFINE(HAVE_ST_INO, 1, [Define if your struct stat has st_ino]) fi dnl Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_UTIME_NULL AC_CHECK_FUNCS(strchr memcpy) AC_CHECK_FUNCS(mktime timelocal tzset ftime gettimeofday) AC_CHECK_FUNCS(mkdir rmdir strdup memset ftruncate lchown) AC_CHECK_FUNCS(strcasecmp) AC_SUBST(LIBOBJS) if test $ac_header_dirent = no; then LIBOBJS="$LIBOBJS lhdir.o" fi dnl support kanji code conversion AC_SUBST(DEF_KCODE) AC_ARG_ENABLE(text_conv, [ --enable-text-conv support text code convert from/to EUC [default=yes]], , enable_text_conv=yes) if test $enable_text_conv = yes; then DEF_KCODE=-DEUC fi dnl whether use the -lh6- method AC_ARG_ENABLE(lh6, [ --enable-lh6 create the -lh6- archive default [default=no]], , enable_lh6=no) if test "x$enable_lh6" = "xyes"; then AC_DEFINE(SUPPORT_LH6, 1, [Define if you want to use the -lh6- method, default]) fi dnl decide path names AC_MSG_CHECKING(template of the temporary file is ) AC_ARG_WITH(tmp_file, [ --with-tmp-file=TEMPLATE temporary file template [default=/tmp/lhXXXXXX]], [case $withval in yes|no) AC_MSG_ERROR(you should have specified path name);; esac], with_tmp_file=/tmp/lhXXXXXX) AC_MSG_RESULT($with_tmp_file) AC_DEFINE_UNQUOTED(TMP_FILENAME_TEMPLATE, "$with_tmp_file", [temporary file template]) dnl incremental indicator AC_ARG_ENABLE(indicator, [ --enable-indicator need incremental indicator [default=yes]], , # default enable_indicator=yes) if test "x$enable_indicator" = xyes; then AC_DEFINE(NEED_INCREMENTAL_INDICATOR, 1, [Define you want to use the incremental indicator]) fi dnl support multibyte filename AC_ARG_ENABLE(multibyte-char, [ --enable-multibyte-char support multibyte(sjis) filename [default=yes]], , # default enable_multibyte_char=yes) if test "x$enable_multibyte_char" = xyes; then AC_DEFINE(MULTIBYTE_CHAR, 1, [Define you want to use multibyte filename]) fi AC_OUTPUT([Makefile src/Makefile man/Makefile])