]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - crypto/openssh/freebsd-configure.sh
Upgrade OpenSSH to 7.3p1.
[FreeBSD/stable/10.git] / crypto / openssh / freebsd-configure.sh
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 configure_args="
7     --prefix=/usr
8     --sysconfdir=/etc/ssh
9     --with-pam
10     --with-ssl-dir=/usr
11     --with-tcp-wrappers
12     --with-libedit
13     --with-ssl-engine
14     --without-xauth
15
16
17 set -e
18
19 # make sure configure uses the correct compiler
20 export CC=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCC)
21 export CPP=$(echo ".include <bsd.lib.mk>" | make -f /dev/stdin -VCPP)
22 unset CFLAGS CPPFLAGS LDFLAGS LIBS
23
24 # regenerate configure and config.h.in
25 autoheader
26 autoconf
27
28 # reset PATH to avoid picking up the wrong libraries
29 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
30 unset LD_LIBRARY_PATH
31
32 # generate config.h with krb5 and stash it
33 sh configure $configure_args --with-kerberos5=/usr
34 mv config.log config.log.orig
35 mv config.h config.h.orig
36
37 # generate config.h without krb5
38 sh configure $configure_args --without-kerberos5
39
40 # extract the difference
41 echo '/* $Free''BSD$ */' > krb5_config.h
42 diff -u config.h.orig config.h |
43         sed -n '/^-#define/s/^-//p' |
44         grep -Ff /dev/stdin config.h.orig >> krb5_config.h