tce-load -i compiletc acl-dev linux-pam-dev

sudo mkdir /usr/local/include/security
sudo ln -s /tmp/tcloop/linux-pam-dev/usr/local/include/* /usr/local/include/security

cd shadow-4.5

sed -i 's/groups$(EXEEXT) //' src/Makefile.in
find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \;
find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;

sed -i 's/1000/999/' etc/useradd

./etc/pam.d/Makefile.in
@USE_PAM_TRUE@pamddir = /usr/local/etc/pam.d

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var [--sysconfdir=/etc] --with-group-name-max-length=32

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;

make
sudo make install

shadow will be compiled with the following features:

	auditing support:		no
	CrackLib support:		no
	PAM support:			yes
	suid account management tools:	yes
	SELinux support:		no
	ACL support:			yes
	Extended Attributes support:	yes
	tcb support (incomplete):	no
	shadow group support:		yes
	S/Key support:			no
	SHA passwords encryption:	yes
	nscd support:			yes
	subordinate IDs support:	yes