freebsd-configure.sh revision 294330
1255829Sdes#!/bin/sh 2255829Sdes# 3255829Sdes# $FreeBSD: head/crypto/openssh/freebsd-configure.sh 294330 2016-01-19 17:20:07Z 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 22294330Sdes# regenerate configure and config.h.in 23294330Sdesautoheader 24294330Sdesautoconf 25294330Sdes 26255829Sdes# generate config.h with krb5 and stash it 27255829Sdessh configure $configure_args --with-kerberos5 28255829Sdesmv config.log config.log.orig 29255829Sdesmv config.h config.h.orig 30255829Sdes 31255829Sdes# generate config.h without krb5 32255829Sdessh configure $configure_args --without-kerberos5 33255829Sdes 34255829Sdes# extract the difference 35255829Sdesecho '/* $Free''BSD$ */' > krb5_config.h 36255829Sdesdiff -u config.h.orig config.h | 37255829Sdes sed -n '/^-#define/s/^-//p' | 38255829Sdes grep -Ff /dev/stdin config.h.orig >> krb5_config.h 39