openssh: clarify krb5 use in freebsd-configure

freebsd-configure.sh runs configure twice, --with-kerberos5 and
--without-kerberos5, in order to build a config.h that defaults to
kerberos5 disabled, and a small config file that represents the
differences.

Rename config.h.orig to config.h.kerberos5 to clarify the intent of this
script.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2021-09-01 20:23:40 -04:00
parent 42c7760be3
commit 5e4dd21fd6

View file

@ -30,14 +30,14 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin
# Generate config.h with krb5 and stash it
sh configure $configure_args --with-kerberos5=/usr
mv config.log config.log.orig
mv config.h config.h.orig
mv config.log config.log.kerberos5
mv config.h config.h.kerberos5
# 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 |
diff -u config.h.kerberos5 config.h |
sed -n '/^-#define/s/^-//p' |
grep -Ff /dev/stdin config.h.orig >> krb5_config.h
grep -Ff /dev/stdin config.h.kerberos5 >> krb5_config.h