2 # Process this file with autoconf to produce a configure script.
4 ###############################################################################
8 # This file has been put into the public domain.
9 # You can do whatever you want with this file.
11 ###############################################################################
13 # NOTE: Don't add useless checks. autoscan detects this and that, but don't
14 # let it confuse you. For example, we don't care about checking for behavior
15 # of malloc(), stat(), or lstat(), since we don't use those functions in
16 # a way that would cause the problems the autoconf macros check.
20 AC_INIT([XZ Utils], 5.0.0, [joerg@NetBSD.org], [xz], [http://tukaani.org/xz/])
21 AC_CONFIG_MACRO_DIR([m4])
22 AC_CONFIG_HEADER([config.h])
23 AC_CONFIG_AUX_DIR([../../gnu/dist/autoconf/config])
26 AC_USE_SYSTEM_EXTENSIONS
32 m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,sparc])
34 m4_foreach([NAME], [SUPPORTED_FILTERS], [
35 AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
36 [Define to 1 if] NAME [encoder is enabled.])
37 AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
38 [Define to 1 if] NAME [decoder is enabled.])
45 m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4])
47 m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
48 AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
49 [Define to 1 to enable] NAME [match finder.])
56 m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
58 m4_foreach([NAME], [SUPPORTED_CHECKS], [
59 AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
60 [Define to 1 if] NAME [integrity check is enabled.])
64 ###########################
65 # Assembler optimizations #
66 ###########################
68 AM_CONDITIONAL(COND_ASM_X86, false)
69 AM_CONDITIONAL(COND_ASM_X86_64, false)
77 AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
81 AC_DEFINE_UNQUOTED([ASSUME_RAM], [128],
82 [How many MiB of RAM to assume if the real amount cannot be determined.])
84 # There is currently no workarounds in this package if some of
85 # these headers are missing.
86 AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
88 [AC_MSG_ERROR([Required header file(s) are missing.])])
100 AC_CHECK_SIZEOF([size_t])
102 # The command line tool can copy high resolution timestamps if such
103 # information is availabe in struct stat. Otherwise one second accuracy
106 struct stat.st_atim.tv_nsec,
107 struct stat.st_atimespec.tv_nsec,
108 struct stat.st_atimensec,
109 struct stat.st_uatime,
110 struct stat.st_atim.st__tim.tv_nsec])
115 # Find the best function to set timestamps.
116 AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])