-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·62 lines (54 loc) · 1.14 KB
/
Copy pathconfigure
File metadata and controls
executable file
·62 lines (54 loc) · 1.14 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
61
62
#!/bin/sh
CHECK=check
while [ -n "$1" ]; do
case $1 in
--prefix)
PREFIX=$2
shift
;;
--no-docker)
DOCKER=no
;;
--no-check)
CHECK=no
;;
esac
shift
done
PREFIX=${PREFIX:-~}
echo $PREFIX
echo setting prefix to "$PREFIX"
if [ -z "$DOCKER" ]; then
printf "checking for docker... "
if command -v docker 2>&1 >/dev/null; then
DOCKER=docker
elif command -v podman 2>&1 >/dev/null; then
DOCKER=podman
else
DOCKER=no
fi
echo $DOCKER
else
echo "using containers... $DOCKER"
fi
if [ "$DOCKER" = no ]; then
echo "no containers: tests disabled"
DOCKER=":"
fi
if ! [ "$CHECK" = no ]; then
if pkg-config --exists check; then
CHECK=check
__CFLAGS="${__CFLAGS} -lcheck"
else
CHECK=no
fi
echo "checking for libcheck... $CHECK"
else
echo "no check: tests disabled"
fi
echo creating Makefile.in
echo "DOCKER = $DOCKER" > Makefile.in
echo "PREFIX = $PREFIX" >> Makefile.in
if [ -n "$__CFLAGS" ]; then
echo "CFLAGS += \"$__CFLAGS\"" >> Makefile.in
fi