xref: /aosp_15_r20/external/ms-tpm-20-ref/TPMCmd/configure.ac (revision 5c591343844d1f9da7da26467c4bf7efc8a7a413)
1*5c591343SA. Cody Schuffelendnl The copyright in this software is being made available under the BSD License,
2*5c591343SA. Cody Schuffelendnl included below. This software may be subject to other third party and
3*5c591343SA. Cody Schuffelendnl contributor rights, including patent rights, and no such rights are granted
4*5c591343SA. Cody Schuffelendnl under this license.
5*5c591343SA. Cody Schuffelendnl
6*5c591343SA. Cody Schuffelendnl Copyright (c) Intel Corporation
7*5c591343SA. Cody Schuffelendnl
8*5c591343SA. Cody Schuffelendnl All rights reserved.
9*5c591343SA. Cody Schuffelendnl
10*5c591343SA. Cody Schuffelendnl BSD License
11*5c591343SA. Cody Schuffelendnl
12*5c591343SA. Cody Schuffelendnl Redistribution and use in source and binary forms, with or without modification,
13*5c591343SA. Cody Schuffelendnl are permitted provided that the following conditions are met:
14*5c591343SA. Cody Schuffelendnl
15*5c591343SA. Cody Schuffelendnl Redistributions of source code must retain the above copyright notice, this list
16*5c591343SA. Cody Schuffelendnl of conditions and the following disclaimer.
17*5c591343SA. Cody Schuffelendnl
18*5c591343SA. Cody Schuffelendnl Redistributions in binary form must reproduce the above copyright notice, this
19*5c591343SA. Cody Schuffelendnl list of conditions and the following disclaimer in the documentation and/or
20*5c591343SA. Cody Schuffelendnl other materials provided with the distribution.
21*5c591343SA. Cody Schuffelendnl
22*5c591343SA. Cody Schuffelendnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS""
23*5c591343SA. Cody Schuffelendnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24*5c591343SA. Cody Schuffelendnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25*5c591343SA. Cody Schuffelendnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
26*5c591343SA. Cody Schuffelendnl ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27*5c591343SA. Cody Schuffelendnl (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28*5c591343SA. Cody Schuffelendnl LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29*5c591343SA. Cody Schuffelendnl ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30*5c591343SA. Cody Schuffelendnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31*5c591343SA. Cody Schuffelendnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32*5c591343SA. Cody Schuffelen
33*5c591343SA. Cody SchuffelenAC_INIT([ms-tpm-20-ref],
34*5c591343SA. Cody Schuffelen        [0.1],
35*5c591343SA. Cody Schuffelen        [https://github.com/microsoft/ms-tpm-20-ref/issues],
36*5c591343SA. Cody Schuffelen        [],
37*5c591343SA. Cody Schuffelen        [https://github.com/microsoft/ms-tpm-20-ref])
38*5c591343SA. Cody SchuffelenAC_CONFIG_MACRO_DIR([.])
39*5c591343SA. Cody SchuffelenAC_PROG_CC
40*5c591343SA. Cody SchuffelenAC_PROG_LN_S
41*5c591343SA. Cody SchuffelenAC_PROG_RANLIB
42*5c591343SA. Cody SchuffelenAM_INIT_AUTOMAKE([foreign subdir-objects])
43*5c591343SA. Cody SchuffelenAC_CONFIG_FILES([Makefile])
44*5c591343SA. Cody SchuffelenAC_SUBST([DISTCHECK_CONFIGURE_FLAGS],[$ac_configure_args])
45*5c591343SA. Cody Schuffelen
46*5c591343SA. Cody Schuffelendnl By enabling this feature tpm simulator gets seeds derived from hardware parameters.
47*5c591343SA. Cody Schuffelendnl It is enabled only for linux devices.
48*5c591343SA. Cody Schuffelendnl Note that the seeds are not derived from secure hardware source.
49*5c591343SA. Cody Schuffelen
50*5c591343SA. Cody SchuffelenAC_ARG_ENABLE(usedeviceid,
51*5c591343SA. Cody Schuffelen    AS_HELP_STRING([--enable-usedeviceid],
52*5c591343SA. Cody Schuffelen    [tpm simulator get seeds derived from hardware parameters. Seeds are not derived from secure hardware source.]))
53*5c591343SA. Cody Schuffelen
54*5c591343SA. Cody SchuffelenPKG_CHECK_MODULES([LIBCRYPTO], [libcrypto])
55*5c591343SA. Cody SchuffelenAS_IF([test "x$enable_usedeviceid" = "xyes"], [
56*5c591343SA. Cody Schuffelen    PKG_CHECK_MODULES([LIBUDEV], [libudev])
57*5c591343SA. Cody Schuffelen    [ADDITIONAL_LIBS="-ludev"]
58*5c591343SA. Cody Schuffelen])
59*5c591343SA. Cody SchuffelenAX_PTHREAD([], [AC_MSG_ERROR([requires pthread])])
60*5c591343SA. Cody Schuffelen
61*5c591343SA. Cody SchuffelenAC_DEFINE([HASH_LIB], [Ossl], [Crypto lib for hash algorithms])
62*5c591343SA. Cody SchuffelenAC_DEFINE([SYM_LIB], [Ossl], [Crypto lib for symmetric encryption algorithms])
63*5c591343SA. Cody SchuffelenAC_DEFINE([MATH_LIB], [Ossl], [Crypto lib for bignum operations])
64*5c591343SA. Cody Schuffelen
65*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-std=gnu11])
66*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Werror])
67*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wall])
68*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wformat-security])
69*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-fstack-protector-all])
70*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-fPIC])
71*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=empty-body])
72*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=expansion-to-defined])
73*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=parentheses])
74*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=pointer-to-int-cast])
75*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=missing-braces])
76*5c591343SA. Cody SchuffelenADD_COMPILER_FLAG([-Wno-error=unused-result])
77*5c591343SA. Cody Schuffelen
78*5c591343SA. Cody SchuffelenAS_IF([test "x$enable_usedeviceid" = "xyes"], [
79*5c591343SA. Cody Schuffelen    ADD_COMPILER_FLAG([-DNDEBUG])
80*5c591343SA. Cody Schuffelen    ADD_COMPILER_FLAG([-g])
81*5c591343SA. Cody Schuffelen    ADD_COMPILER_FLAG([-DUSE_PLATFORM_EPS])
82*5c591343SA. Cody Schuffelen    AC_SUBST(ADDITIONAL_LIBS)
83*5c591343SA. Cody Schuffelen])
84*5c591343SA. Cody SchuffelenADD_LINK_FLAG([-Wl,--no-undefined])
85*5c591343SA. Cody SchuffelenADD_LINK_FLAG([-Wl,-z,noexecstack])
86*5c591343SA. Cody SchuffelenADD_LINK_FLAG([-Wl,-z,now])
87*5c591343SA. Cody SchuffelenADD_LINK_FLAG([-Wl,-z,relro])
88*5c591343SA. Cody Schuffelen
89*5c591343SA. Cody SchuffelenAC_OUTPUT
90