summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/freebsd-configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/freebsd-configure.sh')
-rwxr-xr-xcrypto/openssh/freebsd-configure.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/crypto/openssh/freebsd-configure.sh b/crypto/openssh/freebsd-configure.sh
new file mode 100755
index 0000000..8004880
--- /dev/null
+++ b/crypto/openssh/freebsd-configure.sh
@@ -0,0 +1,30 @@
+#!/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
OpenPOWER on IntegriCloud