1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00
freebsd/crypto/openssh/freebsd-configure.sh
Dag-Erling Smørgrav 0085282b6a Unbreak the WITHOUT_KERBEROS build and try to reduce the odds of a
repeat performance by introducing a script that runs configure with and
without Kerberos, diffs the result and generates krb5_config.h, which
contains the preprocessor macros that need to be defined in the Kerberos
case and undefined otherwise.

Approved by:	re (marius)
2013-09-23 20:35:54 +00:00

31 lines
611 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
configure_args="
--prefix=/usr
--sysconfdir=/etc/ssh
--with-pam
--with-tcp-wrappers
--with-libedit
--with-ssl-engine
--without-xauth
"
set -e
# generate config.h with krb5 and stash it
sh configure $configure_args --with-kerberos5
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