freebsd-configure.sh revision 294328
1255829Sdes#!/bin/sh 2255829Sdes# 3255829Sdes# $FreeBSD: head/crypto/openssh/freebsd-configure.sh 294328 2016-01-19 16:18:26Z des $ 4255829Sdes# 5255829Sdes 6255829Sdesconfigure_args=" 7255829Sdes --prefix=/usr 8255829Sdes --sysconfdir=/etc/ssh 9255829Sdes --with-pam 10255829Sdes --with-tcp-wrappers 11255829Sdes --with-libedit 12255829Sdes --with-ssl-engine 13255829Sdes --without-xauth 14255829Sdes" 15255829Sdes 16255829Sdesset -e 17255829Sdes 18294328Sdes# make sure configure uses the correct compiler 19294328Sdesexport CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC) 20294328Sdesexport CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP) 21294328Sdes 22255829Sdes# generate config.h with krb5 and stash it 23255829Sdessh configure $configure_args --with-kerberos5 24255829Sdesmv config.log config.log.orig 25255829Sdesmv config.h config.h.orig 26255829Sdes 27255829Sdes# generate config.h without krb5 28255829Sdessh configure $configure_args --without-kerberos5 29255829Sdes 30255829Sdes# extract the difference 31255829Sdesecho '/* $Free''BSD$ */' > krb5_config.h 32255829Sdesdiff -u config.h.orig config.h | 33255829Sdes sed -n '/^-#define/s/^-//p' | 34255829Sdes grep -Ff /dev/stdin config.h.orig >> krb5_config.h 35