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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
# Process this file with autoconf to produce a configure script.
m4_pattern_forbid([^_?DPKG_])
AC_PREREQ(2.60)
AC_INIT([dpkg], m4_esyscmd([./get-version]), [debian-dpkg@lists.debian.org])
AC_SUBST([PACKAGE_COPYRIGHT_HOLDER], ['Dpkg Developers'])
AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([1.11 -Wall foreign nostdinc no-dist-gzip dist-xz])
AM_SILENT_RULES([yes])
# Do not unconditionally use the following macro, as Debian jessie does not
# have a recent enough gettext.
m4_ifdef([AM_GNU_GETTEXT_REQUIRE_VERSION],
[AM_GNU_GETTEXT_REQUIRE_VERSION([0.19])])
# We cannot remove the following macro due to backwards compatibility reasons.
# In the future when the gettext version is bumped, we have to set the above
# macro unconditionally to the minimal version, and set the below to 0.19.6,
# the first version introducing the AM_GNU_GETTEXT_REQUIRE_VERSION macro.
AM_GNU_GETTEXT_VERSION([0.19])
AM_GNU_GETTEXT([external])
DPKG_DIST_CHECK([test "$GMSGFMT" = ":" && test "$USE_NLS" = "yes"],
[gettext required when NLS support enabled])
# Shared libraries are disabled on purpose, currently there is no ABI stability
# guarantee, and it will be broken at will. The infrastructure is in place just
# to be able to test that its future activation will work.
AM_PROG_AR
LT_INIT([disable-shared])
DPKG_BUILD_SHARED_LIBS
DPKG_LINKER_VERSION_SCRIPT
# Allow compilation without optional programs
DPKG_BUILD_PROG([dselect])
DPKG_BUILD_PROG([start-stop-daemon])
DPKG_BUILD_PROG([update-alternatives])
DPKG_BUILD_DEVEL_DOCS
# Allow alternate directories
DPKG_WITH_DIR([devlibdir], [${libdir}],
[dpkg development library directory [LIBDIR]])
DPKG_WITH_DIR([pkgconfdir], [${sysconfdir}/${PACKAGE_NAME}],
[dpkg configuration directory [SYSCONFDIR/dpkg]])
DPKG_WITH_DIR([admindir], [${localstatedir}/lib/${PACKAGE_NAME}],
[dpkg database directory [LOCALSTATEDIR/lib/dpkg]])
DPKG_WITH_DIR([logdir], [${localstatedir}/log],
[system logging directory [LOCALSTATEDIR/log]])
# Set default dpkg-deb values
DPKG_DEB_COMPRESSOR([xz])
DPKG_DEB_PROG_TAR
# Checks for programs.
AC_PROG_CC
DPKG_C_C99
AC_PROG_CXX
DPKG_CXX_CXX11
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
DPKG_PROG_PO4A
DPKG_PROG_PERL
DPKG_PROG_POD2MAN
DPKG_CODE_COVERAGE
# Checks for operating system services and capabilities.
AC_SYS_LARGEFILE
# Checks for libraries.
DPKG_LIB_MD
DPKG_LIB_Z
DPKG_LIB_BZ2
DPKG_LIB_LZMA
DPKG_LIB_SELINUX
if test "x$build_dselect" = "xyes"; then
DPKG_LIB_CURSES
fi
if test "x$build_start_stop_daemon" = "xyes"; then
DPKG_LIB_PS
DPKG_LIB_KVM
fi
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h error.h err.h locale.h libintl.h kvm.h \
sys/param.h sys/sysctl.h sys/syscall.h sys/user.h \
sys/proc.h sys/pstat.h linux/fiemap.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
DPKG_TYPES_U_INT_T
DPKG_TYPE_PTRDIFF_T
AC_CHECK_SIZEOF([unsigned int])
AC_CHECK_SIZEOF([unsigned long])
DPKG_DECL_SYS_SIGLIST
DPKG_DECL_SYS_ERRLIST
# Checks for library functions.
DPKG_FUNC_VA_COPY
DPKG_FUNC_C99_SNPRINTF
DPKG_CHECK_DECL([offsetof], [stddef.h])
DPKG_CHECK_DECL([makedev], [sys/types.h])
DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
DPKG_CHECK_DECL([O_NOFOLLOW], [fcntl.h])
DPKG_CHECK_DECL([F_ALLOCSP64], [fcntl.h])
DPKG_CHECK_DECL([F_PREALLOCATE], [fcntl.h])
DPKG_CHECK_DECL([P_tmpdir], [stdio.h])
DPKG_CHECK_PROGNAME
DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
strnlen strndup strerror strsignal asprintf \
scandir alphasort unsetenv])
AC_CHECK_FUNCS([memcpy lchown],
[], [AC_MSG_ERROR([missing required function])])
AC_CHECK_FUNCS([strtoimax isascii setsid getdtablesize \
getprogname getexecname lutimes \
fallocate posix_fallocate posix_fadvise])
DPKG_MMAP
# Checks for the build machinery.
AC_DEFINE(LIBDPKG_VOLATILE_API, 1, [Acknowledge the volatility of the API.])
DPKG_COMPILER_WARNINGS
DPKG_COMPILER_OPTIMIZATIONS
DPKG_LINKER_OPTIMIZATIONS
DPKG_ARCHITECTURE
AC_DEFINE([PACKAGE_RELEASE], [PACKAGE_VERSION " (" ARCHITECTURE ")"],
[Define the project release information, version and architecture])
AC_CONFIG_FILES([ Makefile
dpkg-deb/Makefile
dpkg-split/Makefile
dselect/Makefile
dselect/methods/Makefile
dselect/po/Makefile.in
lib/Makefile
lib/compat/Makefile
lib/dpkg/Makefile
lib/dpkg/libdpkg.pc
lib/dpkg/t/Makefile
doc/Doxyfile
man/Makefile
po/Makefile.in
scripts/Makefile
scripts/mk/Makefile
scripts/po/Makefile.in
src/Makefile
utils/Makefile ])
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
# Print the current configuration
cat <<CONFIG
Configuration:
Features:
NLS . . . . . . . . . . . . . : $USE_NLS
unicode support . . . . . . . : $USE_UNICODE
development documentation . . : $build_devel_docs
code coverage . . . . . . . . : $enable_coverage
build shared libraries . . . : $enable_shared
mmap loaders . . . . . . . . : $enable_mmap
default dpkg-deb compressor . : $with_dpkg_deb_compressor
Paths:
devlibdir . . . . . . . . . . : $devlibdir
pkgconfdir . . . . . . . . . : $pkgconfdir
admindir . . . . . . . . . . : $admindir
logdir . . . . . . . . . . . : $logdir
perl interpreter . . . . . . : $PERL
perl libdir . . . . . . . . . : $PERL_LIBDIR
Programs:
update-alternatives . . . . . : $build_update_alternatives
start-stop-daemon . . . . . . : $build_start_stop_daemon
dselect . . . . . . . . . . . : $build_dselect
System Libraries:
libps . . . . . . . . . . . . : ${have_libps:-no}
libkvm . . . . . . . . . . . : ${have_libkvm:-no}
libselinux . . . . . . . . . : $with_libselinux
libmd . . . . . . . . . . . . : $with_libmd
libz . . . . . . . . . . . . : $with_libz
liblzma . . . . . . . . . . . : $with_liblzma
libbz2 . . . . . . . . . . . : $with_libbz2
libcurses . . . . . . . . . . : ${have_libcurses:-no}
CONFIG
|