1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
AC_INIT([apt], [0.9.15+1], [pashev.igor@gmail.com])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([subdir-objects])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
AC_CONFIG_HEADERS([config.h])
__apt_macros_h="apt-pkg/contrib/macros.h"
ap_maj=`$AWK '/^\#define APT_PKG_MAJOR/ {print $3}' $srcdir/$__apt_macros_h`
ap_min=`$AWK '/^\#define APT_PKG_MINOR/ {print $3}' $srcdir/$__apt_macros_h`
ap_rel=`$AWK '/^\#define APT_PKG_RELEASE/ {print $3}' $srcdir/$__apt_macros_h`
ai_maj=1
ai_min=5
ai_rel=0
AC_SUBST([LIBAPT_PKG_RELEASE], $ap_maj.$ap_min)
AC_SUBST([LIBAPT_INST_RELEASE], $ai_maj.$ai_min)
AC_DEFINE([COMMON_ARCH], [], [Dpkg architecture (such as i386, amd64, kfreebsd-amd64, etc)])
AC_MSG_CHECKING(debian architecture)
archset="`dpkg-architecture -qDEB_HOST_ARCH`"
if test "x$archset" = "x"; then
AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
fi
AC_MSG_RESULT($archset)
AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset")
AC_PROG_CC_C99
gl_EARLY
AC_PROG_CXX
LT_INIT([disable-static])
AC_PATH_PROG(DOXYGEN, doxygen)
AC_PATH_PROG(PO4A, po4a)
AC_PATH_PROG(XSLTPROC, xsltproc)
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "xno"])
AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"])
AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "xno"])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.16.1])
AM_ICONV
AC_CONFIG_MACRO_DIR([m4])
AC_SEARCH_LIBS([dlopen], [dl])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([connect], [socket])
AC_SEARCH_LIBS([pthread_create], [pthread])
AC_SEARCH_LIBS([openpty], [util libutil])
have_curl="no"
AC_CHECK_HEADER([curl/curl.h],
[ AC_CHECK_LIB([curl], [curl_easy_init], [have_curl="yes"]) ],
)
AM_CONDITIONAL([ENABLE_HTTPS], [test "x$have_curl" = xyes])
have_bdb="no"
AC_CHECK_HEADER([db.h],
[ AC_CHECK_LIB([db], [db_version], [have_bdb="yes"]) ],
)
AM_CONDITIONAL([ENABLE_FTPARCHIVE], [test "x$have_bdb" = xyes])
have_zlib="no"
AC_CHECK_HEADER([zlib.h],
[ AC_CHECK_LIB([z], [gzread], [have_zlib="yes"]) ],
)
if test "x$have_zlib" = "xyes"; then
AC_DEFINE(HAVE_ZLIB, [1], [Define to 1 if have Zlib])
LIBZ="-lz"
AC_SUBST([LIBZ])
fi
have_bz2="no"
AC_CHECK_HEADER([bzlib.h],
[ AC_CHECK_LIB([bz2], [BZ2_bzopen], [have_bz2="yes"]) ],
)
if test "x$have_bz2" = "xyes"; then
AC_DEFINE(HAVE_BZ2, [1], [Define to 1 if have Bzip2 library])
LIBBZ2="-lbz2"
AC_SUBST([LIBBZ2])
fi
have_lzma="no"
AC_CHECK_HEADER([lzma.h],
[ AC_CHECK_LIB([lzma], [lzma_easy_encoder], [have_lzma="yes"]) ],
)
if test "x$have_lzma" = "xyes"; then
AC_DEFINE(HAVE_LZMA, [1], [Define to 1 if have lzma library])
LIBLZMA="-llzma"
AC_SUBST([LIBLZMA])
fi
dnl Solaris:
AC_CHECK_HEADERS([sys/isa_defs.h sys/ttold.h])
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])
AC_CHECK_FUNCS([timegm cfmakeraw])
gl_INIT
AC_CONFIG_FILES([
Makefile
doc/Makefile
po/Makefile.in
lib/Makefile
])
# TODO: --with-FOO:
KEYRING_FILENAME=/usr/share/keyrings/debian-archive-keyring.gpg
KEYRING_MASTER_FILENAME=
KEYRING_REMOVED_FILENAME=/usr/share/keyrings/debian-archive-removed-keys.gpg
KEYRING_URI=
AC_SUBST(KEYRING_FILENAME)
AC_SUBST(KEYRING_MASTER_FILENAME)
AC_SUBST(KEYRING_REMOVED_FILENAME)
AC_SUBST(KEYRING_URI)
AC_CONFIG_FILES([cmdline/apt-key], [chmod 0755 cmdline/apt-key])
AC_OUTPUT
|