1 dnl ### Normal initialization. ######################################
2 AC_INIT([libtar], [1.2.11])
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 ENCAP_PKG([], [postinstall-encap])
15 dnl ### Load subdirectory modules. ##################################
17 PSG_MODULE([listhash], [libtar])
20 dnl ### Set some option defaults. ###################################
21 if test -z "$CFLAGS"; then
24 MKDIR="mkdir -p -m 755"
28 dnl ### Check for compiler et al. ###################################
36 dnl ### Compiler characteristics. ##################################
41 dnl ### Checks for header files. ###################################
43 AC_CHECK_HEADERS([unistd.h])
45 PSG_REPLACE_TYPE([major_t], [unsigned int], [
46 #include <sys/types.h>
48 # include <sys/mkdev.h>
50 # ifdef MAJOR_IN_SYSMACROS
51 # include <sys/sysmacros.h>
55 PSG_REPLACE_TYPE([minor_t], [unsigned int], [
56 #include <sys/types.h>
58 # include <sys/mkdev.h>
60 # ifdef MAJOR_IN_SYSMACROS
61 # include <sys/sysmacros.h>
65 PSG_REPLACE_TYPE([dev_t], [unsigned long], [
66 #include <sys/types.h>
68 # include <sys/mkdev.h>
70 # ifdef MAJOR_IN_SYSMACROS
71 # include <sys/sysmacros.h>
75 PSG_REPLACE_TYPE([socklen_t], [unsigned long], [
76 #include <sys/types.h>
77 #include <sys/socket.h>
79 PSG_REPLACE_TYPE([uint64_t], [long long])
84 PSG_REPLACE_TYPE([nlink_t], [unsigned short])
87 dnl ### Check for needed functions. ################################
91 AC_CHECK_FUNCS([lchown])
101 dnl ### Check for libraries. #######################################
103 [ --without-zlib Use external gzip binary instead of zlib],
106 if test "$with_zlib" = "yes"; then
107 AC_CHECK_LIB([z], [gzread])
111 dnl ### Create output files. #######################################
112 AC_CONFIG_FILES([Makefile lib/Makefile libtar/Makefile doc/Makefile])