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