xref: /freebsd/crypto/openssh/freebsd-configure.sh (revision 38f0b757fd84d17d0fc24739a7cda160c4516d81)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6configure_args="
7    --prefix=/usr
8    --sysconfdir=/etc/ssh
9    --with-pam
10    --with-tcp-wrappers
11    --with-libedit
12    --with-ssl-engine
13    --without-xauth
14"
15
16set -e
17
18# generate config.h with krb5 and stash it
19sh configure $configure_args --with-kerberos5
20mv config.log config.log.orig
21mv config.h config.h.orig
22
23# generate config.h without krb5
24sh configure $configure_args --without-kerberos5
25
26# extract the difference
27echo '/* $Free''BSD$ */' > krb5_config.h
28diff -u config.h.orig config.h |
29	sed -n '/^-#define/s/^-//p' |
30	grep -Ff /dev/stdin config.h.orig >> krb5_config.h
31