2013-09-23 20:35:54 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
configure_args="
|
|
|
|
--prefix=/usr
|
|
|
|
--sysconfdir=/etc/ssh
|
|
|
|
--with-pam
|
2016-01-21 10:57:45 +00:00
|
|
|
--with-ssl-dir=/usr
|
2013-09-23 20:35:54 +00:00
|
|
|
--with-tcp-wrappers
|
|
|
|
--with-libedit
|
|
|
|
--with-ssl-engine
|
|
|
|
--without-xauth
|
|
|
|
"
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-01-19 16:18:26 +00:00
|
|
|
# make sure configure uses the correct compiler
|
|
|
|
export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
|
|
|
|
export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
|
2016-01-21 10:57:45 +00:00
|
|
|
unset CFLAGS CPPFLAGS LDFLAGS LIBS
|
2016-01-19 16:18:26 +00:00
|
|
|
|
2016-01-19 17:20:07 +00:00
|
|
|
# regenerate configure and config.h.in
|
|
|
|
autoheader
|
|
|
|
autoconf
|
|
|
|
|
2016-01-21 10:57:45 +00:00
|
|
|
# reset PATH to avoid picking up the wrong libraries
|
|
|
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
|
|
|
unset LD_LIBRARY_PATH
|
|
|
|
|
2013-09-23 20:35:54 +00:00
|
|
|
# generate config.h with krb5 and stash it
|
2017-02-26 19:00:55 +00:00
|
|
|
sh configure $configure_args --with-kerberos5=/usr
|
2013-09-23 20:35:54 +00:00
|
|
|
mv config.log config.log.orig
|
|
|
|
mv config.h config.h.orig
|
|
|
|
|
|
|
|
# generate config.h without krb5
|
|
|
|
sh configure $configure_args --without-kerberos5
|
|
|
|
|
|
|
|
# extract the difference
|
|
|
|
echo '/* $Free''BSD$ */' > krb5_config.h
|
|
|
|
diff -u config.h.orig config.h |
|
|
|
|
sed -n '/^-#define/s/^-//p' |
|
|
|
|
grep -Ff /dev/stdin config.h.orig >> krb5_config.h
|