]> granicus.if.org Git - shadow/commitdiff
* configure.in: Add support for TCB in configure.in. Actual TCB
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 24 Jan 2010 16:53:15 +0000 (16:53 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 24 Jan 2010 16:53:15 +0000 (16:53 +0000)
support will follow.

ChangeLog
configure.in

index d26a6a98686fe96f9cb433cb7e49b527a942c6f1..8f1d309ef88b0898abe599d8bef5925a4fcce6fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-24  Paweł Hajdan, Jr.  <phajdan.jr@gentoo.org>
+
+       * configure.in: Add support for TCB in configure.in. Actual TCB
+       support will follow.
+
 2009-11-05  Nicolas François  <nicolas.francois@centraliens.net>
 
        * NEWS, src/groupmod.c: Fixed groupmod when configured with
index a0dc993d2d260edb508b445f566baf5911c821cc..4d634f19ad6f97457b3ea2f03828c3d94003ca07 100644 (file)
@@ -249,6 +249,9 @@ AC_ARG_WITH(selinux,
 AC_ARG_WITH(skey,
        [AC_HELP_STRING([--with-skey], [use S/Key support @<:@default=no@:>@])],
        [with_skey=$withval], [with_skey=no])
+AC_ARG_WITH(tcb,
+       [AC_HELP_STRING([--with-tcb], [use tcb support (incomplete) @<:@default=yes if found@:>@])],
+       [with_tcb=$withval], [with_tcb=maybe])
 AC_ARG_WITH(libcrack,
        [AC_HELP_STRING([--with-libcrack], [use libcrack @<:@default=yes if found and if PAM not enabled@:>@])],
        [with_libcrack=$withval], [with_libcrack=no])
@@ -382,6 +385,27 @@ if test "$with_selinux" != "no"; then
        fi
 fi
 
+AC_SUBST(LIBTCB)
+if test "$with_tcb" != "no"; then
+       AC_CHECK_HEADERS(tcb.h, [tcb_header="yes"], [tcb_header="no"])
+       if test "$tcb_header$with_tcb" = "noyes" ; then
+               AC_MSG_ERROR([tcb.h is missing])
+       elif test "$tcb_header" = "yes" ; then
+               AC_CHECK_LIB(tcb, tcb_is_suspect, [tcb_lib="yes"], [tcb_lib="no"])
+               if test "$tcb_lib$with_tcb" = "noyes" ; then
+                       AC_MSG_ERROR([libtcb not found])
+               elif test "$tcb_lib" = "no" ; then
+                       with_tcb="no"
+               else
+                       AC_DEFINE(WITH_TCB, 1, [Build shadow with tcb support (incomplete)])
+                       LIBTCB="-ltcb"
+                       with_tcb="yes"
+               fi
+       else
+               with_tcb="no"
+       fi
+fi
+
 AC_SUBST(LIBPAM)
 if test "$with_libpam" != "no"; then
        AC_CHECK_LIB(pam, pam_start,
@@ -540,6 +564,7 @@ if test "$with_libpam" = "yes"; then
 echo " suid account management tools:  $enable_acct_tools_setuid"
 fi
 echo " SELinux support:                $with_selinux"
+echo " tcb support (incomplete):       $with_tcb"
 echo " shadow group support:           $enable_shadowgrp"
 echo " S/Key support:                  $with_skey"
 echo " SHA passwords encryption:       $with_sha_crypt"