File: configure

package info (click to toggle)
entropybroker 2.9-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,600 kB
  • sloc: cpp: 14,386; sh: 934; makefile: 188; java: 148; perl: 12
file content (144 lines) | stat: -rwxr-xr-x 3,329 bytes parent folder | download | duplicates (3)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#! /bin/sh

B2=''
FILE=/tmp/a.out_eb_$$
FILE2=/tmp/a.out_eb2_$$

echo \*\*\* Entropy Broker v`grep VERSION version | cut -d = -f 2` \(`echo $Revision$ | awk '{ print $2; }'`\) configure script \*\*\*
echo

echo -n \* checking for GCC \(G++\)...
g++ -O0 -o $FILE test_gcc.cpp 2> $FILE2
if [ $? -ne 0 ] ; then
	echo
	echo \! problem invoking GCC
	echo \! entropy_broker does not require GCC but this
	echo \! $0 script does
	echo
	echo \! errors reported:
	echo
	cat $FILE2
	echo
	exit 1
fi
echo \ OK

echo -n \* checking for CryptoPP...
g++ -O0 -o $FILE test_cryptopp.cpp 2> $FILE2
if [ $? -ne 0 ] ; then
	echo
	echo \! CryptoPP was NOT detected
	echo \! CryptoPP is required for entropy_broker
	echo
	echo \! errors reported:
	echo
	cat $FILE2
	echo
	exit 1
fi
echo \ OK

echo -n \* checking for zlib...
g++ -O0 -o $FILE test_zlib.cpp 2> $FILE2
if [ $? -ne 0 ] ; then
	echo
	echo \! zlib was NOT detected
	echo \! zlib is required for entropy_broker
	echo
	echo \! errors reported:
	echo
	cat $FILE2
	echo
	exit 1
fi
echo \ OK

echo -n \* checking for libpng12-dev...
g++ -O0 -o $FILE test_libpng.cpp 2> $FILE2
if [ $? -ne 0 ] ; then
	echo
	echo \! libpng12-dev was NOT detected
	echo \! libpng12-dev is required for entropy_broker
	echo
	echo \! errors reported:
	echo
	cat $FILE2
	echo
	exit 1
fi
echo \ OK

echo -n \* checking for libgd2-\(no\)xpm-dev...
g++ -O0 -o $FILE test_libgd2.cpp 2> $FILE2
if [ $? -ne 0 ] ; then
	echo
	echo \! libgd2-\(no\)xpm-dev was NOT detected
	echo \! libgd2-\(no\)xpm-dev is required for entropy_broker
	echo
	echo \! errors reported:
	echo
	cat $FILE2
	echo
	exit 1
fi
echo \ OK

g++ -O0 -o $FILE test_asound2.cpp 2> /dev/null
if [ $? -eq 0 ] ; then
	echo \+ libasound2 detected, enabling eb_server_audio
	B2="$B2 eb_server_audio"
else
	echo \- libasound2 NOT found, disabling eb_server_audio
fi

g++ -O0 -o $FILE test_TFO.cpp 2> $FILE2
if [ $? -eq 0 ] ; then
	echo \+ system supports TCP fast open
	TFO="TFO=yes"
else
	echo \- this system does NOT support TCP fast open
	TFO=""
fi

g++ -O0 -o $FILE test_libusb.cpp 2> /dev/null
if [ $? -eq 0 ] ; then
	echo \+ libusb-1.0-0 detected, enabling eb_server_usb and eb_server_Araneus_Alea
	B2="$B2 eb_server_usb eb_server_Araneus_Alea"
else
	echo \- libusb-1.0-0 NOT found, disabling eb_server_usb and eb_server_Araneus_Alea
fi

g++ -O0 -o $FILE `pkg-config --cflags libpcsclite` test_pcsclite.cpp 2> /dev/null
if [ $? -eq 0 ] ; then
	echo \+ libpcsclite-dev detected, enabling eb_server_smartcard
	B2="$B2 eb_server_smartcard"
	PCSC='PCSC_CFLAGS=`pkg-config --cflags libpcsclite`'
else
	echo \- libpcsclite-dev NOT found, disabling eb_server_smartcard
fi

g++ -O0 -o $FILE `pkg-config --cflags libqwqng` test_libqwqng.cpp 2> /dev/null
if [ $? -eq 0 ] ; then
	echo \+ libqwqng-dev detected, enabling eb_server_qwqng
	B2="$B2 eb_server_qwqng"
	QWQNG='PCSC_CFLAGS=`pkg-config --cflags libqwqng`'
else
	echo \- libqwqng-dev NOT found, disabling eb_server_qwqng
fi

g++ -O0 -o $FILE test_libftdi.cpp 2> /dev/null
if [ $? -eq 0 ] ; then
	echo \+ libftdi-dev detected, enabling eb_server_ComScire_R2000KU
	B2="$B2 eb_server_ComScire_R2000KU"
else
	echo \- libftdi-dev NOT found, disabling eb_server_ComScire_R2000KU
fi

echo B2=$B2 > makefile.inc
echo $PCSC >> makefile.inc
echo $QWQNG >> makefile.inc
echo $TFO >> makefile.inc

rm -f $FILE $FILE2

echo