]>
Commit | Line | Data |
---|---|---|
f163b202 SB |
1 | # |
2 | # configure.ac | |
3 | # | |
4 | # The Initial Developer of the Original Code is International | |
5 | # Business Machines Corporation. Portions created by IBM | |
6 | # Corporation are Copyright (C) 2014 International Business | |
7 | # Machines Corporation. All Rights Reserved. | |
8 | # | |
9 | # This program is free software; you can redistribute it and/or modify | |
10 | # it under the terms of the Common Public License as published by | |
11 | # IBM Corporation; either version 1 of the License, or (at your option) | |
12 | # any later version. | |
13 | # | |
14 | # This program is distributed in the hope that it will be useful, | |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | # Common Public License for more details. | |
18 | # | |
19 | # You should have received a copy of the Common Public License | |
20 | # along with this program; if not, a copy can be viewed at | |
21 | # http://www.opensource.org/licenses/cpl1.0.php. | |
22 | # | |
23 | # This file is derived from tpm-tool's configure.in. | |
24 | # | |
25 | ||
f1a8a1cb | 26 | AC_INIT(swtpm, 0.2.0) |
f163b202 SB |
27 | AC_PREREQ(2.12) |
28 | AC_CONFIG_SRCDIR(Makefile.am) | |
29 | AC_CONFIG_HEADER(config.h) | |
30 | ||
31 | SWTPM_VER_MAJOR=`echo $PACKAGE_VERSION | cut -d "." -f1` | |
32 | SWTPM_VER_MINOR=`echo $PACKAGE_VERSION | cut -d "." -f2` | |
33 | SWTPM_VER_MICRO=`echo $PACKAGE_VERSION | cut -d "." -f3` | |
34 | ||
35 | AC_SUBST([SWTPM_VER_MAJOR]) | |
36 | AC_SUBST([SWTPM_VER_MINOR]) | |
37 | AC_SUBST([SWTPM_VER_MICRO]) | |
38 | ||
39 | dnl Check for programs | |
40 | AC_PROG_CC | |
41 | AC_PROG_INSTALL | |
42 | AC_PROG_LN_S | |
908afaf5 | 43 | LT_INIT |
f163b202 | 44 | |
f163b202 SB |
45 | AC_CONFIG_MACRO_DIR([m4]) |
46 | AC_CANONICAL_TARGET | |
c3fdf688 | 47 | AC_CANONICAL_HOST |
f163b202 SB |
48 | AM_INIT_AUTOMAKE([foreign 1.6]) |
49 | ||
50 | DEBUG="" | |
51 | AC_MSG_CHECKING([for debug-enabled build]) | |
52 | AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [create a debug build]), | |
53 | [if test "$enableval" = "yes"; then | |
54 | DEBUG="yes" | |
55 | AC_MSG_RESULT([yes]) | |
56 | else | |
57 | DEBUG="no" | |
58 | AC_MSG_RESULT([no]) | |
59 | fi], | |
60 | [DEBUG="no", | |
61 | AC_MSG_RESULT([no])]) | |
62 | ||
63 | # If the user has not set CFLAGS, do something appropriate | |
64 | test_CFLAGS=${CFLAGS+set} | |
65 | if test "$test_CFLAGS" != set; then | |
33be7be2 | 66 | if test "$DEBUG" = "yes"; then |
f163b202 SB |
67 | CFLAGS="-O0 -g -DDEBUG" |
68 | else | |
69 | CFLAGS="-g -O2" | |
70 | fi | |
33be7be2 | 71 | elif test "$DEBUG" = "yes"; then |
f163b202 SB |
72 | CFLAGS="$CFLAGS -O0 -g -DDEBUG" |
73 | fi | |
74 | ||
e46a2b66 SB |
75 | AC_HEADER_STDC |
76 | AC_C_CONST | |
77 | AC_C_INLINE | |
78 | ||
79 | AC_TYPE_SIZE_T | |
80 | AC_TYPE_SIGNAL | |
81 | ||
baecda40 SB |
82 | AC_PROG_CC |
83 | AC_PROG_INSTALL | |
3cb54a5d | 84 | AC_PROG_MKDIR_P |
e46a2b66 | 85 | |
ec37bb56 SB |
86 | AC_ARG_WITH([selinux], |
87 | AS_HELP_STRING([--with-selinux], | |
88 | [add SELinux policy extensions @<:@default=check@:>@])) | |
89 | m4_divert_text([DEFAULTS], [with_selinux=check]) | |
90 | ||
91 | dnl Check for SELinux policy support | |
92 | ||
93 | if test "$with_selinux" != "no"; then | |
94 | if test "$with_selinux" = "check" || test "$with_selinux" = "yes"; then | |
95 | if ! test -f /usr/share/selinux/devel/Makefile; then | |
96 | if test "$with_selinux" = "yes"; then | |
97 | AC_MSG_ERROR("Is selinux-policy-devel installed?") | |
98 | else | |
99 | with_selinux="no" | |
100 | fi | |
101 | fi | |
102 | AC_PATH_PROG([SEMODULE], semodule) | |
33be7be2 | 103 | if test "x$SEMODULE" = "x"; then |
ec37bb56 SB |
104 | if test "$with_selinux" = "yes"; then |
105 | AC_MSG_ERROR("Is selinux-policy-devel installed?") | |
106 | else | |
107 | with_selinux="no" | |
108 | fi | |
109 | fi | |
110 | if test "$with_selinux" = "check"; then | |
111 | with_selinux="yes" | |
112 | fi | |
113 | fi | |
114 | fi | |
33be7be2 | 115 | AM_CONDITIONAL([WITH_SELINUX], [test "x$with_selinux" = "xyes"]) |
ec37bb56 | 116 | |
b096be26 SB |
117 | if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc'; then |
118 | sysconfdir="/etc" | |
119 | fi | |
120 | if test "$prefix" = "" && test "$datarootdir" = '${prefix}/share'; then | |
121 | datarootdir="/usr/share" | |
122 | fi | |
d16b86b7 SB |
123 | if test "$prefix" = "/usr" && test "$localstatedir" = '${prefix}/var'; then |
124 | localstatedir="/var" | |
125 | fi | |
5d35321e SB |
126 | if test "x$prefix" = "xNONE"; then |
127 | prefix="/usr/local" | |
128 | fi | |
0432b653 SB |
129 | SYSCONFDIR=`eval echo $sysconfdir` |
130 | DATAROOTDIR=`eval echo $datarootdir` | |
d16b86b7 | 131 | LOCALSTATEDIR=`eval echo $localstatedir` |
0432b653 SB |
132 | AC_SUBST([SYSCONFDIR]) |
133 | AC_SUBST([DATAROOTDIR]) | |
d16b86b7 | 134 | AC_SUBST([LOCALSTATEDIR]) |
b096be26 | 135 | |
7849b6c6 | 136 | cryptolib=openssl |
3bbdd7bc SB |
137 | |
138 | AC_ARG_WITH([openssl], | |
7849b6c6 SB |
139 | [AS_HELP_STRING([--with-openssl], |
140 | [build with openssl library])], | |
141 | [], | |
142 | []) | |
3bbdd7bc SB |
143 | |
144 | case "$cryptolib" in | |
3bbdd7bc | 145 | openssl) |
7849b6c6 SB |
146 | AC_CHECK_LIB(crypto, |
147 | [AES_set_encrypt_key], | |
b78b6af2 | 148 | [true], |
7849b6c6 SB |
149 | AC_MSG_ERROR(Faulty openssl crypto library)) |
150 | AC_CHECK_HEADERS([openssl/aes.h],[], | |
151 | AC_MSG_ERROR(Is openssl-devel/libssl-dev installed?)) | |
152 | AC_MSG_RESULT([Building with openssl crypto library]) | |
153 | ;; | |
3bbdd7bc | 154 | esac |
833a5416 | 155 | |
baecda40 SB |
156 | LIBTASN1_LIBS=$(pkg-config --libs libtasn1) |
157 | if test $? -ne 0; then | |
158 | AC_MSG_ERROR("Is libtasn1-devel installed? -- could not get libs for libtasn1") | |
159 | fi | |
160 | AC_SUBST([LIBTASN1_LIBS]) | |
f163b202 | 161 | |
baecda40 SB |
162 | LIBTPMS_LIBS=$(pkg-config --libs libtpms) |
163 | if test $? -ne 0; then | |
164 | AC_MSG_ERROR("Is libtpms-devel installed? -- could not get libs for libtpms") | |
165 | fi | |
fbc596ab | 166 | AC_CHECK_LIB(tpms, |
b78b6af2 | 167 | TPMLIB_ChooseTPMVersion,[true], |
fbc596ab SB |
168 | AC_MSG_ERROR("libtpms 0.6 or later is required") |
169 | ) | |
baecda40 | 170 | AC_SUBST([LIBTPMS_LIBS]) |
f163b202 | 171 | |
5478de0a SB |
172 | AC_CHECK_LIB(c, clock_gettime, LIBRT_LIBS="", LIBRT_LIBS="-lrt") |
173 | AC_SUBST([LIBRT_LIBS]) | |
174 | ||
e46a2b66 | 175 | AC_PATH_PROG([TPM_NVDEFINE], tpm_nvdefine) |
ef606d4a | 176 | if test "x$TPM_NVDEFINE" = "x"; then |
64faf455 | 177 | have_tcsd=no |
ef606d4a SB |
178 | AC_MSG_WARN([NVRAM area tools are needed for TPM 1.2 certificate injection: tpm-tools package]) |
179 | else | |
180 | have_tcsd=yes | |
181 | fi | |
64faf455 SB |
182 | with_swtpm_setup=yes |
183 | AM_CONDITIONAL([HAVE_TCSD], test "$have_tcsd" != "no") | |
e46a2b66 | 184 | |
5cd844d0 SB |
185 | dnl If we have the tcsd package, we can build swtpm_setup, but need netstat also |
186 | AC_PATH_PROG([NETSTAT], [netstat]) | |
187 | case $host_os in | |
188 | linux-*) | |
33be7be2 | 189 | if test "x$NETSTAT" = "x" && test "have_tcsd" != "no"; then |
64faf455 | 190 | AC_MSG_ERROR([netstat tool is missing for tests: net-tools package]) |
5cd844d0 SB |
191 | fi |
192 | ;; | |
193 | esac | |
194 | ||
09d1a532 SB |
195 | AC_MSG_CHECKING([for whether to build with CUSE interface]) |
196 | AC_ARG_WITH([cuse], | |
197 | AC_HELP_STRING([--with-cuse], | |
198 | [build with CUSE interface]), | |
199 | [], | |
200 | [with_cuse=check] | |
201 | ) | |
f163b202 | 202 | |
09d1a532 SB |
203 | if test "$with_cuse" != "no"; then |
204 | LIBFUSE_CFLAGS=$(pkg-config fuse --cflags 2>/dev/null) | |
205 | if test $? -ne 0; then | |
206 | if test "$with_cuse" = "yes"; then | |
207 | AC_MSG_ERROR("Is fuse-devel installed? -- could not get cflags for libfuse") | |
208 | else | |
209 | with_cuse=no | |
210 | fi | |
211 | else | |
212 | with_cuse=yes | |
213 | fi | |
498433f7 | 214 | fi |
09d1a532 SB |
215 | |
216 | dnl with_cuse is now yes or no | |
217 | if test "$with_cuse" != "no"; then | |
218 | LIBFUSE_LIBS=$(pkg-config fuse --libs) | |
219 | if test $? -ne 0; then | |
220 | AC_MSG_ERROR("Is fuse-devel installed? -- could not get libs for libfuse") | |
221 | fi | |
222 | AC_SUBST([LIBFUSE_CFLAGS]) | |
223 | AC_SUBST([LIBFUSE_LIBS]) | |
224 | AC_DEFINE_UNQUOTED([WITH_CUSE], 1, | |
225 | [whether to build with CUSE interface]) | |
ebf1557d SB |
226 | |
227 | GLIB_CFLAGS=$(pkg-config --cflags glib-2.0) | |
228 | if test $? -ne 0; then | |
229 | AC_MSG_ERROR("Is glib-2.0 installed? -- could not get cflags") | |
230 | fi | |
231 | AC_SUBST([GLIB_CFLAGS]) | |
232 | ||
233 | GLIB_LIBS=$(pkg-config --libs glib-2.0) | |
234 | if test $? -ne 0; then | |
235 | AC_MSG_ERROR("Is glib-2.0 installed? -- could not get libs") | |
236 | fi | |
237 | AC_SUBST([GLIB_LIBS]) | |
238 | ||
239 | GTHREAD_LIBS=$(pkg-config --libs gthread-2.0) | |
240 | if test $? -ne 0; then | |
241 | AC_MSG_ERROR("Is glib-2.0 installed? -- could not get libs for gthread-2.0") | |
242 | fi | |
243 | AC_SUBST([GTHREAD_LIBS]) | |
baecda40 | 244 | fi |
09d1a532 SB |
245 | AM_CONDITIONAL([WITH_CUSE],[test "$with_cuse" = "yes"]) |
246 | AC_MSG_RESULT($with_cuse) | |
f163b202 | 247 | |
498433f7 SB |
248 | AC_MSG_CHECKING([for whether to build with chardev interface]) |
249 | case $host_os in | |
250 | linux-*) | |
251 | with_chardev=yes | |
252 | AC_DEFINE_UNQUOTED([WITH_CHARDEV], 1, | |
253 | [whether to build with chardev interface]) | |
254 | ;; | |
255 | *) | |
256 | with_chardev=no | |
257 | esac | |
258 | AM_CONDITIONAL([WITH_CHARDEV],[test "$with_chardev" = "yes"]) | |
259 | AC_MSG_RESULT($with_cuse) | |
260 | ||
10002933 SB |
261 | AC_ARG_WITH([gnutls], |
262 | AC_HELP_STRING([--with-gnutls], | |
263 | [build with gnutls library]), | |
264 | [], | |
265 | [with_gnutls=check] | |
266 | ) | |
267 | ||
e46a2b66 SB |
268 | if test "x$with_gnutls" != "xno"; then |
269 | GNUTLS_LDFLAGS=$(pkg-config --libs gnutls) | |
270 | if test $? -ne 0; then | |
33be7be2 | 271 | if test "x$with_gnutls" = "xyes"; then |
e46a2b66 SB |
272 | AC_MSG_ERROR("Is gnutls installed? -- could not get libs for gnutls") |
273 | else | |
274 | with_gnutls=no | |
275 | fi | |
276 | fi | |
277 | fi | |
f163b202 | 278 | |
1828edee SB |
279 | if test "x$with_gnutls" != "xno"; then |
280 | AC_PATH_PROG([GNUTLS_CERTTOOL], certtool) | |
33be7be2 SB |
281 | if test "x$GNUTLS_CERTTOOL" = "x"; then |
282 | if test "x$with_gnutls" = "xyes"; then | |
1828edee SB |
283 | AC_MSG_ERROR("Could not find certtool. Is gnutls-utils/gnutls-bin installed?") |
284 | else | |
285 | with_gnutls=no | |
286 | fi | |
287 | fi | |
288 | fi | |
289 | ||
e46a2b66 | 290 | if test "x$with_gnutls" != "xno"; then |
571a8eed | 291 | ORIG_CFLAGS="$CFLAGS" |
baecda40 | 292 | GNUTLS_CFLAGS=$(pkg-config gnutls --cflags) |
571a8eed | 293 | CFLAGS="$CFLAGS $GNUTLS_CFLAGS $GNUTLS_LDFLAGS" |
10002933 | 294 | AC_CHECK_LIB([gnutls], [gnutls_load_file], [ |
baecda40 SB |
295 | GNUTLS_LIBS=-lgnutls |
296 | ], | |
33be7be2 | 297 | [if test "x$with_gnutls" = "xyes"; then |
e46a2b66 SB |
298 | AC_MSG_ERROR([GNUTLS >= 3.1.0 library not found: libgnutls.so]) |
299 | else | |
300 | with_gnutls="no" | |
301 | fi]) | |
571a8eed | 302 | CFLAGS="$ORIG_CFLAGS" |
e46a2b66 SB |
303 | fi |
304 | ||
305 | if test "x$with_gnutls" != "xno"; then | |
571a8eed SB |
306 | ORIG_CFLAGS="$CFLAGS" |
307 | CFLAGS="$CFLAGS $GNUTLS_CFLAGS" | |
e46a2b66 | 308 | AC_CHECK_HEADER(gnutls/abstract.h, [], \ |
33be7be2 | 309 | [if test "x$with_gnutls" = "xyes"; then |
e46a2b66 SB |
310 | AC_MSG_ERROR([GNUTLS >= 3.1.0 library header not found: gnutls/abstract.h]) |
311 | else | |
312 | with_gnutls="no" | |
313 | fi]) | |
571a8eed | 314 | CFLAGS="$ORIG_CFLAGS" |
e46a2b66 SB |
315 | fi |
316 | ||
317 | if test "x$with_gnutls" != "xno"; then | |
318 | with_gnutls="yes" | |
319 | fi | |
33be7be2 | 320 | AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_gnutls" = "xyes"]) |
baecda40 | 321 | AC_SUBST([GNUTLS_LIBS]) |
f163b202 | 322 | |
48abfbb1 | 323 | AC_PATH_PROG([EXPECT], expect) |
33be7be2 | 324 | if test "x$EXPECT" = "x"; then |
48abfbb1 SB |
325 | AC_MSG_ERROR([expect is required: expect package]) |
326 | fi | |
327 | ||
b080afb5 | 328 | AC_PATH_PROG([GAWK], gawk) |
33be7be2 | 329 | if test "x$GAWK" = "x"; then |
b080afb5 SB |
330 | AC_MSG_ERROR([gawk is required: gawk package]) |
331 | fi | |
332 | ||
8cb126e4 | 333 | AC_PATH_PROG([SOCAT], socat) |
33be7be2 | 334 | if test "x$SOCAT" = "x"; then |
8cb126e4 SB |
335 | AC_MSG_ERROR([socat is required: socat package]) |
336 | fi | |
337 | ||
b4372fe5 | 338 | AC_PATH_PROG([PYTHON], python3) |
33be7be2 | 339 | if test "x$PYTHON" = "x"; then |
b4372fe5 | 340 | AC_MSG_ERROR([python3 is required]) |
dbb399de SB |
341 | fi |
342 | ||
5eeea357 SB |
343 | AC_ARG_ENABLE([hardening], |
344 | AS_HELP_STRING([--disable-hardening], [Disable hardening flags])) | |
a76b4eeb | 345 | |
5eeea357 SB |
346 | if test "x$enable_hardening" != "xno"; then |
347 | TMP="$($CC -fstack-protector-strong $srcdir/include/swtpm/tpm_ioctl.h 2>&1)" | |
348 | if echo $TMP | $GREP 'unrecognized command line option' >/dev/null; then | |
349 | HARDENING_CFLAGS="-fstack-protector -Wstack-protector " | |
350 | else | |
351 | HARDENING_CFLAGS="-fstack-protector-strong -Wstack-protector " | |
352 | fi | |
353 | ||
354 | dnl Must not have -O0 but must have a -O for -D_FORTIFY_SOURCE=2 | |
355 | TMP1="$(echo $CFLAGS | sed -n 's/.*\(-O0\).*/\1/p')" | |
356 | TMP2="$(echo $CFLAGS | sed -n 's/.*\(-O\).*/\1/p')" | |
357 | if test -z "$TMP1" && test -n "$TPM2"; then | |
358 | HARDENING_CFLAGS="$HARDENING_CFLAGS -D_FORTIFY_SOURCE=2 " | |
359 | fi | |
360 | dnl Check ld for 'relro' and 'now' | |
361 | if $LD --help 2>&1 | $GREP '\-z relro ' > /dev/null; then | |
362 | HARDENING_CFLAGS="$HARDENING_CFLAGS -Wl,-z,relro " | |
363 | fi | |
364 | if $LD --help 2>&1 | $GREP '\-z now ' > /dev/null; then | |
365 | HARDENING_CFLAGS="$HARDENING_CFLAGS -Wl,-z,now " | |
366 | fi | |
367 | AC_SUBST([HARDENING_CFLAGS]) | |
a76b4eeb | 368 | fi |
e6085e96 | 369 | |
b8421f3d SB |
370 | AC_ARG_ENABLE([test-coverage], |
371 | AS_HELP_STRING([--enable-test-coverage], [Enable test coverage flags])) | |
372 | ||
373 | if test "x$enable_test_coverage" = "xyes"; then | |
374 | COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage" | |
375 | COVERAGE_LDFLAGS="-fprofile-arcs" | |
376 | fi | |
377 | ||
c4ac0a11 SB |
378 | AC_ARG_WITH([tss-user], |
379 | AC_HELP_STRING([--with-tss-user=TSS_USER], | |
380 | [The tss user to use]), | |
381 | [TSS_USER="$withval"], | |
382 | [TSS_USER="tss"] | |
383 | ) | |
384 | ||
385 | AC_ARG_WITH([tss-group], | |
386 | AC_HELP_STRING([--with-tss-group=TSS_GROUP], | |
387 | [The tss group to use]), | |
388 | [TSS_GROUP="$withval"], | |
389 | [TSS_GROUP="tss"] | |
390 | ) | |
391 | AC_SUBST([TSS_USER]) | |
392 | AC_SUBST([TSS_GROUP]) | |
393 | ||
f163b202 SB |
394 | CFLAGS="$CFLAGS -Wreturn-type -Wsign-compare -Wswitch-enum" |
395 | CFLAGS="$CFLAGS -Wmissing-prototypes -Wall -Werror" | |
e6085e96 | 396 | CFLAGS="$CFLAGS -Wformat -Wformat-security" |
b8421f3d SB |
397 | CFLAGS="$CFLAGS $GNUTLS_CFLAGS $COVERAGE_CFLAGS" |
398 | ||
399 | LDFLAGS="$LDFLAGS $COVERAGE_LDFLAGS" | |
f163b202 | 400 | |
f2458ef7 SB |
401 | dnl Simulate the following for systems with pkg-config < 0.28: |
402 | dnl PKG_CHECK_VAR([libtpms_cryptolib], [libtpms], [cryptolib], | |
403 | dnl [], AC_MSG_ERROR([Could not determine libtpms crypto library.])) | |
404 | PKG_PROG_PKG_CONFIG | |
405 | ||
406 | AC_MSG_CHECKING([Checking the crypto library libtpms is linked to]) | |
407 | libtpms_cryptolib=`$PKG_CONFIG --variable cryptolib libtpms` | |
33be7be2 | 408 | if test "x$libtpms_cryptolib" = "x"; then |
f2458ef7 SB |
409 | AC_MSG_ERROR([Could not determine the crypto library libtpms is using]) |
410 | fi | |
411 | AC_MSG_RESULT($libtpms_cryptolib) | |
86cc4527 SB |
412 | |
413 | if test "$libtpms_cryptolib" != "$cryptolib"; then | |
414 | echo "libtpms is using $libtpms_cryptolib; we have to use the same" | |
33be7be2 | 415 | if test "$cryptolib" = "openssl"; then |
86cc4527 SB |
416 | AC_MSG_ERROR([do not use --with-openssl]) |
417 | else | |
418 | AC_MSG_ERROR([use --with-openssl]) | |
419 | fi | |
420 | fi | |
421 | ||
c751e32e SB |
422 | with_vtpm_proxy=no |
423 | case $host_os in | |
f071d820 | 424 | linux-*) |
c751e32e SB |
425 | with_vtpm_proxy=yes |
426 | AC_DEFINE_UNQUOTED([WITH_VTPM_PROXY], 1, | |
427 | [whether to build in vTPM proxy support (Linux only)]) | |
428 | esac | |
429 | ||
6286beac SB |
430 | case $host_os in |
431 | cygwin) | |
432 | CFLAGS="$CFLAGS -D__USE_LINUX_IOCTL_DEFS" | |
433 | esac | |
434 | ||
761df6cd SB |
435 | dnl Seccomp profile using -lseccomp (Linux only) |
436 | case $host_os in | |
437 | linux-*) | |
438 | with_seccomp_default=yes | |
439 | ;; | |
440 | *) | |
441 | with_seccomp_default=no | |
442 | ;; | |
443 | esac | |
444 | ||
445 | AC_MSG_CHECKING([for whether to build with seccomp profile]) | |
446 | AC_ARG_WITH([seccomp], | |
447 | AC_HELP_STRING([--with-seccomp], | |
448 | [build with seccomp profile]), | |
449 | [], | |
450 | [with_seccomp=$with_seccomp_default] | |
451 | ) | |
452 | ||
453 | if test "$with_seccomp" != "no"; then | |
454 | LIBSECCOMP_CFLAGS=$(pkg-config libseccomp --cflags 2>/dev/null) | |
455 | if test $? -ne 0; then | |
456 | AC_MSG_ERROR("Is libseccomp-devel installed? -- could not get cflags for libseccomp") | |
457 | else | |
458 | with_libseccomp=yes | |
459 | fi | |
460 | LIBSECCOMP_LIBS=$(pkg-config --libs libseccomp) | |
461 | AC_SUBST([LIBSECCOMP_LIBS]) | |
462 | AC_SUBST([LIBSECCOMP_CFLAGS]) | |
463 | AC_DEFINE_UNQUOTED([WITH_SECCOMP], 1, | |
464 | [whether to build in seccomp profile (Linux only)]) | |
465 | fi | |
466 | ||
44b92d43 SB |
467 | AC_CONFIG_FILES([Makefile \ |
468 | debian/swtpm-tools.postinst \ | |
f163b202 | 469 | dist/swtpm.spec \ |
e46a2b66 | 470 | etc/Makefile \ |
0432b653 | 471 | etc/swtpm_setup.conf \ |
e46a2b66 | 472 | samples/Makefile \ |
d16b86b7 | 473 | samples/swtpm-localca.conf \ |
f163b202 SB |
474 | include/Makefile \ |
475 | include/swtpm/Makefile \ | |
a1fa5d77 | 476 | include/swtpm.h \ |
f163b202 SB |
477 | src/Makefile \ |
478 | src/selinux/Makefile \ | |
479 | src/swtpm/Makefile \ | |
e46a2b66 SB |
480 | src/swtpm_bios/Makefile \ |
481 | src/swtpm_cert/Makefile \ | |
482 | src/swtpm_ioctl/Makefile \ | |
483 | src/swtpm_setup/Makefile \ | |
c4ac0a11 | 484 | src/swtpm_setup/swtpm_setup.h \ |
f163b202 | 485 | man/Makefile \ |
39d0c3de | 486 | man/man3/Makefile \ |
f163b202 | 487 | man/man8/Makefile \ |
e46a2b66 | 488 | tests/Makefile \ |
c4ac0a11 | 489 | tests/test_config \ |
10002933 SB |
490 | ]) |
491 | AC_CONFIG_FILES([src/swtpm_setup/swtpm_setup.sh], | |
492 | [chmod 755 src/swtpm_setup/swtpm_setup.sh]) | |
0432b653 SB |
493 | AC_CONFIG_FILES([samples/swtpm-localca], |
494 | [chmod 755 samples/swtpm-localca]) | |
f163b202 SB |
495 | AC_OUTPUT |
496 | ||
e46a2b66 | 497 | echo |
c3fdf688 SB |
498 | printf "with_gnutls : %5s (no = swtpm_cert will NOT be built)\n" $with_gnutls |
499 | printf "with_selinux : %5s (no = SELinux policy extenions will NOT be built)\n" $with_selinux | |
500 | printf "with_cuse : %5s (no = no CUSE interface)\n" $with_cuse | |
498433f7 | 501 | printf "with_chardev : %5s (no = no chardev interface)\n" $with_chardev |
c3fdf688 | 502 | printf "with_swtpm_setup: %5s (no = swtpm_setup will NOT be built)\n" $with_swtpm_setup |
c751e32e | 503 | printf "with_vtpm_proxy : %5s (no = no vtpm proxy support; Linux only)\n" $with_vtpm_proxy |
761df6cd | 504 | printf "with_seccomp : %5s (no = no seccomp profile; Linux only)\n" $with_seccomp |
e46a2b66 | 505 | echo |
10002933 SB |
506 | echo "cryptolib: $cryptolib" |
507 | echo | |
f163b202 | 508 | echo "CFLAGS=$CFLAGS" |
a76b4eeb | 509 | echo "HARDENING_CFLAGS=$HARDENING_CFLAGS" |
f163b202 | 510 | echo "LDFLAGS=$LDFLAGS" |
761df6cd | 511 | echo "LIBSECCOMP_LIBS=$LIBSECCOMP_LIBS" |
c4ac0a11 SB |
512 | echo |
513 | echo "TSS_USER=$TSS_USER" | |
514 | echo "TSS_GROUP=$TSS_GROUP" | |
515 | echo |