1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4############################################################################### 5# 6# Author: Lasse Collin 7# 8# This file has been put into the public domain. 9# You can do whatever you want with this file. 10# 11############################################################################### 12 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. 17 18AC_PREREQ([2.52]) 19 20AC_INIT([XZ Utils], 5.0.0, [joerg@NetBSD.org], [xz], [http://tukaani.org/xz/]) 21AC_CONFIG_MACRO_DIR([m4]) 22AC_CONFIG_HEADER([config.h]) 23AC_CONFIG_AUX_DIR([../../gnu/dist/autoconf/config]) 24 25AC_CANONICAL_HOST 26AC_USE_SYSTEM_EXTENSIONS 27 28########### 29# Filters # 30########### 31 32m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,sparc]) 33 34m4_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.]) 39]) 40 41################# 42# Match finders # 43################# 44 45m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4]) 46 47m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [ 48 AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1], 49 [Define to 1 to enable] NAME [match finder.]) 50]) 51 52#################### 53# Integrity checks # 54#################### 55 56m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256]) 57 58m4_foreach([NAME], [SUPPORTED_CHECKS], [ 59 AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1], 60 [Define to 1 if] NAME [integrity check is enabled.]) 61]) 62 63if !:; then 64 AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.]) 65fi 66 67 68AC_DEFINE_UNQUOTED([ASSUME_RAM], [128], 69 [How many MiB of RAM to assume if the real amount cannot be determined.]) 70 71# There is currently no workarounds in this package if some of 72# these headers are missing. 73AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h], 74 [], 75 [AC_MSG_ERROR([Required header file(s) are missing.])]) 76 77AC_HEADER_STDBOOL 78 79AC_TYPE_UINT8_T 80AC_TYPE_UINT16_T 81AC_TYPE_INT32_T 82AC_TYPE_UINT32_T 83AC_TYPE_INT64_T 84AC_TYPE_UINT64_T 85AC_TYPE_UINTPTR_T 86 87AC_CHECK_SIZEOF([size_t]) 88 89# The command line tool can copy high resolution timestamps if such 90# information is availabe in struct stat. Otherwise one second accuracy 91# is used. 92AC_CHECK_MEMBERS([ 93 struct stat.st_atim.tv_nsec, 94 struct stat.st_atimespec.tv_nsec, 95 struct stat.st_atimensec, 96 struct stat.st_uatime, 97 struct stat.st_atim.st__tim.tv_nsec]) 98 99AC_SYS_LARGEFILE 100AC_C_BIGENDIAN 101 102# Find the best function to set timestamps. 103AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break]) 104 105TUKLIB_PROGNAME 106TUKLIB_INTEGER 107TUKLIB_PHYSMEM 108TUKLIB_CPUCORES 109TUKLIB_MBSTR 110 111AC_OUTPUT 112