This repository was archived by the owner on Jul 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·60 lines (53 loc) · 1.28 KB
/
Copy pathconfigure
File metadata and controls
executable file
·60 lines (53 loc) · 1.28 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh -e
# hand-written configure script; autoconf is no fun
exec 3> config.h
exec 4> conf.mk
echo '#ifndef CONFIG_H' >&3
echo '#define CONFIG_H' >&3
CC=${CC-cc}
color=color.c
while [ -n "$1" ]; do
case "$1" in
--enable-tf-compat)
echo "compat mode: 24-bit colors disabled"
color=256color.c
;;
*)
echo "invalid option $1" >&2
exit 1
;;
esac
shift
done
echo "SRCS+= $color" >&4
printf "checking for asprintf: "
if ${CC} -o config/out config/asprintf_test.c 2>/dev/null; then
echo "yes"
else
echo "not found but required!"
exit 1
fi
printf "checking for getprogname: "
if ${CC} -o config/out config/getprogname_test.c 2>/dev/null; then
echo "yes"
else
echo '#define getprogname() ""' >&3
echo "no"
fi
printf "checking for strlcpy: "
if ${CC} -o config/out config/strlcpy_test.c 2>/dev/null; then
echo "yes"
else
echo "size_t strlcpy(char *, const char *, size_t);" >&3
echo "SRCS+= strlcpy.c" >&4
echo "no"
fi
printf "checking for libtls: "
if ${CC} -o config/out config/libtls_test.c -ltls 2>/dev/null; then
echo 'LDADD+= -ltls' >&4
echo 'HAVE_LIBTLS=1' >&4
echo "yes"
else
echo "no - building statically linked copy"
fi
echo '#endif' >&3