1 | #!/bin/sh |
---|
2 | |
---|
3 | ############################## |
---|
4 | ## Configurer for BitlBee ## |
---|
5 | ## ## |
---|
6 | ## Copyright 2004 Lintux ## |
---|
7 | ## Copyright 2002 Lucumo ## |
---|
8 | ############################## |
---|
9 | |
---|
10 | prefix='/usr/local/' |
---|
11 | bindir='$prefix/bin/' |
---|
12 | sbindir='$prefix/sbin/' |
---|
13 | etcdir='$prefix/etc/bitlbee/' |
---|
14 | mandir='$prefix/share/man/' |
---|
15 | datadir='$prefix/share/bitlbee/' |
---|
16 | config='/var/lib/bitlbee/' |
---|
17 | libdir='$prefix/lib/' |
---|
18 | plugindir='$prefix/lib/bitlbee/' |
---|
19 | includedir='$prefix/include/bitlbee/' |
---|
20 | systemdsystemunitdir='' |
---|
21 | sysusersdir='' |
---|
22 | libevent='/usr/' |
---|
23 | pidfile='/var/run/bitlbee.pid' |
---|
24 | ipcsocket='' |
---|
25 | pcdir='$prefix/lib/pkgconfig' |
---|
26 | systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib" |
---|
27 | sysroot='' |
---|
28 | |
---|
29 | configure_args="$@" |
---|
30 | |
---|
31 | # Set these to default-on to let it be overriden by either the user or purple |
---|
32 | # |
---|
33 | # If the user sets one of these to 1, purple won't disable them. |
---|
34 | # Otherwise, if it's still default-on, it gets included in normal builds, |
---|
35 | # but not purple ones. |
---|
36 | jabber="default-on" |
---|
37 | |
---|
38 | twitter=1 |
---|
39 | purple=0 |
---|
40 | |
---|
41 | verbose=0 |
---|
42 | doc=1 |
---|
43 | debug=0 |
---|
44 | strip=0 |
---|
45 | gcov=0 |
---|
46 | asan=0 |
---|
47 | plugins=1 |
---|
48 | otr=0 |
---|
49 | |
---|
50 | events=glib |
---|
51 | external_json_parser=auto |
---|
52 | ssl=auto |
---|
53 | |
---|
54 | pam=0 |
---|
55 | ldap=0 |
---|
56 | |
---|
57 | pie=1 |
---|
58 | |
---|
59 | systemd=auto |
---|
60 | |
---|
61 | arch=$(uname -s) |
---|
62 | arch_rel=$(uname -r) |
---|
63 | |
---|
64 | GLIB_MIN_VERSION=2.32 |
---|
65 | |
---|
66 | # Cygwin, Darwin and SunOS < 5.11 do not support PIC/PIE |
---|
67 | case "$arch" in |
---|
68 | CYGWIN* ) |
---|
69 | pie=0;; |
---|
70 | Darwin ) |
---|
71 | pie=0;; |
---|
72 | SunOS ) |
---|
73 | if [ "$arch_rel" = "5.10" ]; then |
---|
74 | pie=0 |
---|
75 | fi |
---|
76 | ;; |
---|
77 | esac |
---|
78 | |
---|
79 | get_version() { |
---|
80 | REAL_BITLBEE_VERSION=$(grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/') |
---|
81 | |
---|
82 | if [ -n "$BITLBEE_VERSION" ]; then |
---|
83 | # environment variable already set to something to spoof it |
---|
84 | # don't replace it with the git stuff |
---|
85 | return |
---|
86 | fi |
---|
87 | |
---|
88 | BITLBEE_VERSION=$REAL_BITLBEE_VERSION |
---|
89 | |
---|
90 | if [ -d $srcdir/.git ] && type git > /dev/null 2> /dev/null; then |
---|
91 | timestamp=$(cd $srcdir; git show -s --format=%ci HEAD | sed 's/ .*$//; s/-//g') |
---|
92 | branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD) |
---|
93 | |
---|
94 | search='\(.*\)-\([0-9]*\)-\(g[0-9a-f]*\)' |
---|
95 | replace="\1+$timestamp+$branch+\2-\3-git" |
---|
96 | |
---|
97 | describe=$(cd $srcdir; git describe --long --tags 2>/dev/null) |
---|
98 | if [ $? -ne 0 ]; then |
---|
99 | describe=${REAL_BITLBEE_VERSION}-0-g$(cd $srcdir; git rev-parse --short HEAD) |
---|
100 | fi |
---|
101 | |
---|
102 | BITLBEE_VERSION=$(echo $describe | sed "s#$search#$replace#") |
---|
103 | |
---|
104 | unset timestamp branch search replace describe |
---|
105 | fi |
---|
106 | } |
---|
107 | |
---|
108 | if [ "$1" = "--dump-version" ]; then |
---|
109 | srcdir=$(cd $(dirname $0);pwd) |
---|
110 | get_version |
---|
111 | echo $BITLBEE_VERSION |
---|
112 | exit |
---|
113 | fi |
---|
114 | |
---|
115 | echo BitlBee configure |
---|
116 | |
---|
117 | while [ -n "$1" ]; do |
---|
118 | e="$(expr "X$1" : 'X--\(.*=.*\)')" |
---|
119 | if [ -z "$e" ]; then |
---|
120 | cat<<EOF |
---|
121 | |
---|
122 | Usage: $0 [OPTIONS] |
---|
123 | |
---|
124 | Option Description Default |
---|
125 | |
---|
126 | --prefix=... Directories to put files in $prefix |
---|
127 | --bindir=... $bindir |
---|
128 | --sbindir=... $sbindir |
---|
129 | --etcdir=... $etcdir |
---|
130 | --mandir=... $mandir |
---|
131 | --datadir=... $datadir |
---|
132 | --plugindir=... $plugindir |
---|
133 | --systemdsystemunitdir=... $systemdsystemunitdir |
---|
134 | --sysusersdir=... $sysusersdir |
---|
135 | --pidfile=... $pidfile |
---|
136 | --config=... $config |
---|
137 | |
---|
138 | --verbose=0/1 Disable/enable verbose build $verbose |
---|
139 | |
---|
140 | --jabber=0/1 Disable/enable Jabber part $jabber |
---|
141 | --twitter=0/1 Disable/enable Twitter part $twitter |
---|
142 | |
---|
143 | --purple=0/1 Disable/enable libpurple support $purple |
---|
144 | (automatically disables other protocol modules) |
---|
145 | |
---|
146 | --pam=0/1 Disable/enable PAM authentication $pam |
---|
147 | --ldap=0/1 Disable/enable LDAP authentication $ldap |
---|
148 | |
---|
149 | --doc=0/1 Disable/enable help.txt generation $doc |
---|
150 | --debug=0/1 Disable/enable debugging $debug |
---|
151 | --strip=0/1 Disable/enable binary stripping $strip |
---|
152 | --pie=0/1 Build position independent executable $pie |
---|
153 | --gcov=0/1 Disable/enable test coverage reporting $gcov |
---|
154 | --asan=0/1 Disable/enable AddressSanitizer $asan |
---|
155 | --plugins=0/1 Disable/enable plugins support $plugins |
---|
156 | --otr=0/1/auto/plugin |
---|
157 | Disable/enable OTR encryption support $otr |
---|
158 | |
---|
159 | --events=... Event handler (glib, libevent) $events |
---|
160 | --ssl=... SSL library to use (gnutls, nss, openssl, auto) |
---|
161 | $ssl |
---|
162 | --external_json_parser=0/1/auto Use External JSON parser $external_json_parser |
---|
163 | --systemd=0/1 Enable/disable systemd $systemd |
---|
164 | |
---|
165 | |
---|
166 | --target=... Cross compilation target same as host |
---|
167 | --sysroot=... Cross compilation sysroot $sysroot |
---|
168 | EOF |
---|
169 | exit; |
---|
170 | fi |
---|
171 | eval "$e" |
---|
172 | shift; |
---|
173 | done |
---|
174 | |
---|
175 | # Expand $prefix and get rid of double slashes |
---|
176 | bindir=$(eval echo "$bindir/" | sed 's/\/\{1,\}/\//g') |
---|
177 | sbindir=$(eval echo "$sbindir/" | sed 's/\/\{1,\}/\//g') |
---|
178 | etcdir=$(eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g') |
---|
179 | mandir=$(eval echo "$mandir/" | sed 's/\/\{1,\}/\//g') |
---|
180 | datadir=$(eval echo "$datadir/" | sed 's/\/\{1,\}/\//g') |
---|
181 | config=$(eval echo "$config/" | sed 's/\/\{1,\}/\//g') |
---|
182 | libdir=$(eval echo "$libdir/" | sed 's/\/\{1,\}/\//g') |
---|
183 | plugindir=$(eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g') |
---|
184 | includedir=$(eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g') |
---|
185 | libevent=$(eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g') |
---|
186 | |
---|
187 | pidfile=$(eval echo "$pidfile" | sed 's/\/\{1,\}/\//g') |
---|
188 | ipcsocket=$(eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g') |
---|
189 | pcdir=$(eval echo "$pcdir" | sed 's/\/\{1,\}/\//g') |
---|
190 | |
---|
191 | protocols_mods="" |
---|
192 | |
---|
193 | cat <<EOF >Makefile.settings |
---|
194 | ## BitlBee settings, generated by configure |
---|
195 | |
---|
196 | # ./configure $configure_args |
---|
197 | |
---|
198 | PREFIX=$prefix |
---|
199 | BINDIR=$bindir |
---|
200 | SBINDIR=$sbindir |
---|
201 | ETCDIR=$etcdir |
---|
202 | MANDIR=$mandir |
---|
203 | DATADIR=$datadir |
---|
204 | PLUGINDIR=$plugindir |
---|
205 | CONFIG=$config |
---|
206 | LIBDIR=$libdir |
---|
207 | INCLUDEDIR=$includedir |
---|
208 | PCDIR=$pcdir |
---|
209 | |
---|
210 | TARGET=$target |
---|
211 | |
---|
212 | INSTALL=install -p |
---|
213 | |
---|
214 | DESTDIR= |
---|
215 | LFLAGS= |
---|
216 | EFLAGS=-lm |
---|
217 | EOF |
---|
218 | |
---|
219 | srcdir=$(cd $(dirname $0);pwd) |
---|
220 | currdir=$(pwd) |
---|
221 | if [ "$srcdir" != "$currdir" ]; then |
---|
222 | echo |
---|
223 | echo "configure script run from a different directory. Will create some symlinks..." |
---|
224 | if [ ! -e Makefile -o -L Makefile ]; then |
---|
225 | COPYDIRS="doc lib protocols tests utils" |
---|
226 | mkdir -p $(cd "$srcdir"; find $COPYDIRS -type d) |
---|
227 | find . -name Makefile -type l -print0 | xargs -0 rm 2> /dev/null |
---|
228 | dst="$PWD" |
---|
229 | cd "$srcdir" |
---|
230 | for i in $(find . -name Makefile -type f); do |
---|
231 | ln -s "$PWD${i#.}" "$dst/$i"; |
---|
232 | done |
---|
233 | cd "$dst" |
---|
234 | rm -rf .bzr |
---|
235 | fi |
---|
236 | |
---|
237 | echo "_SRCDIR_=$srcdir/" >> Makefile.settings |
---|
238 | CFLAGS="$CFLAGS -I${dst}" |
---|
239 | else |
---|
240 | srcdir=$PWD |
---|
241 | fi |
---|
242 | |
---|
243 | cat<<EOF >config.h |
---|
244 | /* BitlBee settings, generated by configure |
---|
245 | |
---|
246 | Do *NOT* use any of these defines in your code without thinking twice, most |
---|
247 | of them can/will be overridden at run-time */ |
---|
248 | |
---|
249 | #define BITLBEE_CONFIGURE_ARGS "$configure_args" |
---|
250 | |
---|
251 | #define CONFIG "$config" |
---|
252 | #define ETCDIR "$etcdir" |
---|
253 | #define VARDIR "$datadir" |
---|
254 | #define PLUGINDIR "$plugindir" |
---|
255 | #define DATADIR "$datadir" |
---|
256 | #define PIDFILE "$pidfile" |
---|
257 | #define IPCSOCKET "$ipcsocket" |
---|
258 | EOF |
---|
259 | |
---|
260 | |
---|
261 | |
---|
262 | if [ -n "$target" ]; then |
---|
263 | # prepend sysroot to system lib dirs |
---|
264 | |
---|
265 | systemlibdirs_cross='' |
---|
266 | for i in $systemlibdirs; do |
---|
267 | systemlibdirs_cross="$systemlibdirs_cross $sysroot$i" |
---|
268 | done |
---|
269 | systemlibdirs=$systemlibdirs_cross |
---|
270 | unset systemlibdirs_cross |
---|
271 | |
---|
272 | # backward compatibility |
---|
273 | |
---|
274 | if [ -z "$PKG_CONFIG_LIBDIR" ]; then |
---|
275 | PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig |
---|
276 | export PKG_CONFIG_LIBDIR |
---|
277 | fi |
---|
278 | |
---|
279 | if [ -d /usr/$target/bin ]; then |
---|
280 | PATH=/usr/$target/bin:$PATH |
---|
281 | fi |
---|
282 | |
---|
283 | if [ -d /usr/$target/lib ]; then |
---|
284 | systemlibdirs="$systemlibdirs /usr/$target/lib" |
---|
285 | fi |
---|
286 | |
---|
287 | CC=$target-cc |
---|
288 | LD=$target-ld |
---|
289 | STRIP=$target-strip |
---|
290 | fi |
---|
291 | |
---|
292 | if [ "$asan" = "1" ]; then |
---|
293 | CFLAGS="$CFLAGS -fsanitize=address" |
---|
294 | LDFLAGS="$LDFLAGS -fsanitize=address" |
---|
295 | debug=1 |
---|
296 | fi |
---|
297 | |
---|
298 | if [ "$verbose" = "0" ]; then |
---|
299 | echo 'VERBOSE=@' >> Makefile.settings |
---|
300 | else |
---|
301 | echo 'VERBOSE=' >> Makefile.settings |
---|
302 | fi |
---|
303 | |
---|
304 | cat <<EOF >>Makefile.settings |
---|
305 | |
---|
306 | # Enable/disable output verbosity |
---|
307 | ifdef V |
---|
308 | ifeq (\$(V),1) |
---|
309 | VERBOSE= |
---|
310 | else |
---|
311 | VERBOSE=@ |
---|
312 | endif |
---|
313 | endif |
---|
314 | |
---|
315 | EOF |
---|
316 | |
---|
317 | if [ "$debug" = "1" ]; then |
---|
318 | echo 'DEBUG=1' >> Makefile.settings |
---|
319 | CFLAGS="$CFLAGS -g3 -DDEBUG -O0" |
---|
320 | else |
---|
321 | [ -z "$CFLAGS" ] && CFLAGS="-g -O2" |
---|
322 | fi |
---|
323 | |
---|
324 | if [ "$pie" = "1" ]; then |
---|
325 | echo 'CFLAGS_BITLBEE=-fPIE' >> Makefile.settings |
---|
326 | echo 'LDFLAGS_BITLBEE=-pie' >> Makefile.settings |
---|
327 | fi |
---|
328 | |
---|
329 | echo LDFLAGS=$LDFLAGS >> Makefile.settings |
---|
330 | |
---|
331 | echo CFLAGS=$CFLAGS $CPPFLAGS >> Makefile.settings |
---|
332 | |
---|
333 | echo CFLAGS+=-DHAVE_CONFIG_H -D_GNU_SOURCE >> Makefile.settings |
---|
334 | |
---|
335 | if [ -n "$CC" ]; then |
---|
336 | CC=$CC |
---|
337 | elif type gcc > /dev/null 2> /dev/null; then |
---|
338 | CC=gcc |
---|
339 | elif type cc > /dev/null 2> /dev/null; then |
---|
340 | CC=cc |
---|
341 | else |
---|
342 | echo 'Cannot find a C compiler, aborting.' |
---|
343 | exit 1; |
---|
344 | fi |
---|
345 | |
---|
346 | echo "CC=$CC" >> Makefile.settings; |
---|
347 | if echo $CC | grep -qw 'gcc\|clang'; then |
---|
348 | # Apparently -Wall is gcc-specific? |
---|
349 | echo CFLAGS+=-Wall -Wformat -Werror=format-security >> Makefile.settings |
---|
350 | fi |
---|
351 | |
---|
352 | if [ -z "$LD" ]; then |
---|
353 | if type ld > /dev/null 2> /dev/null; then |
---|
354 | LD=ld |
---|
355 | else |
---|
356 | echo 'Cannot find ld, aborting.' |
---|
357 | exit 1; |
---|
358 | fi |
---|
359 | fi |
---|
360 | |
---|
361 | echo "LD=$LD" >> Makefile.settings |
---|
362 | |
---|
363 | if [ -z "$PKG_CONFIG" ]; then |
---|
364 | PKG_CONFIG=pkg-config |
---|
365 | fi |
---|
366 | |
---|
367 | if ! $PKG_CONFIG --version > /dev/null 2>/dev/null; then |
---|
368 | echo |
---|
369 | echo 'Cannot find pkg-config, aborting.' |
---|
370 | exit 1 |
---|
371 | fi |
---|
372 | |
---|
373 | if $PKG_CONFIG glib-2.0; then |
---|
374 | if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then |
---|
375 | cat<<EOF >>Makefile.settings |
---|
376 | EFLAGS+=$($PKG_CONFIG --libs glib-2.0 gmodule-2.0) |
---|
377 | CFLAGS+=$($PKG_CONFIG --cflags glib-2.0 gmodule-2.0) |
---|
378 | EOF |
---|
379 | else |
---|
380 | echo |
---|
381 | echo 'Found glib2 '$($PKG_CONFIG glib-2.0 --modversion)', but version '$GLIB_MIN_VERSION' or newer is required.' |
---|
382 | exit 1 |
---|
383 | fi |
---|
384 | else |
---|
385 | echo |
---|
386 | echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)' |
---|
387 | exit 1 |
---|
388 | fi |
---|
389 | |
---|
390 | if [ "$events" = "libevent" ]; then |
---|
391 | if ! [ -f "${libevent}include/event.h" ]; then |
---|
392 | echo |
---|
393 | echo 'Warning: Could not find event.h, you might have to install it and/or specify' |
---|
394 | echo 'its location using the --libevent= argument. (Example: If event.h is in' |
---|
395 | echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)' |
---|
396 | fi |
---|
397 | |
---|
398 | echo '#define EVENTS_LIBEVENT' >> config.h |
---|
399 | cat <<EOF >>Makefile.settings |
---|
400 | EFLAGS+=-levent -L${libevent}lib |
---|
401 | CFLAGS+=-I${libevent}include |
---|
402 | EOF |
---|
403 | elif [ "$events" = "glib" ]; then |
---|
404 | ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...): |
---|
405 | echo '#define EVENTS_GLIB' >> config.h |
---|
406 | else |
---|
407 | echo |
---|
408 | echo 'ERROR: Unknown event handler specified.' |
---|
409 | exit 1 |
---|
410 | fi |
---|
411 | echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings |
---|
412 | |
---|
413 | if [ "$external_json_parser" = "auto" ]; then |
---|
414 | if pkg-config --exists json-parser; then |
---|
415 | external_json_parser=1 |
---|
416 | else |
---|
417 | external_json_parser=0 |
---|
418 | fi |
---|
419 | fi |
---|
420 | echo "EXTERNAL_JSON_PARSER=$external_json_parser" >> Makefile.settings |
---|
421 | if [ "$external_json_parser" = "1" ]; then |
---|
422 | echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings |
---|
423 | echo "CFLAGS+=-DUSE_EXTERNAL_JSON_PARSER" >> Makefile.settings |
---|
424 | echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings |
---|
425 | echo "LDFLAGS_TESTS+=$(pkg-config --libs json-parser)" >> Makefile.settings |
---|
426 | fi |
---|
427 | |
---|
428 | echo CFLAGS+=-I"${srcdir}" -I"${srcdir}"/lib -I"${srcdir}"/protocols -I. >> Makefile.settings |
---|
429 | |
---|
430 | detect_gnutls() |
---|
431 | { |
---|
432 | if $PKG_CONFIG --exists gnutls; then |
---|
433 | cat <<EOF >>Makefile.settings |
---|
434 | EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs) |
---|
435 | CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags) |
---|
436 | EOF |
---|
437 | ssl=gnutls |
---|
438 | if ! $PKG_CONFIG gnutls --atleast-version=2.8; then |
---|
439 | echo |
---|
440 | echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.' |
---|
441 | fi |
---|
442 | ret=1 |
---|
443 | elif libgnutls-config --version > /dev/null 2> /dev/null; then |
---|
444 | cat <<EOF >>Makefile.settings |
---|
445 | EFLAGS+=$(libgnutls-config --libs) $(libgcrypt-config --libs) |
---|
446 | CFLAGS+=$(libgnutls-config --cflags) $(libgcrypt-config --cflags) |
---|
447 | EOF |
---|
448 | |
---|
449 | ssl=gnutls |
---|
450 | ret=1; |
---|
451 | else |
---|
452 | ret=0; |
---|
453 | fi; |
---|
454 | } |
---|
455 | |
---|
456 | detect_nss() |
---|
457 | { |
---|
458 | if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then |
---|
459 | cat<<EOF >>Makefile.settings |
---|
460 | EFLAGS+=$($PKG_CONFIG --libs nss) |
---|
461 | CFLAGS+=$($PKG_CONFIG --cflags nss) |
---|
462 | EOF |
---|
463 | |
---|
464 | ssl=nss |
---|
465 | ret=1; |
---|
466 | else |
---|
467 | ret=0; |
---|
468 | fi; |
---|
469 | } |
---|
470 | |
---|
471 | RESOLV_TESTCODE=' |
---|
472 | #include <sys/types.h> |
---|
473 | #include <netinet/in.h> |
---|
474 | #include <arpa/nameser.h> |
---|
475 | #include <resolv.h> |
---|
476 | |
---|
477 | int main() |
---|
478 | { |
---|
479 | |
---|
480 | res_query( NULL, 0, 0, NULL, 0); |
---|
481 | dn_expand( NULL, NULL, NULL, NULL, 0); |
---|
482 | dn_skipname( NULL, NULL); |
---|
483 | } |
---|
484 | ' |
---|
485 | RESOLV_NS_TESTCODE=' |
---|
486 | #include <sys/types.h> |
---|
487 | #include <netinet/in.h> |
---|
488 | #include <arpa/nameser.h> |
---|
489 | #include <resolv.h> |
---|
490 | |
---|
491 | int main() |
---|
492 | { |
---|
493 | ns_initparse( NULL, 0, NULL ); |
---|
494 | ns_parserr( NULL, ns_s_an, 0, NULL ); |
---|
495 | } |
---|
496 | ' |
---|
497 | RESOLV_NS_TYPES_TESTCODE=' |
---|
498 | #include <sys/types.h> |
---|
499 | #include <netinet/in.h> |
---|
500 | #include <arpa/nameser.h> |
---|
501 | |
---|
502 | int main() |
---|
503 | { |
---|
504 | ns_msg nsh; |
---|
505 | ns_rr rr; |
---|
506 | |
---|
507 | /* Not all platforms we want to work on have |
---|
508 | ns_* routines, so use this to make sure |
---|
509 | the compiler uses it.*/ |
---|
510 | return (int)(sizeof(nsh) + sizeof(rr)); |
---|
511 | } |
---|
512 | ' |
---|
513 | |
---|
514 | BACKTRACE_TESTCODE=' |
---|
515 | #include <execinfo.h> |
---|
516 | |
---|
517 | int main() |
---|
518 | { |
---|
519 | void *trace[16]; |
---|
520 | return backtrace(trace, 16); |
---|
521 | } |
---|
522 | ' |
---|
523 | |
---|
524 | detect_resolv_dynamic() |
---|
525 | { |
---|
526 | case "$arch" in |
---|
527 | OpenBSD ) |
---|
528 | # In FreeBSD res_*/dn_* routines are present in libc.so |
---|
529 | LIBRESOLV=;; |
---|
530 | FreeBSD ) |
---|
531 | # In FreeBSD res_*/dn_* routines are present in libc.so |
---|
532 | LIBRESOLV=;; |
---|
533 | CYGWIN* ) |
---|
534 | # In Cygwin res_*/dn_* routines are present in libc.so |
---|
535 | LIBRESOLV=;; |
---|
536 | * ) |
---|
537 | LIBRESOLV=-lresolv;; |
---|
538 | esac |
---|
539 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
540 | ret=1 |
---|
541 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null |
---|
542 | if [ "$?" = "0" ]; then |
---|
543 | echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings |
---|
544 | ret=0 |
---|
545 | fi |
---|
546 | |
---|
547 | rm -f $TMPFILE |
---|
548 | return $ret |
---|
549 | } |
---|
550 | |
---|
551 | detect_resolv_static() |
---|
552 | { |
---|
553 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
554 | ret=1 |
---|
555 | for i in $systemlibdirs; do |
---|
556 | if [ -f $i/libresolv.a ]; then |
---|
557 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null |
---|
558 | if [ "$?" = "0" ]; then |
---|
559 | echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings |
---|
560 | ret=0 |
---|
561 | fi |
---|
562 | fi |
---|
563 | done |
---|
564 | |
---|
565 | rm -f $TMPFILE |
---|
566 | return $ret |
---|
567 | } |
---|
568 | |
---|
569 | detect_resolv_ns_dynamic() |
---|
570 | { |
---|
571 | case "$arch" in |
---|
572 | FreeBSD ) |
---|
573 | # In FreeBSD ns_ routines are present in libc.so |
---|
574 | LIBRESOLV=;; |
---|
575 | * ) |
---|
576 | LIBRESOLV=-lresolv;; |
---|
577 | esac |
---|
578 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
579 | ret=1 |
---|
580 | echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null |
---|
581 | if [ "$?" = "0" ]; then |
---|
582 | ret=0 |
---|
583 | fi |
---|
584 | |
---|
585 | rm -f $TMPFILE |
---|
586 | return $ret |
---|
587 | } |
---|
588 | |
---|
589 | detect_resolv_ns_static() |
---|
590 | { |
---|
591 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
592 | ret=1 |
---|
593 | for i in $systemlibdirs; do |
---|
594 | if [ -f $i/libresolv.a ]; then |
---|
595 | echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null |
---|
596 | if [ "$?" = "0" ]; then |
---|
597 | ret=0 |
---|
598 | fi |
---|
599 | fi |
---|
600 | done |
---|
601 | |
---|
602 | rm -f $TMPFILE |
---|
603 | return $ret |
---|
604 | } |
---|
605 | |
---|
606 | detect_nameser_has_ns_types() |
---|
607 | { |
---|
608 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
609 | ret=1 |
---|
610 | # since we aren't actually linking with ns_* routines |
---|
611 | # we can just compile the test code |
---|
612 | echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null |
---|
613 | if [ "$?" = "0" ]; then |
---|
614 | ret=0 |
---|
615 | fi |
---|
616 | |
---|
617 | rm -f $TMPFILE |
---|
618 | return $ret |
---|
619 | } |
---|
620 | |
---|
621 | detect_backtrace() |
---|
622 | { |
---|
623 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
624 | ret=1 |
---|
625 | echo "$BACKTRACE_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null |
---|
626 | if [ "$?" = "0" ]; then |
---|
627 | ret=0 |
---|
628 | fi |
---|
629 | |
---|
630 | rm -f $TMPFILE |
---|
631 | return $ret |
---|
632 | } |
---|
633 | |
---|
634 | if [ "$ssl" = "auto" ]; then |
---|
635 | detect_gnutls |
---|
636 | if [ "$ret" = "0" ]; then |
---|
637 | # Disable NSS for now as it's known to not work very well ATM. |
---|
638 | #detect_nss |
---|
639 | : |
---|
640 | fi |
---|
641 | elif [ "$ssl" = "gnutls" ]; then |
---|
642 | detect_gnutls |
---|
643 | elif [ "$ssl" = "nss" ]; then |
---|
644 | detect_nss |
---|
645 | elif [ "$ssl" = "openssl" ]; then |
---|
646 | echo |
---|
647 | echo 'No detection code exists for OpenSSL. Make sure that you have a complete' |
---|
648 | echo 'installation of OpenSSL (including devel/header files) before reporting' |
---|
649 | echo 'compilation problems.' |
---|
650 | echo |
---|
651 | echo 'Also, keep in mind that the OpenSSL is, according to some people, not' |
---|
652 | echo 'completely GPL-compatible. Using GnuTLS is recommended and better supported' |
---|
653 | echo 'by us. However, on many BSD machines, OpenSSL can be considered part of the' |
---|
654 | echo 'operating system, which makes it GPL-compatible.' |
---|
655 | echo |
---|
656 | echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2' |
---|
657 | echo ' http://www.gnome.org/~markmc/openssl-and-the-gpl.html' |
---|
658 | echo |
---|
659 | echo 'Please note that distributing a BitlBee binary which links to OpenSSL is' |
---|
660 | echo 'probably illegal. If you want to create and distribute a binary BitlBee' |
---|
661 | echo 'package, you really should use GnuTLS instead.' |
---|
662 | echo |
---|
663 | echo 'Also, the OpenSSL license requires us to say this:' |
---|
664 | echo ' * "This product includes software developed by the OpenSSL Project' |
---|
665 | echo ' * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"' |
---|
666 | |
---|
667 | echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings |
---|
668 | |
---|
669 | ret=1 |
---|
670 | else |
---|
671 | echo |
---|
672 | echo 'ERROR: Unknown SSL library specified.' |
---|
673 | exit 1 |
---|
674 | fi |
---|
675 | |
---|
676 | if [ "$ret" = "0" ]; then |
---|
677 | echo |
---|
678 | echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).' |
---|
679 | echo ' Please note that this script doesn'\''t have detection code for OpenSSL,' |
---|
680 | echo ' so if you want to use that, you have to select it by hand.' |
---|
681 | |
---|
682 | exit 1 |
---|
683 | fi; |
---|
684 | |
---|
685 | echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings |
---|
686 | |
---|
687 | if detect_nameser_has_ns_types; then |
---|
688 | echo '#define NAMESER_HAS_NS_TYPES' >> config.h |
---|
689 | fi |
---|
690 | if detect_resolv_dynamic || detect_resolv_static; then |
---|
691 | echo '#define HAVE_RESOLV_A' >> config.h |
---|
692 | if detect_resolv_ns_dynamic || detect_resolv_ns_static; then |
---|
693 | echo '#define HAVE_RESOLV_A_WITH_NS' >> config.h |
---|
694 | fi |
---|
695 | else |
---|
696 | echo 'Insufficient resolv routines. Jabber server must be set explicitly' |
---|
697 | fi |
---|
698 | |
---|
699 | if detect_backtrace; then |
---|
700 | echo '#define HAVE_BACKTRACE' >> config.h |
---|
701 | echo '#define CRASHFILE "'$config'crash.log"' >> config.h |
---|
702 | fi |
---|
703 | |
---|
704 | STORAGES="xml" |
---|
705 | |
---|
706 | for i in $STORAGES; do |
---|
707 | STORAGE_OBJS="$STORAGE_OBJS storage_$i.o" |
---|
708 | done |
---|
709 | echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings |
---|
710 | |
---|
711 | authobjs= |
---|
712 | authlibs= |
---|
713 | if [ "$pam" = 0 ]; then |
---|
714 | echo '#undef WITH_PAM' >> config.h |
---|
715 | else |
---|
716 | if ! echo '#include <security/pam_appl.h>' | $CC -E - >/dev/null 2>/dev/null; then |
---|
717 | echo 'Cannot find libpam development libraries, aborting. (Install libpam0g-dev?)' |
---|
718 | exit 1 |
---|
719 | fi |
---|
720 | echo '#define WITH_PAM' >> config.h |
---|
721 | authobjs=$authobjs'auth_pam.o ' |
---|
722 | authlibs=$authlibs'-lpam ' |
---|
723 | fi |
---|
724 | if [ "$ldap" = 0 ]; then |
---|
725 | echo '#undef WITH_LDAP' >> config.h |
---|
726 | else |
---|
727 | if ! echo '#include <ldap.h>' | $CC -E - >/dev/null 2>/dev/null; then |
---|
728 | echo 'Cannot find libldap development libraries, aborting. (Install libldap2-dev?)' |
---|
729 | exit 1 |
---|
730 | fi |
---|
731 | echo '#define WITH_LDAP' >> config.h |
---|
732 | authobjs=$authobjs'auth_ldap.o ' |
---|
733 | authlibs=$authlibs'-lldap ' |
---|
734 | fi |
---|
735 | echo AUTH_OBJS=$authobjs >> Makefile.settings |
---|
736 | echo EFLAGS+=$authlibs >> Makefile.settings |
---|
737 | |
---|
738 | if [ "$strip" = 0 ]; then |
---|
739 | echo "STRIP=\# skip strip" >> Makefile.settings; |
---|
740 | else |
---|
741 | if [ "$debug" = 1 ]; then |
---|
742 | echo |
---|
743 | echo 'Stripping binaries does not make sense when debugging. Stripping disabled.' |
---|
744 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
745 | strip=0; |
---|
746 | elif [ -n "$STRIP" ]; then |
---|
747 | echo "STRIP=$STRIP" >> Makefile.settings; |
---|
748 | elif type strip > /dev/null 2> /dev/null; then |
---|
749 | echo "STRIP=strip" >> Makefile.settings; |
---|
750 | else |
---|
751 | echo |
---|
752 | echo 'No strip utility found, cannot remove unnecessary parts from executable.' |
---|
753 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
754 | strip=0; |
---|
755 | fi; |
---|
756 | fi |
---|
757 | |
---|
758 | if [ ! "$systemd" = 0 ]; then |
---|
759 | if ! $PKG_CONFIG --exists systemd ; then |
---|
760 | if [ $systemd -eq 1 ]; then |
---|
761 | echo "systemd requested but not found" |
---|
762 | exit 1 |
---|
763 | else |
---|
764 | systemd=0 |
---|
765 | fi |
---|
766 | elif [ $systemd = "auto" ]; then |
---|
767 | systemd=1 |
---|
768 | fi |
---|
769 | fi |
---|
770 | |
---|
771 | pkgconf_systemd_var() { |
---|
772 | # First try deprecated variable, use newer variable if not found |
---|
773 | if $PKG_CONFIG --print-variables systemd | grep -q $1 ; then |
---|
774 | $PKG_CONFIG --variable=$1 systemd |
---|
775 | else |
---|
776 | $PKG_CONFIG --variable=$2 systemd |
---|
777 | fi |
---|
778 | } |
---|
779 | |
---|
780 | if [ "$systemd" -eq 1 ]; then |
---|
781 | if [ -z "$systemdsystemunitdir" ]; then |
---|
782 | systemdsystemunitdir=$(pkgconf_systemd_var systemdsystemunitdir systemd_system_unit_dir) |
---|
783 | fi |
---|
784 | if [ -z "$sysusersdir" ] ; then |
---|
785 | sysusersdir=$(pkgconf_systemd_var sysusersdir sysusers_dir) |
---|
786 | fi |
---|
787 | fi |
---|
788 | |
---|
789 | if [ -n "$systemdsystemunitdir" ]; then |
---|
790 | echo "SYSTEMDSYSTEMUNITDIR=$systemdsystemunitdir" >> Makefile.settings |
---|
791 | fi |
---|
792 | if [ -n "$sysusersdir" ]; then |
---|
793 | echo "SYSUSERSDIR=$sysusersdir" >> Makefile.settings |
---|
794 | fi |
---|
795 | |
---|
796 | if [ "$gcov" = "1" ]; then |
---|
797 | echo "CFLAGS+=--coverage" >> Makefile.settings |
---|
798 | echo "EFLAGS+=--coverage" >> Makefile.settings |
---|
799 | fi |
---|
800 | |
---|
801 | if [ "$plugins" = 0 ]; then |
---|
802 | plugindir="" |
---|
803 | echo '#undef WITH_PLUGINS' >> config.h |
---|
804 | else |
---|
805 | echo '#define WITH_PLUGINS' >> config.h |
---|
806 | fi |
---|
807 | |
---|
808 | otrprefix="" |
---|
809 | if [ "$otr" = "auto" ]; then |
---|
810 | ! $PKG_CONFIG --exists libotr |
---|
811 | otr=$? |
---|
812 | fi |
---|
813 | |
---|
814 | if [ "$otr" != 0 ] && ! $PKG_CONFIG --atleast-version=4.0 --print-errors libotr; then |
---|
815 | exit 1 |
---|
816 | fi |
---|
817 | |
---|
818 | if [ "$otr" = 1 ]; then |
---|
819 | # BI == built-in |
---|
820 | echo '#define OTR_BI' >> config.h |
---|
821 | echo "EFLAGS+=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings |
---|
822 | echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings |
---|
823 | echo 'OTR_BI=otr.o' >> Makefile.settings |
---|
824 | elif [ "$otr" = "plugin" ]; then |
---|
825 | # for some mysterious reason beyond the comprehension of my mortal mind, |
---|
826 | # the libgcrypt flags aren't needed when building as plugin. add them anyway. |
---|
827 | echo '#define OTR_PI' >> config.h |
---|
828 | echo "OTRFLAGS=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings |
---|
829 | echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings |
---|
830 | echo 'OTR_PI=otr.so' >> Makefile.settings |
---|
831 | fi |
---|
832 | |
---|
833 | if [ -z "$PYTHON" ]; then |
---|
834 | for pp in python python3 python2; do |
---|
835 | if which $pp > /dev/null; then |
---|
836 | PYTHON=$pp |
---|
837 | break |
---|
838 | fi |
---|
839 | done |
---|
840 | fi |
---|
841 | |
---|
842 | if [ "$doc" = "1" ]; then |
---|
843 | # check this here just in case someone tries to install it in python2.4... |
---|
844 | if [ ! -e $srcdir/doc/user-guide/help.txt ] && ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then |
---|
845 | echo |
---|
846 | echo 'ERROR: Python (>=2.5 or 3.x) is required to generate docs' |
---|
847 | echo "(Use the PYTHON environment variable if it's in a weird location)" |
---|
848 | exit 1 |
---|
849 | fi |
---|
850 | echo "DOC=1" >> Makefile.settings |
---|
851 | echo "PYTHON=$PYTHON" >> Makefile.settings |
---|
852 | fi |
---|
853 | |
---|
854 | get_version |
---|
855 | |
---|
856 | if [ ! "$BITLBEE_VERSION" = "$REAL_BITLBEE_VERSION" ]; then |
---|
857 | echo "Spoofing version number: $BITLBEE_VERSION" |
---|
858 | echo "#undef BITLBEE_VERSION" >> config.h |
---|
859 | echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h |
---|
860 | echo |
---|
861 | fi |
---|
862 | |
---|
863 | if ! make helloworld > /dev/null 2>&1; then |
---|
864 | echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles." |
---|
865 | echo "BitlBee needs GNU make to build properly. On most systems GNU make is available" |
---|
866 | echo "under the name 'gmake'." |
---|
867 | echo |
---|
868 | if gmake helloworld > /dev/null 2>&1; then |
---|
869 | echo "gmake seems to be available on your machine, great." |
---|
870 | echo |
---|
871 | else |
---|
872 | echo "gmake is not installed (or not working). Please try to install it." |
---|
873 | echo |
---|
874 | fi |
---|
875 | fi |
---|
876 | |
---|
877 | pkgconfiglibs='' |
---|
878 | case "$arch" in |
---|
879 | CYGWIN* ) |
---|
880 | pkgconfiglibs='-L${libdir} -lbitlbee -no-undefined' |
---|
881 | esac |
---|
882 | |
---|
883 | pkgconfigrequires='glib-2.0' |
---|
884 | if [ "$external_json_parser" = '1' ]; then |
---|
885 | pkgconfigrequires="$pkgconfigrequires json-parser" |
---|
886 | fi |
---|
887 | |
---|
888 | cat <<EOF >bitlbee.pc |
---|
889 | prefix=$prefix |
---|
890 | includedir=$includedir |
---|
891 | plugindir=$plugindir |
---|
892 | libdir=$libdir |
---|
893 | datadir=$datadir |
---|
894 | |
---|
895 | Name: bitlbee |
---|
896 | Description: IRC to IM gateway |
---|
897 | Requires: $pkgconfigrequires |
---|
898 | Version: $BITLBEE_VERSION |
---|
899 | Libs: $pkgconfiglibs |
---|
900 | Cflags: -I\${includedir} |
---|
901 | |
---|
902 | EOF |
---|
903 | |
---|
904 | protocols='' |
---|
905 | protoobjs='' |
---|
906 | |
---|
907 | if [ "$purple" = 0 ]; then |
---|
908 | echo '#undef WITH_PURPLE' >> config.h |
---|
909 | else |
---|
910 | if ! $PKG_CONFIG purple; then |
---|
911 | echo |
---|
912 | echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)' |
---|
913 | exit 1 |
---|
914 | fi |
---|
915 | echo '#define WITH_PURPLE' >> config.h |
---|
916 | cat<<EOF >>Makefile.settings |
---|
917 | EFLAGS += $($PKG_CONFIG purple --libs) |
---|
918 | PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags) |
---|
919 | EOF |
---|
920 | protocols=$protocols'purple ' |
---|
921 | protoobjs=$protoobjs'purple_mod.o ' |
---|
922 | |
---|
923 | # only disable these if the user didn't enable them explicitly |
---|
924 | [ "$jabber" = "default-on" ] && jabber=0 |
---|
925 | |
---|
926 | echo '#undef PACKAGE' >> config.h |
---|
927 | echo '#define PACKAGE "BitlBee-LIBPURPLE"' >> config.h |
---|
928 | |
---|
929 | if [ "$events" = "libevent" ]; then |
---|
930 | echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling' |
---|
931 | echo 'outside libpurple, talking to GLib directly. At least for now the combination' |
---|
932 | echo 'libpurple + libevent is *not* recommended!' |
---|
933 | echo |
---|
934 | fi |
---|
935 | fi |
---|
936 | |
---|
937 | case "$CC" in |
---|
938 | *gcc* ) |
---|
939 | echo CFLAGS+=-MMD -MF .depend/\$@.d >> Makefile.settings |
---|
940 | for i in . lib tests protocols protocols/*/; do |
---|
941 | mkdir -p $i/.depend |
---|
942 | done |
---|
943 | esac |
---|
944 | |
---|
945 | if [ "$jabber" = 0 ]; then |
---|
946 | echo '#undef WITH_JABBER' >> config.h |
---|
947 | else |
---|
948 | echo '#define WITH_JABBER' >> config.h |
---|
949 | protocols=$protocols'jabber ' |
---|
950 | protoobjs=$protoobjs'jabber_mod.o ' |
---|
951 | fi |
---|
952 | |
---|
953 | if [ "$twitter" = 0 ]; then |
---|
954 | echo '#undef WITH_TWITTER' >> config.h |
---|
955 | else |
---|
956 | echo '#define WITH_TWITTER' >> config.h |
---|
957 | protocols=$protocols'twitter ' |
---|
958 | protoobjs=$protoobjs'twitter_mod.o ' |
---|
959 | fi |
---|
960 | |
---|
961 | if [ "$protocols" = "PROTOCOLS = " ]; then |
---|
962 | echo "Warning: You haven't selected any communication protocol to compile!" |
---|
963 | echo " BitlBee will run, but you will be unable to connect to IM servers!" |
---|
964 | fi |
---|
965 | |
---|
966 | echo "PROTOCOLS = $protocols" >> Makefile.settings |
---|
967 | echo "PROTOOBJS = $protoobjs" >> Makefile.settings |
---|
968 | |
---|
969 | echo Architecture: $arch |
---|
970 | case "$arch" in |
---|
971 | Linux ) |
---|
972 | ;; |
---|
973 | GNU/* ) |
---|
974 | ;; |
---|
975 | *BSD ) |
---|
976 | ;; |
---|
977 | Darwin ) |
---|
978 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
979 | ;; |
---|
980 | IRIX ) |
---|
981 | ;; |
---|
982 | SunOS ) |
---|
983 | echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings |
---|
984 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
985 | echo '#define NO_FD_PASSING' >> config.h |
---|
986 | if [ "$arch_rel" = "5.10" ]; then |
---|
987 | echo '#define NO_STRCASESTR' >> config.h |
---|
988 | fi |
---|
989 | ;; |
---|
990 | AIX ) |
---|
991 | echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings |
---|
992 | ;; |
---|
993 | CYGWIN* ) |
---|
994 | echo 'EFLAGS+=-Wl,--export-all,--out-implib,libbitlbee.dll.a' >> Makefile.settings |
---|
995 | echo 'IMPLIB=libbitlbee.dll.a' >> Makefile.settings |
---|
996 | ;; |
---|
997 | Windows ) |
---|
998 | echo 'Native windows compilation is not supported anymore, use cygwin instead.' |
---|
999 | ;; |
---|
1000 | * ) |
---|
1001 | echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.' |
---|
1002 | echo 'Please report any problems at https://bugs.bitlbee.org/.' |
---|
1003 | ;; |
---|
1004 | esac |
---|
1005 | |
---|
1006 | if [ -n "$target" ]; then |
---|
1007 | echo "Cross-compiling for: $target" |
---|
1008 | fi |
---|
1009 | |
---|
1010 | echo |
---|
1011 | echo 'Configuration done:' |
---|
1012 | |
---|
1013 | if [ "$debug" = "1" ]; then |
---|
1014 | echo ' Debugging enabled.' |
---|
1015 | else |
---|
1016 | echo ' Debugging disabled.' |
---|
1017 | fi |
---|
1018 | |
---|
1019 | if [ "$asan" = "1" ]; then |
---|
1020 | echo ' AddressSanitizer (ASAN) enabled.' |
---|
1021 | else |
---|
1022 | echo ' AddressSanitizer (ASAN) disabled.' |
---|
1023 | fi |
---|
1024 | |
---|
1025 | if [ "$pie" = "1" ]; then |
---|
1026 | echo ' Building PIE executable' |
---|
1027 | else |
---|
1028 | echo ' Building non-PIE executable' |
---|
1029 | fi |
---|
1030 | |
---|
1031 | if [ "$strip" = "1" ]; then |
---|
1032 | echo ' Binary stripping enabled.' |
---|
1033 | else |
---|
1034 | echo ' Binary stripping disabled.' |
---|
1035 | fi |
---|
1036 | |
---|
1037 | if [ "$otr" = "1" ]; then |
---|
1038 | echo ' Off-the-Record (OTR) Messaging enabled.' |
---|
1039 | elif [ "$otr" = "plugin" ]; then |
---|
1040 | echo ' Off-the-Record (OTR) Messaging enabled (as a plugin).' |
---|
1041 | else |
---|
1042 | echo ' Off-the-Record (OTR) Messaging disabled.' |
---|
1043 | fi |
---|
1044 | |
---|
1045 | if [ "$systemd" = "1" ]; then |
---|
1046 | echo ' systemd enabled.' |
---|
1047 | else |
---|
1048 | echo ' systemd disabled.' |
---|
1049 | fi |
---|
1050 | |
---|
1051 | echo ' Using python: '$PYTHON |
---|
1052 | |
---|
1053 | if [ "$external_json_parser" = "1" ]; then |
---|
1054 | echo ' Using system JSON parser.' |
---|
1055 | else |
---|
1056 | echo ' Using bundled JSON parser.' |
---|
1057 | fi |
---|
1058 | |
---|
1059 | echo ' Using event handler: '$events |
---|
1060 | echo ' Using SSL library: '$ssl |
---|
1061 | #echo ' Building with these storage backends: '$STORAGES |
---|
1062 | |
---|
1063 | if [ -n "$protocols" ]; then |
---|
1064 | echo ' Building with these protocols:' $protocols$protocols_mods |
---|
1065 | case "$protocols" in |
---|
1066 | *purple*) |
---|
1067 | echo " Note that BitlBee-libpurple is supported on a best-effort basis. It's" |
---|
1068 | echo " not *fully* compatible with normal BitlBee. Don't use it unless you" |
---|
1069 | echo " absolutely need it (i.e. support for a certain protocol or feature)." |
---|
1070 | esac |
---|
1071 | else |
---|
1072 | echo ' Building without IM-protocol support. We wish you a lot of fun...' |
---|
1073 | fi |
---|