freebsd-configure.sh revision 294328
1#!/bin/sh 2# 3# $FreeBSD: head/crypto/openssh/freebsd-configure.sh 294328 2016-01-19 16:18:26Z des $ 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# make sure configure uses the correct compiler 19export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC) 20export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP) 21 22# generate config.h with krb5 and stash it 23sh configure $configure_args --with-kerberos5 24mv config.log config.log.orig 25mv config.h config.h.orig 26 27# generate config.h without krb5 28sh configure $configure_args --without-kerberos5 29 30# extract the difference 31echo '/* $Free''BSD$ */' > krb5_config.h 32diff -u config.h.orig config.h | 33 sed -n '/^-#define/s/^-//p' | 34 grep -Ff /dev/stdin config.h.orig >> krb5_config.h 35