1 dnl ### Normal initialization. ######################################
2 AC_INIT([libtar], [1.2.20])
4 AC_CONFIG_AUX_DIR([autoconf])
5 AC_CONFIG_HEADERS([config.h])
7 Copyright (c) 1998-2003 University of Illinois Board of Trustees
8 Copyright (c) 1998-2003 Mark D. Roth
11 AC_CONFIG_SRCDIR([lib/libtar.h])
12 AC_CONFIG_MACRO_DIR([autoconf])
13 AM_INIT_AUTOMAKE([dist-bzip2])
14 ENCAP_PKG([], [postinstall-encap])
17 dnl ### Load subdirectory modules. ##################################
19 PSG_MODULE([listhash], [libtar])
22 dnl ### Set some option defaults. ###################################
23 if test -z "$CFLAGS"; then
26 MKDIR="mkdir -p -m 755"
30 dnl ### Check for compiler et al. ###################################
31 AC_USE_SYSTEM_EXTENSIONS
39 dnl ### Compiler characteristics. ##################################
42 if test "$ac_cv_tls" = "none" ; then
44 ****************************************************************
45 WARNING: Your compiler does not support TLS __thread keywords,
46 so your version of libtar will not be thread-safe.
47 ****************************************************************
52 dnl ### Checks for header files. ###################################
54 AC_CHECK_HEADERS([unistd.h])
56 PSG_REPLACE_TYPE([major_t], [unsigned int], [
57 #include <sys/types.h>
59 # include <sys/mkdev.h>
61 # ifdef MAJOR_IN_SYSMACROS
62 # include <sys/sysmacros.h>
66 PSG_REPLACE_TYPE([minor_t], [unsigned int], [
67 #include <sys/types.h>
69 # include <sys/mkdev.h>
71 # ifdef MAJOR_IN_SYSMACROS
72 # include <sys/sysmacros.h>
76 PSG_REPLACE_TYPE([dev_t], [unsigned long], [
77 #include <sys/types.h>
79 # include <sys/mkdev.h>
81 # ifdef MAJOR_IN_SYSMACROS
82 # include <sys/sysmacros.h>
86 PSG_REPLACE_TYPE([socklen_t], [unsigned long], [
87 #include <sys/types.h>
88 #include <sys/socket.h>
90 PSG_REPLACE_TYPE([uint64_t], [long long])
95 PSG_REPLACE_TYPE([nlink_t], [unsigned short])
98 dnl ### Check for needed functions. ################################
102 AC_CHECK_FUNCS([lchown])
112 dnl ### Check for libraries. #######################################
114 [ --without-zlib Use external gzip binary instead of zlib],
117 if test "$with_zlib" = "yes"; then
118 AC_CHECK_LIB([z], [gzread])
122 dnl ### Create output files. #######################################
123 AC_CONFIG_FILES([Makefile lib/Makefile libtar/Makefile doc/Makefile])