summary refs log tree commit diff
path: root/configure
blob: b0f818f227d75efc711c557e46bede7e9b82b77c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -eu

case "$(uname)" in
	(FreeBSD)
		if ! pkg info -e libressl; then
			echo 'LibreSSL required'
			exit 1
		fi
		prefix=$(pkg query '%p' libressl)
		cat >config.mk <<-EOF
		CFLAGS += -I${prefix}/include
		CFLAGS += -D'OPENSSL_BIN="${prefix}/bin/openssl"'
		LDFLAGS += -L${prefix}/lib
		EOF
		exit
		;;
esac

libs='libcrypto libtls ncursesw'
pkg-config --print-errors $libs

cat >config.mk <<EOF
CFLAGS += $(pkg-config --cflags $libs)
CFLAGS += -D'OPENSSL_BIN="$(pkg-config --variable=prefix openssl)/bin/openssl"'
LDFLAGS += $(pkg-config --libs-only-L $libs)
LDLIBS = $(pkg-config --libs-only-l $libs)
EOF

case "$(uname)" in
	(Linux)
		if ! grep -q -e '-D_GNU_SOURCE' config.mk; then
			echo 'CFLAGS += -D_GNU_SOURCE' >> config.mk
		fi
		;;
esac
ic multiplexing in ingestJune McEnroe 2019-07-28Add empty commandsJune McEnroe 2019-07-28Rename ptee streamJune McEnroe 2019-07-28Remove ptee keybindsJune McEnroe 2019-07-28Import ptee from srcJune McEnroe 2019-07-28Remove old commandsJune McEnroe 2018-04-20Clean up pteeJune McEnroe 2018-04-20Uncommitted changes from months ago :(June McEnroe 2018-02-25Remove winchJune McEnroe 2018-02-25Echo at end of outputJune McEnroe 2018-02-25Add stopJune McEnroe 2018-02-25Switch back to static window sizingJune McEnroe 2018-02-25Add missing includeJune McEnroe 2018-02-25Define rules for multi-object binariesJune McEnroe 2018-02-25Rewrite everythingJune McEnroe 2018-02-22Hardcode path lengths in setupJune McEnroe 2018-02-22Add setup, start commandJune McEnroe 2018-02-22Indent list of streamsJune McEnroe 2018-02-22Add welcome message to ssh-commandJune McEnroe 2018-02-22Sleep before truncationJune McEnroe 2018-02-22List streams if none givenJune McEnroe 2018-02-22Set ForceCommand ssh-commandJune McEnroe 2018-02-22Rename command to ssh-commandJune McEnroe 2018-02-22Add command.shJune McEnroe 2018-02-22Factor out STREAM_SIZE for ingest and broadcastJune McEnroe 2018-02-22Handle EINTR from keventJune McEnroe 2018-02-22Include libutil in chroot.tarJune McEnroe