Home | History | Annotate | Line # | Download | only in dist
      1  1.1  christos #
      2  1.1  christos # configure.ac for the trousers project
      3  1.1  christos #
      4  1.1  christos 
      5  1.1  christos AC_INIT(trousers, 0.3.14, trousers-tech@lists.sf.net)
      6  1.1  christos 
      7  1.1  christos TSS_SPEC_MAJOR=1
      8  1.1  christos TSS_SPEC_MINOR=2
      9  1.1  christos TSS_VER_MAJOR=0
     10  1.1  christos TSS_VER_MINOR=3
     11  1.1  christos 
     12  1.1  christos # compute $target
     13  1.1  christos AC_CANONICAL_TARGET
     14  1.1  christos AM_INIT_AUTOMAKE([foreign subdir-objects 1.6])
     15  1.1  christos 
     16  1.1  christos # Debugging support
     17  1.1  christos AC_ARG_ENABLE([debug],
     18  1.1  christos     [AC_HELP_STRING([--enable-debug], [turn on all trousers debugging flags [default=off]])],
     19  1.1  christos     AC_MSG_RESULT([*** Enabling debugging at user request ***]),)
     20  1.1  christos 
     21  1.1  christos # If the user has not set CFLAGS, do something appropriate
     22  1.1  christos test_CFLAGS=${CFLAGS+set}
     23  1.1  christos if test "$test_CFLAGS" != set; then
     24  1.1  christos 	if test "x$enable_debug" = "xyes"; then
     25  1.1  christos 		CFLAGS="-O0 -g -DTSS_DEBUG -Wreturn-type"
     26  1.1  christos #		CFLAGS="-O0 -g -DTSS_DEBUG -Wreturn-type -DTCSD_SINGLE_THREAD_DEBUG"
     27  1.1  christos 	else
     28  1.1  christos 		CFLAGS="-O2"
     29  1.1  christos 	fi
     30  1.1  christos else
     31  1.1  christos 	if test "x$enable_debug" = "xyes"; then
     32  1.1  christos 		CFLAGS="${CFLAGS} -O0 -g -DTSS_DEBUG -Wreturn-type"
     33  1.1  christos 	fi
     34  1.1  christos fi
     35  1.1  christos 
     36  1.1  christos # Arch specific stuff
     37  1.1  christos case $target in
     38  1.1  christos 	*darwin*)
     39  1.1  christos         	TCSD_LDFLAGS=""
     40  1.1  christos         	;;
     41  1.1  christos 	*solaris*)
     42  1.1  christos 		CFLAGS="$CFLAGS -DSOLARIS"
     43  1.1  christos 		;;
     44  1.1  christos         *)
     45  1.1  christos         	TCSD_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
     46  1.1  christos                 ;;
     47  1.1  christos esac
     48  1.1  christos 
     49  1.1  christos AC_SUBST(TCSD_LDFLAGS)
     50  1.1  christos 
     51  1.1  christos # Non-standard OpenSSL location
     52  1.1  christos AC_MSG_CHECKING([Non-standard OpenSSL location])
     53  1.1  christos AC_ARG_WITH(openssl,
     54  1.1  christos 	AC_HELP_STRING([--with-openssl=PATH], [Location of openssl libs/includes]),
     55  1.1  christos 	[OPENSSL_INCLUDE_DIR="$withval/include"
     56  1.1  christos 	 OPENSSL_LIB_DIR="$withval/lib"
     57  1.1  christos 	 if [[ ! -d $OPENSSL_INCLUDE_DIR -o ! -d $OPENSSL_LIB_DIR ]]; then
     58  1.1  christos 		AC_MSG_ERROR([$OPENSSL_INCLUDE_DIR or $OPENSSL_LIB_DIR doen't exist!])
     59  1.1  christos 	 else
     60  1.1  christos 		AC_MSG_RESULT([yes])
     61  1.1  christos 		CFLAGS="$CFLAGS -L$OPENSSL_LIB_DIR -I$OPENSSL_INCLUDE_DIR"
     62  1.1  christos 		AC_SUBST([OPENSSL_LIB_DIR])
     63  1.1  christos 	 fi],
     64  1.1  christos 	[AC_MSG_RESULT([no])
     65  1.1  christos 	 AC_SUBST([OPENSSL_LIB_DIR], []) ] )
     66  1.1  christos 
     67  1.1  christos # The tspi Makefile will look for trspi/crypto/@CRYPTO_PACKAGE@/crypto.c
     68  1.1  christos # Future crypto packages can go in their own subdir of trspi/crypto
     69  1.1  christos # and a check for them should be made here
     70  1.1  christos AC_CHECK_LIB([crypto], [EVP_DigestUpdate],
     71  1.1  christos 		[CRYPTO_PACKAGE='openssl'],
     72  1.1  christos 		[AC_MSG_ERROR([openssl is currently the only supported crypto library for trousers. Please install openssl from http://www.openssl.org or the -devel package from your distro])])
     73  1.1  christos AC_SUBST([CRYPTO_PACKAGE])
     74  1.1  christos AC_SUBST(CRYPTOLIB, -lcrypto)
     75  1.1  christos 
     76  1.1  christos AC_ARG_ENABLE(gcov,
     77  1.1  christos 		[AC_HELP_STRING([--enable-gcov], [turn on gcov code coverage flags [default=off]])],
     78  1.1  christos 		[CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
     79  1.1  christos 		 AC_MSG_RESULT([*** Enabling gcov at user request ***])],)
     80  1.1  christos 
     81  1.1  christos # profiling support
     82  1.1  christos AC_ARG_ENABLE(gprof,
     83  1.1  christos 		[AC_HELP_STRING([--enable-gprof], [enable profiling with gprof [default=off]])],
     84  1.1  christos 		[CFLAGS="$CFLAGS -pg"
     85  1.1  christos 		 AC_MSG_RESULT([*** Enabling profiling at user request ***])],)
     86  1.1  christos 
     87  1.1  christos SPEC_COMP=0
     88  1.1  christos # strict spec compliance
     89  1.1  christos AC_ARG_ENABLE(strict-spec-compliance,
     90  1.1  christos 		[AC_HELP_STRING([--enable-strict-spec-compliance], [build TrouSerS as strictly spec compliant [default=off]])],
     91  1.1  christos 		[CFLAGS="$CFLAGS -DTSS_SPEC_COMPLIANCE"
     92  1.1  christos 		 SPEC_COMP=1
     93  1.1  christos 		 AC_MSG_RESULT([*** Enabling spec compliance at user request ***])],)
     94  1.1  christos 
     95  1.1  christos # user+group checking
     96  1.1  christos AC_ARG_ENABLE(usercheck,
     97  1.1  christos 		[AC_HELP_STRING([--disable-usercheck], [build TrouSerS without checking and setting of user/group tss [default=on] (Caution: This is intended for development purposes only.)])],
     98  1.1  christos 		[AS_IF([test "x$enableval" = "xno"], [CFLAGS="$CFLAGS -DNOUSERCHECK"
     99  1.1  christos 		AC_MSG_RESULT([*** Disabling user checking at user request ***])])],)
    100  1.1  christos AM_CONDITIONAL(NOUSERCHECK, [test "x$enable_usercheck" = "xno"])
    101  1.1  christos 
    102  1.1  christos # daa math lib: gmp or openssl (default openssl)
    103  1.1  christos MATH_DEFINE=BI_OPENSSL
    104  1.1  christos AC_ARG_WITH([gmp],
    105  1.1  christos 	    AC_HELP_STRING([--with-gmp], [build TrouSerS with the GMP math lib (used in DAA)]),
    106  1.1  christos 		[AC_CHECK_LIB(gmp, [__gmp_rand], [], [])
    107  1.1  christos 		AC_CHECK_HEADERS([gmp.h])
    108  1.1  christos 	    MATH_DEFINE=BI_GMP
    109  1.1  christos 		AC_MSG_RESULT([*** Enabling GMP lib at user request ***]) ]
    110  1.1  christos )
    111  1.1  christos 
    112  1.1  christos case "$MATH_DEFINE" in
    113  1.1  christos BI_OPENSSL)
    114  1.1  christos 	AC_CHECK_HEADERS([ openssl/bn.h openssl/engine.h])
    115  1.1  christos 	;;
    116  1.1  christos esac
    117  1.1  christos CFLAGS="$CFLAGS -D$MATH_DEFINE"
    118  1.1  christos 
    119  1.1  christos GUI=openssl
    120  1.1  christos AC_ARG_WITH(gui,
    121  1.1  christos 	    [AC_HELP_STRING([--with-gui], [type of gui popup (gtk/none) [default=gtk]])],
    122  1.1  christos 	    [GUI=$withval],
    123  1.1  christos 	    [])
    124  1.1  christos 
    125  1.1  christos if test "x$GUI" = "xgtk"; then
    126  1.1  christos 	# section imported from Glade compile
    127  1.1  christos 	pkg_modules="gtk+-2.0 >= 2.0.0"
    128  1.1  christos 	PKG_CHECK_MODULES(GTK,
    129  1.1  christos 		[$pkg_modules],
    130  1.1  christos 		AM_CONDITIONAL(HAVE_GTK, true),
    131  1.1  christos 		[AM_CONDITIONAL(HAVE_GTK, false)
    132  1.1  christos 		AC_MSG_ERROR([Please install the gtk2-devel package for your distro or select another gui option.]) ])
    133  1.1  christos 	AM_CONDITIONAL(OPENSSL_UI, false)
    134  1.1  christos 	AC_SUBST(GTK_CFLAGS)
    135  1.1  christos 	AC_SUBST(GTK_LIBS)
    136  1.1  christos elif test "x$GUI" = "xopenssl"; then
    137  1.1  christos 	# We know we have OpenSSL
    138  1.1  christos 	AM_CONDITIONAL(OPENSSL_UI, true)
    139  1.1  christos 	AM_CONDITIONAL(HAVE_GTK, false)
    140  1.1  christos elif test "x$GUI" = "xnone"; then
    141  1.1  christos 	if test $SPEC_COMP -eq 1; then
    142  1.1  christos 		AC_MSG_ERROR([Popups must be enabled in strict spec compliance mode])
    143  1.1  christos 	fi
    144  1.1  christos 	AC_MSG_RESULT([*** Disabling GUI popups at user request ***])
    145  1.1  christos 	AC_MSG_RESULT([*** WARNING: This may break apps! ***])
    146  1.1  christos 	CFLAGS="$CFLAGS -DTSS_NO_GUI"
    147  1.1  christos 	AM_CONDITIONAL(HAVE_GTK, false)
    148  1.1  christos 	AM_CONDITIONAL(OPENSSL_UI, false)
    149  1.1  christos else
    150  1.1  christos 	AC_MSG_ERROR(["gtk", "openssl" and "none" are the only supported gui options for trousers])
    151  1.1  christos fi
    152  1.1  christos 
    153  1.1  christos #
    154  1.1  christos # The default port that the TCS daemon listens on
    155  1.1  christos #
    156  1.1  christos AC_SUBST(TCSD_DEFAULT_PORT, 30003)
    157  1.1  christos #
    158  1.1  christos # The RPC mechanism to build into both libtspi and the tcsd
    159  1.1  christos #
    160  1.1  christos # AC_SUBST(RPC, "soap")
    161  1.1  christos AC_SUBST(RPC, "tcstp")
    162  1.1  christos 
    163  1.1  christos #
    164  1.1  christos # API= The TSS API level to build by default.
    165  1.1  christos #
    166  1.1  christos # To build a 1.1 TSS, set API=1.1 (./configure --with-api=1.1)
    167  1.1  christos # To build a 1.2 TSS, set API=1.2 (./configure --with-api=1.2)
    168  1.1  christos #
    169  1.1  christos # In order to build a custom TSS API, set API to the lowest API level that
    170  1.1  christos # contains the APIs you need. For instance, if you need only APIs that are
    171  1.1  christos # a subset of the TSS 1.1 API, set this to 1.1. If you need any of the 1.2
    172  1.1  christos # APIs, you'll need to set this to 1.2. Send mail to trousers-tech@lists.sf.net
    173  1.1  christos # if you have questions.
    174  1.1  christos #
    175  1.1  christos API=1.2
    176  1.1  christos AC_ARG_WITH(api,
    177  1.1  christos 	    [AC_HELP_STRING([--with-api], [Version of the TSS API to build [default=1.2]])],
    178  1.1  christos 	    [API=$withval],
    179  1.1  christos 	    [])
    180  1.1  christos 
    181  1.1  christos if test "x$API" != "x1.1" && test "x$API" != "x1.2"; then
    182  1.1  christos 	AC_MSG_ERROR(["1.1" and "1.2" are the only supported API versions for trousers.
    183  1.1  christos 		      Custom API build options are available by editing 'configure.in'.])
    184  1.1  christos fi
    185  1.1  christos 
    186  1.1  christos if test "x$API" = "x1.1" || test "x$API" = "x1.2"; then
    187  1.1  christos 	# Tspi_Hash_GetHashValue,SetHashValue,UpdateHashValue
    188  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_HASH, true)
    189  1.1  christos 	# Tspi_{Get|Set}Attribdata,{Get|Set}AttribUint32
    190  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_GETSET, true)
    191  1.1  christos 	# Tspi_TPM_GetRandom,StirRandom
    192  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_RANDOM, true)
    193  1.1  christos 	# Tspi_GetCapability (for TSP and TCS capabilities)
    194  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CAPS, true)
    195  1.1  christos 	# Tspi_TPM_GetCapability (for TPM chip capabilities)
    196  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CAPS_TPM, true)
    197  1.1  christos 	# Tspi_GetPolicyObject, Tspi_Policy_SetSecret,FlushSecret,AssignToObject
    198  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_POLICY, true)
    199  1.1  christos 	# Tspi_TPM_DirWrite,DirRead
    200  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_DIR, true)
    201  1.1  christos 	# Tspi_TPM_GetEvent,GetEvents,GetEventLog
    202  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PCR_EVENTS, true)
    203  1.1  christos 	# Tspi_Hash_Sign,VerifySignature
    204  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_SIGN, true)
    205  1.1  christos 	# Tspi_TPM_Quote
    206  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_QUOTE, true)
    207  1.1  christos 	# Tspi_PcrComposite_{Set|Get}PcrValue,SelectPcrIndex
    208  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PCR_COMP, true)
    209  1.1  christos 	# Tspi_Data_Seal,Unseal
    210  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_SEAL, true)
    211  1.1  christos 	# Tspi_ChangeAuth,ChangeAuthAsym
    212  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CHANGEAUTH, true)
    213  1.1  christos 	# Tspi_Data_Bind,Unbind
    214  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_BIND, true)
    215  1.1  christos 	# Tspi_TPM_TakeOwnership,ClearOwner (REQ: EK)
    216  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_OWN, true)
    217  1.1  christos 	# Tspi_TPM_CreateEndorsementKey,GetPubEndorsementKey
    218  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_EK, true)
    219  1.1  christos 	# Tspi_Context_RegisterKey,UnregisterKey,LoadKeyByUUID,GetKeyByUUID,GetKeyByPublicInfo,
    220  1.1  christos 	# GetRegisteredKeysByUUID
    221  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PS, true)
    222  1.1  christos 	# Tspi_TPM_{Set|Get}Status
    223  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_ADMIN, true)
    224  1.1  christos 	# Tspi_TPM_CollateIdentityRequest,ActivateIdentity
    225  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_AIK, true)
    226  1.1  christos 	# Tspi_Key_CertifyKey
    227  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CERTIFY, true)
    228  1.1  christos 	# Tspi_TPM_CreateMaintenanceArchive,KillMaintenanceFeature,LoadMaintenancePubKey,
    229  1.1  christos 	# CheckMaintenancePubKey
    230  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_MAINT, true)
    231  1.1  christos 	# Tspi_TPM_AuthorizeMigrationTicket,Key_CreateMigrationBlob,ConvertMigrationBlob
    232  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_MIGRATION, true)
    233  1.1  christos 	# Tspi_Context_LoadKeyByBlob,Key_LoadKey,UnloadKey,CreateKey,WrapKey,GetPubKey
    234  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_KEY, true)
    235  1.1  christos 	# Tspi_TPM_PcrExtend,PcrRead,PcrReset
    236  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PCR_EXTEND, true)
    237  1.1  christos 	# Tspi_TPM_SelfTestFull,CertifySelfTest,GetTestResult
    238  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_SELFTEST, true)
    239  1.1  christos fi
    240  1.1  christos 
    241  1.1  christos if test "x$API" = "x1.2"; then
    242  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TSS12, true)
    243  1.1  christos 	# Don't build DAA until the API is fixed - KEY
    244  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_DAA, false)
    245  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PCR_COMP12, true)
    246  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_COUNTER, true)
    247  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TICK, true)
    248  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TRANSPORT, true)
    249  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_ASN1, true)
    250  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_NV, true)
    251  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_AUDIT, true)
    252  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_SEALX, true)
    253  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_DELEGATION, true)
    254  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_QUOTE2,true)
    255  1.1  christos 	# CMK depends on MIGRATION
    256  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CMK, true)
    257  1.1  christos else
    258  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TSS12, false)
    259  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_DAA, false)
    260  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_PCR_COMP12, false)
    261  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_COUNTER, false)
    262  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TICK, false)
    263  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_TRANSPORT, false)
    264  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_ASN1, false)
    265  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_NV, false)
    266  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_AUDIT, false)
    267  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_SEALX, false)
    268  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_DELEGATION, false)
    269  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_QUOTE2,false)
    270  1.1  christos 	AM_CONDITIONAL(TSS_BUILD_CMK, false)
    271  1.1  christos fi
    272  1.1  christos 
    273  1.1  christos #
    274  1.1  christos # There's no need to edit anything below, these conditionals control the building
    275  1.1  christos # of files that support the files above, which all contain TSS APIs
    276  1.1  christos #
    277  1.1  christos AM_CONDITIONAL(TSS_BUILD_NV_LIST, test -z $TSS_BUILD_NV_TRUE)
    278  1.1  christos AM_CONDITIONAL(TSS_BUILD_NV_SUPPORT, test -z $TSS_BUILD_NV_TRUE)
    279  1.1  christos AM_CONDITIONAL(TSS_BUILD_GET_FLAGS, test -z $TSS_BUILD_ADMIN_TRUE || \
    280  1.1  christos 				    test -z $TSS_BUILD_CAPS_TPM_TRUE)
    281  1.1  christos AM_CONDITIONAL(TSS_BUILD_PCRS_LIST, test -z $TSS_BUILD_SEAL_TRUE || \
    282  1.1  christos 				    test -z $TSS_BUILD_QUOTE_TRUE || \
    283  1.1  christos 				    test -z $TSS_BUILD_PCRS_TRUE || \
    284  1.1  christos 				    test -z $TSS_BUILD_PCR_COMP_TRUE || \
    285  1.1  christos 				    test -z $TSS_BUILD_SEALX_TRUE)
    286  1.1  christos AM_CONDITIONAL(TSS_BUILD_HASH_LIST, test -z $TSS_BUILD_SIGN_TRUE || test -z $TSS_BUILD_HASH_TRUE)
    287  1.1  christos AM_CONDITIONAL(TSS_BUILD_ENCDATA_LIST, test -z $TSS_BUILD_SEAL_TRUE || \
    288  1.1  christos 				       test -z $TSS_BUILD_CHANGEAUTH_TRUE || \
    289  1.1  christos 				       test -z $TSS_BUILD_BIND_TRUE || \
    290  1.1  christos 				       test -z $TSS_BUILD_SEALX_TRUE)
    291  1.1  christos AM_CONDITIONAL(TSS_BUILD_RSAKEY_LIST, test -z $TSS_BUILD_ADMIN_TRUE || \
    292  1.1  christos 				      test -z $TSS_BUILD_EK_TRUE || \
    293  1.1  christos 				      test -z $TSS_BUILD_MIGRATION_TRUE || \
    294  1.1  christos 				      test -z $TSS_BUILD_MAINT_TRUE || \
    295  1.1  christos 				      test -z $TSS_BUILD_CERTIFY_TRUE || \
    296  1.1  christos 				      test -z $TSS_BUILD_AIK_TRUE || \
    297  1.1  christos 				      test -z $TSS_BUILD_QUOTE_TRUE || \
    298  1.1  christos 				      test -z $TSS_BUILD_BIND_TRUE || \
    299  1.1  christos 				      test -z $TSS_BUILD_CHANGEAUTH_TRUE || \
    300  1.1  christos 				      test -z $TSS_BUILD_OWN_TRUE || \
    301  1.1  christos 				      test -z $TSS_BUILD_SIGN_TRUE || \
    302  1.1  christos 				      test -z $TSS_BUILD_PS_TRUE || \
    303  1.1  christos 				      test -z $TSS_BUILD_SEAL_TRUE || \
    304  1.1  christos 				      test -z $TSS_BUILD_DAA_TRUE || \
    305  1.1  christos 				      test -z $TSS_BUILD_KEY_TRUE || \
    306  1.1  christos 				      test -z $TSS_BUILD_SEALX_TRUE)
    307  1.1  christos AM_CONDITIONAL(TSS_BUILD_AUTH, test -z $TSS_BUILD_HASH_TRUE || \
    308  1.1  christos 			       test -z $TSS_BUILD_CAPS_TRUE || \
    309  1.1  christos 			       test -z $TSS_BUILD_CAPS_TPM_TRUE || \
    310  1.1  christos 			       test -z $TSS_BUILD_POLICY_TRUE || \
    311  1.1  christos 			       test -z $TSS_BUILD_DIR_TRUE || \
    312  1.1  christos 			       test -z $TSS_BUILD_PCR_EVENTS_TRUE || \
    313  1.1  christos 			       test -z $TSS_BUILD_SIGN_TRUE || \
    314  1.1  christos 			       test -z $TSS_BUILD_QUOTE_TRUE || \
    315  1.1  christos 			       test -z $TSS_BUILD_PCR_COMP_TRUE || \
    316  1.1  christos 			       test -z $TSS_BUILD_SEAL_TRUE || \
    317  1.1  christos 			       test -z $TSS_BUILD_SEALX_TRUE || \
    318  1.1  christos 			       test -z $TSS_BUILD_CHANGEAUTH_TRUE || \
    319  1.1  christos 			       test -z $TSS_BUILD_BIND_TRUE || \
    320  1.1  christos 			       test -z $TSS_BUILD_OWN_TRUE || \
    321  1.1  christos 			       test -z $TSS_BUILD_PS_TRUE || \
    322  1.1  christos 			       test -z $TSS_BUILD_ADMIN_TRUE || \
    323  1.1  christos 			       test -z $TSS_BUILD_AIK_TRUE || \
    324  1.1  christos 			       test -z $TSS_BUILD_EK_TRUE || \
    325  1.1  christos 			       test -z $TSS_BUILD_CERTIFY_TRUE || \
    326  1.1  christos 			       test -z $TSS_BUILD_MAINT_TRUE || \
    327  1.1  christos 			       test -z $TSS_BUILD_MIGRATION_TRUE || \
    328  1.1  christos 			       test -z $TSS_BUILD_KEY_TRUE || \
    329  1.1  christos 			       test -z $TSS_BUILD_PCR_EXTEND_TRUE || \
    330  1.1  christos 			       test -z $TSS_BUILD_SELFTEST_TRUE || \
    331  1.1  christos 			       test -z $TSS_BUILD_DAA_TRUE)
    332  1.1  christos AM_CONDITIONAL(TSS_BUILD_ASYM_CRYPTO, test -z $TSS_BUILD_AIK_TRUE || \
    333  1.1  christos 				      test -z $TSS_BUILD_CERTIFY_TRUE || \
    334  1.1  christos 				      test -z $TSS_BUILD_QUOTE_TRUE || \
    335  1.1  christos 				      test -z $TSS_BUILD_EK_TRUE || \
    336  1.1  christos 				      test -z $TSS_BUILD_CHANGEAUTH_TRUE || \
    337  1.1  christos 				      test -z $TSS_BUILD_BIND_TRUE || \
    338  1.1  christos 				      test -z $TSS_BUILD_OWN_TRUE || \
    339  1.1  christos 				      test -z $TSS_BUILD_SELFTEST_TRUE || \
    340  1.1  christos 				      test -z $TSS_BUILD_SIGN_TRUE || \
    341  1.1  christos 				      test -z $TSS_BUILD_KEY_TRUE || \
    342  1.1  christos 				      test -z $TSS_BUILD_DAA_TRUE)
    343  1.1  christos AM_CONDITIONAL(TSS_BUILD_SYM_CRYPTO, test -z $TSS_BUILD_AIK_TRUE || \
    344  1.1  christos 				     test -z $TSS_BUILD_TRANSPORT_TRUE)
    345  1.1  christos 
    346  1.1  christos #GETTEXT_PACKAGE=trousers
    347  1.1  christos #AC_SUBST(GETTEXT_PACKAGE)
    348  1.1  christos #AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
    349  1.1  christos 
    350  1.1  christos dnl Add the languages which your application supports here.
    351  1.1  christos #ALL_LINGUAS=""
    352  1.1  christos #AM_GLIB_GNU_GETTEXT
    353  1.1  christos 
    354  1.1  christos # end Glade section
    355  1.1  christos 
    356  1.1  christos AC_CHECK_HEADER(pthread.h, [AC_DEFINE(HAVE_PTHREAD_H, 1, [pthread header])])
    357  1.1  christos 
    358  1.1  christos AC_DISABLE_STATIC
    359  1.1  christos AC_PROG_CC
    360  1.1  christos AC_PROG_LIBTOOL
    361  1.1  christos 
    362  1.1  christos AC_C_BIGENDIAN([AC_DEFINE(_BIG_ENDIAN, 1, [big-endian host])])
    363  1.1  christos AC_CHECK_DECL(htole32, [AC_DEFINE(HTOLE_DEFINED, 1, [htole32 function is available])])
    364  1.1  christos AC_CHECK_HEADER(sys/byteorder.h, [AC_DEFINE(HAVE_BYTEORDER_H, 1, [sys/byteorder.h header])])
    365  1.1  christos AC_CHECK_FUNC(daemon, [ AC_DEFINE(HAVE_DAEMON, 1, [daemon function is available]) ])
    366  1.1  christos  
    367  1.1  christos if test "x${GCC}" = "xyes"; then
    368  1.1  christos 	CFLAGS="$CFLAGS -W -Wall -Wno-unused-parameter -Wsign-compare"
    369  1.1  christos fi
    370  1.1  christos 
    371  1.1  christos CFLAGS="$CFLAGS -I../include \
    372  1.1  christos 	-DTCSD_DEFAULT_PORT=${TCSD_DEFAULT_PORT} -DTSS_VER_MAJOR=${TSS_VER_MAJOR} \
    373  1.1  christos 	-DTSS_VER_MINOR=${TSS_VER_MINOR} -DTSS_SPEC_MAJOR=${TSS_SPEC_MAJOR} \
    374  1.1  christos 	-DTSS_SPEC_MINOR=${TSS_SPEC_MINOR}"
    375  1.1  christos #CFLAGS="$CFLAGS -I../include -std=c99 -pedantic -W -Wall"
    376  1.1  christos KERNEL_VERSION=`uname -r`
    377  1.1  christos AC_SUBST(CFLAGS)
    378  1.1  christos 
    379  1.1  christos # When we build the rpms, prefix will be /usr. This'll do some things that make sense,
    380  1.1  christos # like put our sbin stuff in /usr/sbin and our library in /usr/lib. It'll do some other
    381  1.1  christos # things that don't make sense like put our config file in /usr/etc. So, I'll just hack
    382  1.1  christos # it here. If the --prefix option isn't specified during configure, let it all go to
    383  1.1  christos # /usr/local, even /usr/local/etc. :-P
    384  1.1  christos if test x"${prefix}" = x"/usr"; then
    385  1.1  christos 	sysconfdir="/etc"
    386  1.1  christos 	localstatedir="/var"
    387  1.1  christos 	mandir="/usr/share/man"
    388  1.1  christos elif test x"${prefix}" = x"NONE"; then
    389  1.1  christos 	localstatedir="/usr/local/var"
    390  1.1  christos fi
    391  1.1  christos 
    392  1.1  christos AC_OUTPUT(dist/tcsd.conf \
    393  1.1  christos 	  dist/fedora/trousers.spec \
    394  1.1  christos 	  dist/trousers.spec \
    395  1.1  christos 	  Makefile \
    396  1.1  christos 	  src/Makefile \
    397  1.1  christos 	  src/include/Makefile \
    398  1.1  christos 	  src/tcs/Makefile \
    399  1.1  christos 	  src/tddl/Makefile \
    400  1.1  christos 	  src/tspi/Makefile \
    401  1.1  christos 	  src/trspi/Makefile \
    402  1.1  christos 	  src/tcsd/Makefile \
    403  1.1  christos 	  man/man8/tcsd.8 \
    404  1.1  christos 	  man/man5/tcsd.conf.5 \
    405  1.1  christos 	  dist/Makefile \
    406  1.1  christos 	  man/Makefile \
    407  1.1  christos 	  man/man3/Makefile \
    408  1.1  christos 	  man/man5/Makefile \
    409  1.1  christos 	  man/man8/Makefile)
    410  1.1  christos 
    411  1.1  christos echo "CFLAGS=$CFLAGS"
    412  1.1  christos 
    413