Debian Codegraph @

libs/zziplib/configure.ac

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 dnl $Id: configure.ac 71105 2024-04-28 16:42:00Z karl $
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl Copyright (C) 2016-2024 Karl Berry <[email protected]>
5 dnl Copyright (C) 2010-2014 Peter Breitenlohner <[email protected]>
6 dnl
7 dnl based on zziplib-0.13.58:
8 dnl Copyright (C) 2009 Guido Draheim <[email protected]> for ZZipLib.SF.net
9 dnl
10 dnl This file is free software; the copyright holder
11 dnl gives unlimited permission to copy and/or distribute it,
12 dnl with or without modifications, as long as this notice is preserved.
13 dnl
14 m4_include([version.ac])[] dnl define zziplib_version
15 AC_INIT([zziplib (TeX Live)], zziplib_version, [[email protected]])
16 AC_PREREQ([2.65])
17 AC_CONFIG_SRCDIR([zziplib-src/zziplib.spec])
18 AC_CONFIG_AUX_DIR([../../build-aux])
19 AC_CONFIG_MACRO_DIRS([../../m4 m4])
20
21 KPSE_BASIC([zziplib])
22
23 AC_CANONICAL_HOST
24
25 # Checks for programs.
26 AC_PROG_CC
27 AM_PROG_AS
28 AM_PROG_AR
29 AC_PROG_RANLIB
30 AC_PROG_LN_S
31
32 KPSE_COMPILER_VISIBILITY
33
34 # Checks for header files.
35 AC_HEADER_STDC
36 AC_HEADER_DIRENT
37 AC_CHECK_HEADERS([stdint.h unistd.h windows.h sys/int_types.h])
38 AC_CHECK_HEADERS([winnt.h winbase.h], , , [#include <windows.h>])
39 AC_CHECK_HEADERS([sys/types.h sys/mman.h sys/stat.h sys/param.h]) dnl posix'ish
40 AC_CHECK_HEADERS([io.h direct.h byteswap.h])
41 AC_CHECK_HEADERS([fnmatch.h])
42
43 # mmap ---------------------------------------------------------------
44 AC_MSG_CHECKING([whether can use mmap for file scanning])
45 enable_mmap='no (just a bit slower)'
46 test "x$ac_cv_header_winbase_h" = xyes && enable_mmap="yes, winbase.h"
47 test "x$ac_cv_header_sys_mman_h" = xyes && enable_mmap="yes, sys/mman.h"
48 AS_CASE([$enable_mmap],
49 [yes*], [ZZIPLIB_DEFINES='-D_USE_MMAP'])
50 AC_MSG_RESULT([$enable_mmap])
51 AC_SUBST([ZZIPLIB_DEFINES])
52
53 AC_SYS_LARGEFILE_SENSITIVE
54
55 # Need this to avoid off64_t error with system extensions enabled.
56 KPSE_LARGEFILE([ZZIPLIB_DEFINES], [_LARGEFILE64_SOURCE])
57
58 AC_FUNC_FSEEKO
59
60 # Checks for typedefs, structures, and compiler characteristics.
61 AC_C_INLINE
62 AC_C_CONST
63 AC_C_RESTRICT
64 AC_TYPE_SIZE_T
65 AC_CHECK_TYPE([ssize_t], [int])
66 AC_CHECK_TYPE([off64_t], [_zzip_off_t])
67 AC_CHECK_TYPE([__int64], [long long])
68 AC_CHECK_SIZEOF([short])
69 AC_CHECK_SIZEOF([int])
70 AC_CHECK_SIZEOF([long])
71 AC_C_BIGENDIAN
72 ZZIPLIB_CHECK_ALIGNED_ACCESS
73
74 # Checks for library functions.
75 AC_CHECK_FUNCS([strcasecmp strnlen strndup])
76
77 KPSE_ZLIB_FLAGS
78
79 AM_CONDITIONAL([build], [test "x$enable_build" != xno])
80
81 if test "x$enable_build" != xno || test -f config.force; then
82
83 KPSE_ADD_FLAGS([zlib])
84 AC_CHECK_HEADERS([zlib.h])
85 AC_CHECK_FUNC([zlibVersion], , [AC_ERROR([zlib not found])])
86 KPSE_RESTORE_FLAGS
87
88 echo timestamp >config.force
89 fi
90
91 AC_SUBST([ZZIPLIB_TREE], [zziplib-src])
92
93 # -----------------------------------------------------------------------
94 AC_MSG_RESULT([creating include/zzip/_msvc.in via zzip/_msvc.sed of config.h.in])
95 test -d include || mkdir include
96 sed -f $srcdir/$ZZIPLIB_TREE/zzip/_msvc.sed $srcdir/config.h.in >include/_msvc.in
97 AC_CONFIG_HEADERS([config.h])
98 AX_PREFIX_CONFIG_H([include/zzip/_config.h],[zzip],[config.h])
99 AX_PREFIX_CONFIG_H([include/zzip/_msvc.h],[zzip],[include/_msvc.in])
100
101 AC_CONFIG_FILES([Makefile include/zzip/Makefile])
102
103 AC_OUTPUT