]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libarchive/configure.ac
Copy libarchive from vendor branch to contrib
[FreeBSD/FreeBSD.git] / contrib / libarchive / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl First, define all of the version numbers up front.
4 dnl In particular, this allows the version macro to be used in AC_INIT
5
6 dnl These first two version numbers are updated automatically on each release.
7 m4_define([LIBARCHIVE_VERSION_S],[2.8.5])
8 m4_define([LIBARCHIVE_VERSION_N],[2008005])
9
10 dnl bsdtar and bsdcpio versioning tracks libarchive
11 m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
12 m4_define([BSDCPIO_VERSION_S],LIBARCHIVE_VERSION_S())
13
14 #
15 # Now starts the "real" configure script.
16 #
17
18 AC_INIT([libarchive],LIBARCHIVE_VERSION_S(),[kientzle@freebsd.org])
19 # Make sure the srcdir contains "libarchive" directory
20 AC_CONFIG_SRCDIR([libarchive])
21 # Use auxiliary subscripts from this subdirectory (cleans up root)
22 AC_CONFIG_AUX_DIR([build/autoconf])
23 # M4 scripts
24 AC_CONFIG_MACRO_DIR([build/autoconf])
25 # Must follow AC_CONFIG macros above...
26 AM_INIT_AUTOMAKE()
27
28 # Libtool versioning uses different conventions on different
29 # platforms.  At least on FreeBSD, libtool uses an overly complex
30 # convention that attempts to solve problems that most people just
31 # don't have and which just causes confusion for most end users.
32 ARCHIVE_MAJOR=$(( LIBARCHIVE_VERSION_N() / 1000000 ))
33 ARCHIVE_MINOR=$(( (LIBARCHIVE_VERSION_N() / 1000) % 1000 ))
34 ARCHIVE_REVISION=$(( LIBARCHIVE_VERSION_N() % 1000 ))
35 ARCHIVE_LIBTOOL_MAJOR=`echo $((${ARCHIVE_MAJOR} + ${ARCHIVE_MINOR}))`
36 ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_LIBTOOL_MAJOR:$ARCHIVE_REVISION:$ARCHIVE_MINOR
37
38 # Stick the version numbers into config.h
39 AC_DEFINE([LIBARCHIVE_VERSION_STRING],"LIBARCHIVE_VERSION_S()",
40         [Version number of libarchive])
41 AC_DEFINE_UNQUOTED([LIBARCHIVE_VERSION_NUMBER],"LIBARCHIVE_VERSION_N()",
42         [Version number of libarchive as a single integer])
43 AC_DEFINE([BSDCPIO_VERSION_STRING],"BSDCPIO_VERSION_S()",
44         [Version number of bsdcpio])
45 AC_DEFINE([BSDTAR_VERSION_STRING],"BSDTAR_VERSION_S()",
46         [Version number of bsdtar])
47
48 # The shell variables here must be the same as the AC_SUBST() variables
49 # below, but the shell variable names apparently cannot be the same as
50 # the m4 macro names above.  Why?  Ask autoconf.
51 BSDCPIO_VERSION_STRING=BSDCPIO_VERSION_S()
52 BSDTAR_VERSION_STRING=BSDTAR_VERSION_S()
53 LIBARCHIVE_VERSION_STRING=LIBARCHIVE_VERSION_S()
54 LIBARCHIVE_VERSION_NUMBER=LIBARCHIVE_VERSION_N()
55
56 # Substitute the above version numbers into the various files below.
57 # Yes, I believe this is the fourth time we define what are essentially
58 # the same symbols.  Why? Ask autoconf.
59 AC_SUBST(ARCHIVE_LIBTOOL_VERSION)
60 AC_SUBST(BSDCPIO_VERSION_STRING)
61 AC_SUBST(BSDTAR_VERSION_STRING)
62 AC_SUBST(LIBARCHIVE_VERSION_STRING)
63 AC_SUBST(LIBARCHIVE_VERSION_NUMBER)
64
65 AC_CONFIG_HEADERS([config.h])
66 AC_CONFIG_FILES([Makefile])
67 AC_CONFIG_FILES([build/pkgconfig/libarchive.pc])
68
69 # Check for host type
70 AC_CANONICAL_HOST
71
72 dnl Compilation on mingw and Cygwin needs special Makefile rules
73 inc_windows_files=no
74 inc_cygwin_files=no
75 case "$host_os" in
76   *mingw* ) inc_windows_files=yes ;;
77   *cygwin*) inc_cygwin_files=yes ;;
78 esac
79 AM_CONDITIONAL([INC_WINDOWS_FILES], [test $inc_windows_files = yes])
80 AM_CONDITIONAL([INC_CYGWIN_FILES], [test $inc_cygwin_files = yes])
81
82 dnl Defines that are required for specific platforms (e.g. -D_POSIX_SOURCE, etc)
83 PLATFORMCPPFLAGS=
84 case "$host_os" in
85   *mingw* ) PLATFORMCPPFLAGS=-D__USE_MINGW_ANSI_STDIO ;;
86 esac
87 AC_SUBST(PLATFORMCPPFLAGS)
88
89 # Checks for programs.
90 AC_PROG_CC
91 AM_PROG_CC_C_O
92 AC_USE_SYSTEM_EXTENSIONS
93 AC_LIBTOOL_WIN32_DLL
94 AC_PROG_LIBTOOL
95 AC_CHECK_TOOL([STRIP],[strip])
96
97 #
98 # Options for building bsdtar.
99 #
100 # Default is to build bsdtar, but allow people to override that.
101 #
102 AC_ARG_ENABLE([bsdtar],
103         [AS_HELP_STRING([--enable-bsdtar], [enable build of bsdtar (default)])
104         AS_HELP_STRING([--enable-bsdtar=static], [force static build of bsdtar])
105         AS_HELP_STRING([--enable-bsdtar=shared], [force dynamic build of bsdtar])
106 AS_HELP_STRING([--disable-bsdtar], [disable build of bsdtar])],
107         [], [enable_bsdtar=yes])
108
109 case "$enable_bsdtar" in
110 yes)
111         if test "$enable_static" = "no"; then
112                 static_bsdtar=no
113         else
114                 static_bsdtar=yes
115         fi
116         build_bsdtar=yes
117         ;;
118 dynamic|shared)
119         if test "$enable_shared" = "no"; then
120                 AC_MSG_FAILURE([Shared linking of bsdtar requires shared libarchive])
121         fi
122         build_bsdtar=yes
123         static_bsdtar=no
124         ;;
125 static)
126         build_bsdtar=yes
127         static_bsdtar=yes
128         ;;
129 no)
130         build_bsdtar=no
131         static_bsdtar=no
132         ;;
133 *)
134         AC_MSG_FAILURE([Unsupported value for --enable-bsdtar])
135         ;;
136 esac
137
138 AM_CONDITIONAL([BUILD_BSDTAR], [ test "$build_bsdtar" = yes ])
139 AM_CONDITIONAL([STATIC_BSDTAR], [ test "$static_bsdtar" = yes ])
140
141 #
142 # Options for building bsdcpio.
143 #
144 # Default is not to build bsdcpio, but that can be overridden.
145 #
146 AC_ARG_ENABLE([bsdcpio],
147         [AS_HELP_STRING([--enable-bsdcpio], [enable build of bsdcpio (default)])
148         AS_HELP_STRING([--enable-bsdcpio=static], [static build of bsdcpio])
149         AS_HELP_STRING([--enable-bsdcpio=shared], [dynamic build of bsdcpio])
150 AS_HELP_STRING([--disable-bsdcpio], [disable build of bsdcpio])],
151         [], [enable_bsdcpio=yes])
152
153 case "$enable_bsdcpio" in
154 yes)
155         if test "$enable_static" = "no"; then
156            static_bsdcpio=no
157         else
158            static_bsdcpio=yes
159         fi
160         build_bsdcpio=yes
161         ;;
162 dynamic|shared)
163         if test "$enabled_shared" = "no"; then
164            AC_MSG_FAILURE([Shared linking of bsdcpio requires shared libarchive])
165         fi
166         build_bsdcpio=yes
167         ;;
168 static)
169         build_bsdcpio=yes
170         static_bsdcpio=yes
171         ;;
172 no)
173         build_bsdcpio=no
174         static_bsdcpio=no
175         ;;
176 *)
177         AC_MSG_FAILURE([Unsupported value for --enable-bsdcpio])
178         ;;
179 esac
180
181 AM_CONDITIONAL([BUILD_BSDCPIO], [ test "$build_bsdcpio" = yes ])
182 AM_CONDITIONAL([STATIC_BSDCPIO], [ test "$static_bsdcpio" = yes ])
183
184 # Set up defines needed before including any headers
185 case $host in
186   *mingw* | *cygwin* )
187   AC_DEFINE([_WIN32_WINNT], 0x0500, [Define to '0x0500' for Windows 2000 APIs.])
188   AC_DEFINE([WINVER], 0x0500, [Define to '0x0500' for Windows 2000 APIs.])
189   ;;
190 esac
191
192 # Checks for header files.
193 AC_HEADER_DIRENT
194 AC_HEADER_SYS_WAIT
195 AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h ctype.h errno.h])
196 AC_CHECK_HEADERS([ext2fs/ext2_fs.h fcntl.h grp.h])
197 AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h linux/fs.h])
198 AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h signal.h stdarg.h])
199 AC_CHECK_HEADERS([stdint.h stdlib.h string.h])
200 AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/extattr.h sys/ioctl.h sys/mkdev.h])
201 AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/select.h sys/time.h sys/utime.h])
202 AC_CHECK_HEADERS([time.h unistd.h utime.h wchar.h wctype.h windows.h])
203
204 # Checks for libraries.
205 AC_ARG_WITH([zlib],
206   AS_HELP_STRING([--without-zlib], [Don't build support for gzip through zlib]))
207
208 if test "x$with_zlib" != "xno"; then
209   AC_CHECK_HEADERS([zlib.h])
210   AC_CHECK_LIB(z,inflate)
211 fi
212
213 AC_ARG_WITH([bz2lib],
214   AS_HELP_STRING([--without-bz2lib], [Don't build support for bzip2 through bz2lib]))
215
216 if test "x$with_bz2lib" != "xno"; then
217   AC_CHECK_HEADERS([bzlib.h])
218   AC_CHECK_LIB(bz2,BZ2_bzDecompressInit)
219 fi
220
221 AC_ARG_WITH([lzmadec],
222   AS_HELP_STRING([--without-lzmadec], [Don't build support for lzma through lzmadec]))
223
224 if test "x$with_lzmadec" != "xno"; then
225   AC_CHECK_HEADERS([lzmadec.h])
226   AC_CHECK_LIB(lzmadec,lzmadec_decode)
227 fi
228
229 AC_ARG_WITH([lzma],
230   AS_HELP_STRING([--without-lzma], [Don't build support for xz through lzma]))
231
232 if test "x$with_lzma" != "xno"; then
233   AC_CHECK_HEADERS([lzma.h])
234   AC_CHECK_LIB(lzma,lzma_stream_decoder)
235 fi
236
237 AC_ARG_WITH([openssl],
238   AS_HELP_STRING([--without-openssl], [Don't build support for mtree and xar hashes through openssl]))
239
240 AC_ARG_WITH([xml2],
241   AS_HELP_STRING([--without-xml2], [Don't build support for xar through libxml2]))
242 AC_ARG_WITH([expat],
243   AS_HELP_STRING([--without-expat], [Don't build support for xar through expat]))
244
245 if test "x$with_xml2" != "xno"; then
246   AC_PATH_PROG([XML2_CONFIG], [xml2-config],, [${PATH}])
247   if test "x$XML2_CONFIG" != "x"; then
248     CPPFLAGS="${CPPFLAGS} `${XML2_CONFIG} --cflags`"
249     LIBS="${LIBS} `${XML2_CONFIG} --libs`"
250   fi
251   AC_CHECK_HEADERS([libxml/xmlreader.h])
252   AC_CHECK_LIB(xml2,xmlInitParser)
253 fi
254 if test "x$ac_cv_header_libxml_xmlreader_h" != "xyes"; then
255   if test "x$with_expat" != "xno"; then
256     AC_CHECK_HEADERS([expat.h])
257     AC_CHECK_LIB(expat,XML_ParserCreate)
258   fi
259 fi
260
261 AC_DEFUN([MD_CHECK], [
262   if test "$found_$1" != yes; then
263     saved_LIBS="$LIBS"
264     saved_CPPFLAGS="$CPPFLAGS"
265     CPPFLAGS="$CPPFLAGS -I$srcdir/libarchive"
266     if test $ac_cv_header_sys_types_h = yes; then
267       CPPFLAGS="$CPPFLAGS -DHAVE_SYS_TYPES_H=1"
268     fi
269     LIBS="$LIBS $4"
270     AC_MSG_CHECKING([support for ARCHIVE_HASH_$1_$2])
271     AC_LINK_IFELSE([
272 #define $1_COMPILE_TEST
273 #define ARCHIVE_HASH_$1_$2
274 #define __LIBARCHIVE_BUILD
275 #include "archive_hash.h"
276
277 int
278 main(int argc, char **argv)
279 {
280         archive_$3_ctx ctx;
281
282         archive_$3_init(&ctx);
283         archive_$3_update(&ctx, *argv, argc);
284         archive_$3_final(&ctx, *argv);
285         return 0;
286 }
287 ],
288     [ AC_MSG_RESULT([yes])
289       found_$1=yes
290       mdLIBS="$mdLIBS $4"
291       AC_DEFINE(ARCHIVE_HASH_$1_$2, 1, [ $1 via ARCHIVE_HASH_$1_$2 supported.])
292     ],
293     [ AC_MSG_RESULT([no])])
294     LIBS="$saved_LIBS"
295     CPPFLAGS="$saved_CPPFLAGS"
296   fi
297 ])
298
299 MD_CHECK(MD5, LIBC, md5)
300 MD_CHECK(MD5, LIBSYSTEM, md5)
301 MD_CHECK(RMD160, LIBC, rmd160)
302 MD_CHECK(SHA1, LIBC, sha1)
303 MD_CHECK(SHA1, LIBSYSTEM, sha1)
304 MD_CHECK(SHA256, LIBC, sha256)
305 MD_CHECK(SHA256, LIBC2, sha256)
306 MD_CHECK(SHA256, LIBC3, sha256)
307 MD_CHECK(SHA256, LIBSYSTEM, sha256)
308 MD_CHECK(SHA384, LIBC, sha384)
309 MD_CHECK(SHA384, LIBC2, sha384)
310 MD_CHECK(SHA384, LIBC3, sha384)
311 MD_CHECK(SHA384, LIBSYSTEM, sha384)
312 MD_CHECK(SHA512, LIBC, sha512)
313 MD_CHECK(SHA512, LIBC2, sha512)
314 MD_CHECK(SHA512, LIBC3, sha512)
315 MD_CHECK(SHA512, LIBSYSTEM, sha512)
316
317 if test "x$with_openssl" != "xno"; then
318     MD_CHECK(MD5, OPENSSL, md5, -lcrypto)
319     MD_CHECK(RMD160, OPENSSL, rmd160, -lcrypto)
320     MD_CHECK(SHA1, OPENSSL, sha1, -lcrypto)
321     MD_CHECK(SHA256, OPENSSL, sha256, -lcrypto)
322     MD_CHECK(SHA384, OPENSSL, sha384, -lcrypto)
323     MD_CHECK(SHA512, OPENSSL, sha512, -lcrypto)
324 fi
325 LIBS="$LIBS $mdLIBS"
326
327 # TODO: Give the user the option of using a pre-existing system
328 # libarchive.  This will define HAVE_LIBARCHIVE which will cause
329 # bsdtar_platform.h to use #include <...> for the libarchive headers.
330 # Need to include Makefile.am magic to link against system
331 # -larchive in that case.
332 #AC_CHECK_LIB(archive,archive_version)
333
334 # Checks for typedefs, structures, and compiler characteristics.
335 AC_C_CONST
336 # AC_TYPE_UID_T defaults to "int", which is incorrect for MinGW
337 # and MSVC. Use a customized version.
338 la_TYPE_UID_T
339 AC_TYPE_MODE_T
340 # AC_TYPE_OFF_T defaults to "long", which limits us to 4GB files on
341 # most systems... default to "long long" instead.
342 AC_CHECK_TYPE(off_t, [long long])
343 AC_TYPE_SIZE_T
344 AC_CHECK_TYPE(id_t, [unsigned long])
345 AC_CHECK_TYPE(uintptr_t, [unsigned int])
346
347 # Check for birthtime in struct stat
348 AC_CHECK_MEMBERS([struct stat.st_birthtime])
349
350 # Check for high-resolution timestamps in struct stat
351 AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec])
352 AC_CHECK_MEMBERS([struct stat.st_mtimespec.tv_nsec])
353 AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec])
354 AC_CHECK_MEMBERS([struct stat.st_mtime_n]) # AIX
355 AC_CHECK_MEMBERS([struct stat.st_umtime]) # Tru64
356 AC_CHECK_MEMBERS([struct stat.st_mtime_usec]) # Hurd
357 # Check for block size support in struct stat
358 AC_CHECK_MEMBERS([struct stat.st_blksize])
359 # Check for st_flags in struct stat (BSD fflags)
360 AC_CHECK_MEMBERS([struct stat.st_flags])
361
362 # If you have uintmax_t, we assume printf supports %ju
363 # If you have unsigned long long, we assume printf supports %llu
364 # TODO: Check for %ju and %llu support directly.
365 AC_CHECK_TYPES([uintmax_t, unsigned long long])
366
367 # We need int64_t, uint64_t, intmax_t, and uintmax_t
368 AC_TYPE_INTMAX_T
369 AC_TYPE_INT64_T
370 AC_TYPE_UINTMAX_T
371 AC_TYPE_UINT64_T
372
373 # TODO: If any of these are missing, define them right here.
374 AC_CHECK_DECLS([SIZE_MAX, SSIZE_MAX, INT64_MAX, INT64_MIN, UINT64_MAX, UINT32_MAX])
375
376 AC_CHECK_DECL([EFTYPE],
377                 [AC_DEFINE(HAVE_EFTYPE, 1, [A possible errno value for invalid file format errors])],
378                 [],
379                 [#include <errno.h>])
380 AC_CHECK_DECL([EILSEQ],
381                 [AC_DEFINE(HAVE_EILSEQ, 1, [A possible errno value for invalid file format errors])],
382                 [],
383                 [#include <errno.h>])
384 AC_CHECK_TYPE([wchar_t],
385                 [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]wchar_t), 1, [Define to 1 if the system has the type `wchar_t'.])dnl
386                 AC_CHECK_SIZEOF([wchar_t])],
387                 [])
388
389 AC_HEADER_TIME
390
391 # Checks for library functions.
392 AC_PROG_GCC_TRADITIONAL
393 AC_HEADER_MAJOR
394 AC_FUNC_FSEEKO
395 AC_FUNC_MEMCMP
396 AC_FUNC_LSTAT
397 AC_FUNC_STAT
398 AC_FUNC_STRERROR_R
399 AC_FUNC_STRFTIME
400 AC_FUNC_VPRINTF
401 # check for:
402 #   CreateHardLinkA(LPCSTR, LPCSTR, LPSECURITY_ATTRIBUTES)
403 # To avoid necessity for including windows.h or special forward declaration
404 # workarounds, we use 'void *' for 'struct SECURITY_ATTRIBUTES *'
405 AC_CHECK_STDCALL_FUNC([CreateHardLinkA],[const char *, const char *, void *])
406 AC_CHECK_FUNCS([chflags chown chroot])
407 AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fork])
408 AC_CHECK_FUNCS([fstat ftruncate futimens futimes geteuid getpid])
409 AC_CHECK_FUNCS([getgrgid_r getgrnam_r getpwnam_r getpwuid_r ])
410 AC_CHECK_FUNCS([lchflags lchmod lchown link lstat])
411 AC_CHECK_FUNCS([lutimes memmove memset mkdir mkfifo mknod])
412 AC_CHECK_FUNCS([nl_langinfo pipe poll readlink])
413 AC_CHECK_FUNCS([select setenv setlocale sigaction])
414 AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm])
415 AC_CHECK_FUNCS([tzset unsetenv utime utimensat utimes vfork])
416 AC_CHECK_FUNCS([wcrtomb wcscmp wcscpy wcslen wctomb wmemcmp wmemcpy])
417 # detects cygwin-1.7, as opposed to older versions
418 AC_CHECK_FUNCS([cygwin_conv_path])
419
420 # FreeBSD's nl_langinfo supports an option to specify whether the
421 # current locale uses month/day or day/month ordering.  It makes the
422 # output a little prettier...
423 AC_CHECK_DECL([D_MD_ORDER],
424 [AC_DEFINE(HAVE_D_MD_ORDER, 1, [Define to 1 if nl_langinfo supports D_MD_ORDER])],
425 [],
426 [#if HAVE_LANGINFO_H
427 #include <langinfo.h>
428 #endif
429 ])
430
431 # Check for dirent.d_namlen field explicitly
432 # (This is a bit more straightforward than, if not quite as portable as,
433 # the recipe given by the autoconf maintainers.)
434 AC_CHECK_MEMBER(struct dirent.d_namlen,,,
435 [#if HAVE_DIRENT_H
436 #include <dirent.h>
437 #endif
438 ])
439
440 # Check for Extended Attributes support
441 AC_ARG_ENABLE([xattr],
442                 AS_HELP_STRING([--disable-xattr],
443                 [Enable Extended Attributes support (default: check)]))
444
445 if test "x$enable_xattr" != "xno"; then
446         AC_CHECK_HEADERS([attr/xattr.h])
447         AC_CHECK_HEADERS([sys/xattr.h])
448         AC_CHECK_LIB(attr,setxattr)
449         AC_CHECK_FUNCS([extattr_get_file extattr_list_file])
450         AC_CHECK_FUNCS([extattr_set_fd extattr_set_file])
451         AC_CHECK_FUNCS([fsetxattr getxattr])
452         AC_CHECK_FUNCS([lgetxattr listxattr llistxattr lsetxattr])
453         AC_CHECK_DECLS([EXTATTR_NAMESPACE_USER], [], [], [#include <sys/types.h>
454 #include <sys/extattr.h>
455 ])
456 fi
457
458 # Check for ACL support
459 #
460 # The ACL support in libarchive is written against the POSIX1e draft,
461 # which was never officially approved and varies quite a bit across
462 # platforms.  Worse, some systems have completely non-POSIX acl functions,
463 # which makes the following checks rather more complex than I would like.
464 #
465 AC_ARG_ENABLE([acl],
466                 AS_HELP_STRING([--disable-acl],
467                 [Enable ACL support (default: check)]))
468
469 if test "x$enable_acl" != "xno"; then
470    AC_CHECK_HEADERS([sys/acl.h])
471    AC_CHECK_LIB([acl],[acl_get_file])
472    AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_fd acl_set_fd_np acl_set_file])
473
474    AC_CHECK_TYPES(acl_permset_t,,,
475         [#if HAVE_SYS_TYPES_H
476         #include <sys/types.h>
477         #endif
478         #if HAVE_SYS_ACL_H
479         #include <sys/acl.h>
480         #endif
481         ])
482
483     # The "acl_get_perm()" function was omitted from the POSIX draft.
484     # (It's a pretty obvious oversight; otherwise, there's no way to
485     # test for specific permissions in a permset.)  Linux uses the obvious
486     # name, FreeBSD adds _np to mark it as "non-Posix extension."
487     # Test for both as a double-check that we really have POSIX-style ACL support.
488     AC_CHECK_FUNCS(acl_get_perm_np acl_get_perm acl_get_link acl_get_link_np,,,
489         [#if HAVE_SYS_TYPES_H
490         #include <sys/types.h>
491         #endif
492         #if HAVE_SYS_ACL_H
493         #include <sys/acl.h>
494         #endif
495         ])
496
497     # MacOS has an acl.h that isn't POSIX.  It can be detected by
498     # checking for ACL_USER
499     AC_CHECK_DECL([ACL_USER],
500                 [AC_DEFINE(HAVE_ACL_USER, 1, [True for systems with POSIX ACL support])],
501                 [],
502                 [#include <sys/acl.h>])
503 fi
504
505 # Additional requirements
506 AC_SYS_LARGEFILE
507
508 AC_OUTPUT