X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure.ac;h=561280984ecac5ab3ecef4f65f2901bebbd7c18d;hb=bf0c3a319c621a0fbe57f69e7ca56a790393c72f;hp=11f5da81504d7573dc3681b1a96f520546004ad9;hpb=ee63d05acab91d6cfcbade703560ac6409b07dc8;p=lha%2Flha.git diff --git a/configure.ac b/configure.ac index 11f5da8..5612809 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,8 @@ # Process this file with autoconf to produce a configure script. -AC_INIT([LHa for UNIX], 1.14i-ac20021115, jca02266@nifty.ne.jp, lha) +AC_INIT([LHa for UNIX], 1.14i-ac20080804, arai@users.sourceforge.jp, lha) +AC_DEFINE_UNQUOTED(LHA_CONFIGURE_OPTIONS, "$ac_configure_args", + [specified options for the configure script.]) +AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) @@ -14,9 +17,12 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_MINIX AM_C_PROTOTYPES +AC_SYS_LARGEFILE +AC_CHECK_PROGS(sh_for_lha_test, [zsh bash ksh pdksh], [sh]) # Checks for libraries. AC_SEARCH_LIBS(opendir, [mingwex]) +AC_CHECK_LIB(applefile, af_open) # Checks for header files. AC_HEADER_DIRENT @@ -31,7 +37,8 @@ AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_CHECK_SIZEOF(long) -AC_CHECK_TYPES([uid_t, gid_t, long long, uint64_t]) +AC_CHECK_SIZEOF(off_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 @@ -54,24 +61,22 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct stat.st_ino],,, # Checks for library functions. AC_TYPE_SIGNAL -AC_FUNC_FORK AC_FUNC_UTIME_NULL AC_FUNC_FNMATCH +AC_FUNC_FSEEKO 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(ftruncate chsize lchown mkstemp ftello) AC_CHECK_FUNCS(getpwuid getgrgid getpwnam getgrnam) AC_CHECK_FUNCS(iconv basename) AC_REPLACE_FUNCS(vsnprintf fnmatch) -if test x$ac_cv_func_fnmatch_works != xyes; then - AC_LIBOBJ(fnmatch) -fi - if test $ac_header_dirent = no; then AC_LIBOBJ(lhdir) fi +AC_CHECK_DECLS([basename]) + # checking whether 8 bit clean or not AC_CACHE_CHECK([whether strchr()/strrchr() is 8bit clean], [lha_cv_func_strchr_8bit_clean], @@ -162,11 +167,11 @@ SUPPORT_LZHUFF_METHOD=-DSUPPORT_LH7 # whether use the -lh567- method AC_MSG_CHECKING(default archive method) AC_ARG_WITH(default-method, - AC_HELP_STRING([--with-default-method=[[567]]], - [create the -lh[[567]]- archive default [[default=5]]]), + [AC_HELP_STRING([[[[--with-default-method=[567]]]]], + [create the -lh[567]- archive default [default=5]])], [case $withval in - [567]) ;; - *) AC_MSG_ERROR(you should have specified 5, 6 or 7);; + [[567]]) ;; + *) AC_MSG_ERROR([you should have specified 5, 6 or 7]);; esac], with_default_method=5) AC_MSG_RESULT(-lh$with_default_method-) @@ -273,6 +278,24 @@ if test "x$enable_backup_archive" = xyes; then [Define to 1 if you want to leave an old archive]) fi +# additional suffixes of archive filename. +AC_MSG_CHECKING(additional suffixes of archive filename) +AC_ARG_WITH(additional-suffixes, + [AC_HELP_STRING([[[--with-additional-suffixes=foo,bar]]], + [additional suffixes of archive filename, default is empty string])], + , + with_additional_suffixes="") + +AC_MSG_RESULT($with_additional_suffixes) +AC_DEFINE_UNQUOTED(ADDITIONAL_SUFFIXES, "$with_additional_suffixes", + [Define to comma separated suffixes list if you wish to regard it as implicit archive suffixes.]) + +case $host_os in +*msdosdjgpp*) +CFLAGS="$CFLAGS -DNOT_COMPATIBLE_MODE" +;; +esac + AC_CONFIG_FILES([Makefile src/Makefile man/Makefile olddoc/Makefile]) AC_CONFIG_FILES([tests/Makefile tests/lha-test]) AC_OUTPUT