libtar-1.2.11 tarball sources, taken from Debian's orig tar
[libtar.git] / configure.ac
blob9eba0a897048362710e31ea7c43699755adc1353
1 dnl ### Normal initialization. ######################################
2 AC_INIT([libtar], [1.2.11])
3 AC_PREREQ([2.57])
4 AC_CONFIG_AUX_DIR([autoconf])
5 AC_CONFIG_HEADERS([config.h])
6 AC_COPYRIGHT([[
7 Copyright (c) 1998-2003 University of Illinois Board of Trustees
8 Copyright (c) 1998-2003 Mark D. Roth
9 All rights reserved.
10 ]])
11 AC_CONFIG_SRCDIR([lib/libtar.h])
12 ENCAP_PKG([], [postinstall-encap])
15 dnl ### Load subdirectory modules. ##################################
16 PSG_MODULE([compat])
17 PSG_MODULE([listhash], [libtar])
20 dnl ### Set some option defaults. ###################################
21 if test -z "$CFLAGS"; then
22   CFLAGS="-O"
24 MKDIR="mkdir -p -m 755"
25 AC_SUBST([MKDIR])
28 dnl ### Check for compiler et al. ###################################
29 AC_PROG_CC
30 AC_PROG_RANLIB
31 AC_PROG_INSTALL
32 AC_PROG_LN_S
33 AC_PROG_MAKE_SET
36 dnl ### Compiler characteristics. ##################################
37 AC_AIX
38 AC_C_CONST
41 dnl ### Checks for header files. ###################################
42 AC_HEADER_STDC
43 AC_CHECK_HEADERS([unistd.h])
44 AC_HEADER_MAJOR
45 PSG_REPLACE_TYPE([major_t], [unsigned int], [
46   #include <sys/types.h>
47   #ifdef MAJOR_IN_MKDEV
48   # include <sys/mkdev.h>
49   #else
50   # ifdef MAJOR_IN_SYSMACROS
51   #  include <sys/sysmacros.h>
52   # endif
53   #endif
55 PSG_REPLACE_TYPE([minor_t], [unsigned int], [
56   #include <sys/types.h>
57   #ifdef MAJOR_IN_MKDEV
58   # include <sys/mkdev.h>
59   #else
60   # ifdef MAJOR_IN_SYSMACROS
61   #  include <sys/sysmacros.h>
62   # endif
63   #endif
65 PSG_REPLACE_TYPE([dev_t], [unsigned long], [
66   #include <sys/types.h>
67   #ifdef MAJOR_IN_MKDEV
68   # include <sys/mkdev.h>
69   #else
70   # ifdef MAJOR_IN_SYSMACROS
71   #  include <sys/sysmacros.h>
72   # endif
73   #endif
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])
80 AC_TYPE_MODE_T
81 AC_TYPE_OFF_T
82 AC_TYPE_SIZE_T
83 AC_TYPE_UID_T
84 PSG_REPLACE_TYPE([nlink_t], [unsigned short])
87 dnl ### Check for needed functions. ################################
88 COMPAT_FUNC_BASENAME
89 COMPAT_FUNC_DIRNAME
90 COMPAT_FUNC_FNMATCH
91 AC_CHECK_FUNCS([lchown])
92 COMPAT_FUNC_MAKEDEV
93 COMPAT_FUNC_SNPRINTF
94 COMPAT_FUNC_STRDUP
95 AC_FUNC_STRFTIME
96 COMPAT_FUNC_STRLCPY
97 COMPAT_FUNC_STRMODE
98 COMPAT_FUNC_STRSEP
101 dnl ### Check for libraries. #######################################
102 AC_ARG_WITH([zlib],
103   [  --without-zlib          Use external gzip binary instead of zlib],
104   [],
105   [with_zlib=yes])
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])
113 AC_OUTPUT