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 | echo CFLAGS+=-I${srcdir} -I${srcdir}/lib -I${srcdir}/protocols -I. >> Makefile.settings |
---|
333 | |
---|
334 | echo CFLAGS+=-DHAVE_CONFIG_H -D_GNU_SOURCE >> Makefile.settings |
---|
335 | |
---|
336 | if [ -n "$CC" ]; then |
---|
337 | CC=$CC |
---|
338 | elif type gcc > /dev/null 2> /dev/null; then |
---|
339 | CC=gcc |
---|
340 | elif type cc > /dev/null 2> /dev/null; then |
---|
341 | CC=cc |
---|
342 | else |
---|
343 | echo 'Cannot find a C compiler, aborting.' |
---|
344 | exit 1; |
---|
345 | fi |
---|
346 | |
---|
347 | echo "CC=$CC" >> Makefile.settings; |
---|
348 | if echo $CC | grep -qw 'gcc\|clang'; then |
---|
349 | # Apparently -Wall is gcc-specific? |
---|
350 | echo CFLAGS+=-Wall -Wformat -Werror=format-security >> Makefile.settings |
---|
351 | fi |
---|
352 | |
---|
353 | if [ -z "$LD" ]; then |
---|
354 | if type ld > /dev/null 2> /dev/null; then |
---|
355 | LD=ld |
---|
356 | else |
---|
357 | echo 'Cannot find ld, aborting.' |
---|
358 | exit 1; |
---|
359 | fi |
---|
360 | fi |
---|
361 | |
---|
362 | echo "LD=$LD" >> Makefile.settings |
---|
363 | |
---|
364 | if [ -z "$PKG_CONFIG" ]; then |
---|
365 | PKG_CONFIG=pkg-config |
---|
366 | fi |
---|
367 | |
---|
368 | if ! $PKG_CONFIG --version > /dev/null 2>/dev/null; then |
---|
369 | echo |
---|
370 | echo 'Cannot find pkg-config, aborting.' |
---|
371 | exit 1 |
---|
372 | fi |
---|
373 | |
---|
374 | if $PKG_CONFIG glib-2.0; then |
---|
375 | if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then |
---|
376 | cat<<EOF >>Makefile.settings |
---|
377 | EFLAGS+=$($PKG_CONFIG --libs glib-2.0 gmodule-2.0) |
---|
378 | CFLAGS+=$($PKG_CONFIG --cflags glib-2.0 gmodule-2.0) |
---|
379 | EOF |
---|
380 | else |
---|
381 | echo |
---|
382 | echo 'Found glib2 '$($PKG_CONFIG glib-2.0 --modversion)', but version '$GLIB_MIN_VERSION' or newer is required.' |
---|
383 | exit 1 |
---|
384 | fi |
---|
385 | else |
---|
386 | echo |
---|
387 | echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)' |
---|
388 | exit 1 |
---|
389 | fi |
---|
390 | |
---|
391 | if [ "$events" = "libevent" ]; then |
---|
392 | if ! [ -f "${libevent}include/event.h" ]; then |
---|
393 | echo |
---|
394 | echo 'Warning: Could not find event.h, you might have to install it and/or specify' |
---|
395 | echo 'its location using the --libevent= argument. (Example: If event.h is in' |
---|
396 | echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)' |
---|
397 | fi |
---|
398 | |
---|
399 | echo '#define EVENTS_LIBEVENT' >> config.h |
---|
400 | cat <<EOF >>Makefile.settings |
---|
401 | EFLAGS+=-levent -L${libevent}lib |
---|
402 | CFLAGS+=-I${libevent}include |
---|
403 | EOF |
---|
404 | elif [ "$events" = "glib" ]; then |
---|
405 | ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...): |
---|
406 | echo '#define EVENTS_GLIB' >> config.h |
---|
407 | else |
---|
408 | echo |
---|
409 | echo 'ERROR: Unknown event handler specified.' |
---|
410 | exit 1 |
---|
411 | fi |
---|
412 | echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings |
---|
413 | |
---|
414 | if [ "$external_json_parser" = "auto" ]; then |
---|
415 | if pkg-config --exists json-parser; then |
---|
416 | external_json_parser=1 |
---|
417 | else |
---|
418 | external_json_parser=0 |
---|
419 | fi |
---|
420 | fi |
---|
421 | echo "EXTERNAL_JSON_PARSER=$external_json_parser" >> Makefile.settings |
---|
422 | if [ "$external_json_parser" = "1" ]; then |
---|
423 | echo "CFLAGS+=$(pkg-config --cflags json-parser)" >> Makefile.settings |
---|
424 | echo "CFLAGS+=-DUSE_EXTERNAL_JSON_PARSER" >> Makefile.settings |
---|
425 | echo "LDFLAGS_BITLBEE+=$(pkg-config --libs json-parser)" >> Makefile.settings |
---|
426 | echo "LDFLAGS_TESTS+=$(pkg-config --libs json-parser)" >> Makefile.settings |
---|
427 | fi |
---|
428 | |
---|
429 | echo CFLAGS+=-I"${srcdir}" -I"${srcdir}"/lib -I"${srcdir}"/protocols -I. >> Makefile.settings |
---|
430 | |
---|
431 | detect_gnutls() |
---|
432 | { |
---|
433 | if $PKG_CONFIG --exists gnutls; then |
---|
434 | cat <<EOF >>Makefile.settings |
---|
435 | EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs) |
---|
436 | CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags) |
---|
437 | EOF |
---|
438 | ssl=gnutls |
---|
439 | if ! $PKG_CONFIG gnutls --atleast-version=2.8; then |
---|
440 | echo |
---|
441 | echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.' |
---|
442 | fi |
---|
443 | ret=1 |
---|
444 | elif libgnutls-config --version > /dev/null 2> /dev/null; then |
---|
445 | cat <<EOF >>Makefile.settings |
---|
446 | EFLAGS+=$(libgnutls-config --libs) $(libgcrypt-config --libs) |
---|
447 | CFLAGS+=$(libgnutls-config --cflags) $(libgcrypt-config --cflags) |
---|
448 | EOF |
---|
449 | |
---|
450 | ssl=gnutls |
---|
451 | ret=1; |
---|
452 | else |
---|
453 | ret=0; |
---|
454 | fi; |
---|
455 | } |
---|
456 | |
---|
457 | detect_nss() |
---|
458 | { |
---|
459 | if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then |
---|
460 | cat<<EOF >>Makefile.settings |
---|
461 | EFLAGS+=$($PKG_CONFIG --libs nss) |
---|
462 | CFLAGS+=$($PKG_CONFIG --cflags nss) |
---|
463 | EOF |
---|
464 | |
---|
465 | ssl=nss |
---|
466 | ret=1; |
---|
467 | else |
---|
468 | ret=0; |
---|
469 | fi; |
---|
470 | } |
---|
471 | |
---|
472 | RESOLV_TESTCODE=' |
---|
473 | #include <sys/types.h> |
---|
474 | #include <netinet/in.h> |
---|
475 | #include <arpa/nameser.h> |
---|
476 | #include <resolv.h> |
---|
477 | |
---|
478 | int main() |
---|
479 | { |
---|
480 | |
---|
481 | res_query( NULL, 0, 0, NULL, 0); |
---|
482 | dn_expand( NULL, NULL, NULL, NULL, 0); |
---|
483 | dn_skipname( NULL, NULL); |
---|
484 | } |
---|
485 | ' |
---|
486 | RESOLV_NS_TESTCODE=' |
---|
487 | #include <sys/types.h> |
---|
488 | #include <netinet/in.h> |
---|
489 | #include <arpa/nameser.h> |
---|
490 | #include <resolv.h> |
---|
491 | |
---|
492 | int main() |
---|
493 | { |
---|
494 | ns_initparse( NULL, 0, NULL ); |
---|
495 | ns_parserr( NULL, ns_s_an, 0, NULL ); |
---|
496 | } |
---|
497 | ' |
---|
498 | RESOLV_NS_TYPES_TESTCODE=' |
---|
499 | #include <sys/types.h> |
---|
500 | #include <netinet/in.h> |
---|
501 | #include <arpa/nameser.h> |
---|
502 | |
---|
503 | int main() |
---|
504 | { |
---|
505 | ns_msg nsh; |
---|
506 | ns_rr rr; |
---|
507 | |
---|
508 | /* Not all platforms we want to work on have |
---|
509 | ns_* routines, so use this to make sure |
---|
510 | the compiler uses it.*/ |
---|
511 | return (int)(sizeof(nsh) + sizeof(rr)); |
---|
512 | } |
---|
513 | ' |
---|
514 | |
---|
515 | BACKTRACE_TESTCODE=' |
---|
516 | #include <execinfo.h> |
---|
517 | |
---|
518 | int main() |
---|
519 | { |
---|
520 | void *trace[16]; |
---|
521 | return backtrace(trace, 16); |
---|
522 | } |
---|
523 | ' |
---|
524 | |
---|
525 | detect_resolv_dynamic() |
---|
526 | { |
---|
527 | case "$arch" in |
---|
528 | OpenBSD ) |
---|
529 | # In FreeBSD res_*/dn_* routines are present in libc.so |
---|
530 | LIBRESOLV=;; |
---|
531 | FreeBSD ) |
---|
532 | # In FreeBSD res_*/dn_* routines are present in libc.so |
---|
533 | LIBRESOLV=;; |
---|
534 | CYGWIN* ) |
---|
535 | # In Cygwin res_*/dn_* routines are present in libc.so |
---|
536 | LIBRESOLV=;; |
---|
537 | * ) |
---|
538 | LIBRESOLV=-lresolv;; |
---|
539 | esac |
---|
540 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
541 | ret=1 |
---|
542 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null |
---|
543 | if [ "$?" = "0" ]; then |
---|
544 | echo "EFLAGS+=$LIBRESOLV" >> Makefile.settings |
---|
545 | ret=0 |
---|
546 | fi |
---|
547 | |
---|
548 | rm -f $TMPFILE |
---|
549 | return $ret |
---|
550 | } |
---|
551 | |
---|
552 | detect_resolv_static() |
---|
553 | { |
---|
554 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
555 | ret=1 |
---|
556 | for i in $systemlibdirs; do |
---|
557 | if [ -f $i/libresolv.a ]; then |
---|
558 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null |
---|
559 | if [ "$?" = "0" ]; then |
---|
560 | echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings |
---|
561 | ret=0 |
---|
562 | fi |
---|
563 | fi |
---|
564 | done |
---|
565 | |
---|
566 | rm -f $TMPFILE |
---|
567 | return $ret |
---|
568 | } |
---|
569 | |
---|
570 | detect_resolv_ns_dynamic() |
---|
571 | { |
---|
572 | case "$arch" in |
---|
573 | FreeBSD ) |
---|
574 | # In FreeBSD ns_ routines are present in libc.so |
---|
575 | LIBRESOLV=;; |
---|
576 | * ) |
---|
577 | LIBRESOLV=-lresolv;; |
---|
578 | esac |
---|
579 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
580 | ret=1 |
---|
581 | echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null |
---|
582 | if [ "$?" = "0" ]; then |
---|
583 | ret=0 |
---|
584 | fi |
---|
585 | |
---|
586 | rm -f $TMPFILE |
---|
587 | return $ret |
---|
588 | } |
---|
589 | |
---|
590 | detect_resolv_ns_static() |
---|
591 | { |
---|
592 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
593 | ret=1 |
---|
594 | for i in $systemlibdirs; do |
---|
595 | if [ -f $i/libresolv.a ]; then |
---|
596 | echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null |
---|
597 | if [ "$?" = "0" ]; then |
---|
598 | ret=0 |
---|
599 | fi |
---|
600 | fi |
---|
601 | done |
---|
602 | |
---|
603 | rm -f $TMPFILE |
---|
604 | return $ret |
---|
605 | } |
---|
606 | |
---|
607 | detect_nameser_has_ns_types() |
---|
608 | { |
---|
609 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
610 | ret=1 |
---|
611 | # since we aren't actually linking with ns_* routines |
---|
612 | # we can just compile the test code |
---|
613 | echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null |
---|
614 | if [ "$?" = "0" ]; then |
---|
615 | ret=0 |
---|
616 | fi |
---|
617 | |
---|
618 | rm -f $TMPFILE |
---|
619 | return $ret |
---|
620 | } |
---|
621 | |
---|
622 | detect_backtrace() |
---|
623 | { |
---|
624 | TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) |
---|
625 | ret=1 |
---|
626 | echo "$BACKTRACE_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null |
---|
627 | if [ "$?" = "0" ]; then |
---|
628 | ret=0 |
---|
629 | fi |
---|
630 | |
---|
631 | rm -f $TMPFILE |
---|
632 | return $ret |
---|
633 | } |
---|
634 | |
---|
635 | if [ "$ssl" = "auto" ]; then |
---|
636 | detect_gnutls |
---|
637 | if [ "$ret" = "0" ]; then |
---|
638 | # Disable NSS for now as it's known to not work very well ATM. |
---|
639 | #detect_nss |
---|
640 | : |
---|
641 | fi |
---|
642 | elif [ "$ssl" = "gnutls" ]; then |
---|
643 | detect_gnutls |
---|
644 | elif [ "$ssl" = "nss" ]; then |
---|
645 | detect_nss |
---|
646 | elif [ "$ssl" = "openssl" ]; then |
---|
647 | echo |
---|
648 | echo 'No detection code exists for OpenSSL. Make sure that you have a complete' |
---|
649 | echo 'installation of OpenSSL (including devel/header files) before reporting' |
---|
650 | echo 'compilation problems.' |
---|
651 | echo |
---|
652 | echo 'Also, keep in mind that the OpenSSL is, according to some people, not' |
---|
653 | echo 'completely GPL-compatible. Using GnuTLS is recommended and better supported' |
---|
654 | echo 'by us. However, on many BSD machines, OpenSSL can be considered part of the' |
---|
655 | echo 'operating system, which makes it GPL-compatible.' |
---|
656 | echo |
---|
657 | echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2' |
---|
658 | echo ' http://www.gnome.org/~markmc/openssl-and-the-gpl.html' |
---|
659 | echo |
---|
660 | echo 'Please note that distributing a BitlBee binary which links to OpenSSL is' |
---|
661 | echo 'probably illegal. If you want to create and distribute a binary BitlBee' |
---|
662 | echo 'package, you really should use GnuTLS instead.' |
---|
663 | echo |
---|
664 | echo 'Also, the OpenSSL license requires us to say this:' |
---|
665 | echo ' * "This product includes software developed by the OpenSSL Project' |
---|
666 | echo ' * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"' |
---|
667 | |
---|
668 | echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings |
---|
669 | |
---|
670 | ret=1 |
---|
671 | else |
---|
672 | echo |
---|
673 | echo 'ERROR: Unknown SSL library specified.' |
---|
674 | exit 1 |
---|
675 | fi |
---|
676 | |
---|
677 | if [ "$ret" = "0" ]; then |
---|
678 | echo |
---|
679 | echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).' |
---|
680 | echo ' Please note that this script doesn'\''t have detection code for OpenSSL,' |
---|
681 | echo ' so if you want to use that, you have to select it by hand.' |
---|
682 | |
---|
683 | exit 1 |
---|
684 | fi; |
---|
685 | |
---|
686 | echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings |
---|
687 | |
---|
688 | if detect_nameser_has_ns_types; then |
---|
689 | echo '#define NAMESER_HAS_NS_TYPES' >> config.h |
---|
690 | fi |
---|
691 | if detect_resolv_dynamic || detect_resolv_static; then |
---|
692 | echo '#define HAVE_RESOLV_A' >> config.h |
---|
693 | if detect_resolv_ns_dynamic || detect_resolv_ns_static; then |
---|
694 | echo '#define HAVE_RESOLV_A_WITH_NS' >> config.h |
---|
695 | fi |
---|
696 | else |
---|
697 | echo 'Insufficient resolv routines. Jabber server must be set explicitly' |
---|
698 | fi |
---|
699 | |
---|
700 | if detect_backtrace; then |
---|
701 | echo '#define HAVE_BACKTRACE' >> config.h |
---|
702 | echo '#define CRASHFILE "'$config'crash.log"' >> config.h |
---|
703 | fi |
---|
704 | |
---|
705 | STORAGES="xml" |
---|
706 | |
---|
707 | for i in $STORAGES; do |
---|
708 | STORAGE_OBJS="$STORAGE_OBJS storage_$i.o" |
---|
709 | done |
---|
710 | echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings |
---|
711 | |
---|
712 | authobjs= |
---|
713 | authlibs= |
---|
714 | if [ "$pam" = 0 ]; then |
---|
715 | echo '#undef WITH_PAM' >> config.h |
---|
716 | else |
---|
717 | if ! echo '#include <security/pam_appl.h>' | $CC -E - >/dev/null 2>/dev/null; then |
---|
718 | echo 'Cannot find libpam development libraries, aborting. (Install libpam0g-dev?)' |
---|
719 | exit 1 |
---|
720 | fi |
---|
721 | echo '#define WITH_PAM' >> config.h |
---|
722 | authobjs=$authobjs'auth_pam.o ' |
---|
723 | authlibs=$authlibs'-lpam ' |
---|
724 | fi |
---|
725 | if [ "$ldap" = 0 ]; then |
---|
726 | echo '#undef WITH_LDAP' >> config.h |
---|
727 | else |
---|
728 | if ! echo '#include <ldap.h>' | $CC -E - >/dev/null 2>/dev/null; then |
---|
729 | echo 'Cannot find libldap development libraries, aborting. (Install libldap2-dev?)' |
---|
730 | exit 1 |
---|
731 | fi |
---|
732 | echo '#define WITH_LDAP' >> config.h |
---|
733 | authobjs=$authobjs'auth_ldap.o ' |
---|
734 | authlibs=$authlibs'-lldap ' |
---|
735 | fi |
---|
736 | echo AUTH_OBJS=$authobjs >> Makefile.settings |
---|
737 | echo EFLAGS+=$authlibs >> Makefile.settings |
---|
738 | |
---|
739 | if [ "$strip" = 0 ]; then |
---|
740 | echo "STRIP=\# skip strip" >> Makefile.settings; |
---|
741 | else |
---|
742 | if [ "$debug" = 1 ]; then |
---|
743 | echo |
---|
744 | echo 'Stripping binaries does not make sense when debugging. Stripping disabled.' |
---|
745 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
746 | strip=0; |
---|
747 | elif [ -n "$STRIP" ]; then |
---|
748 | echo "STRIP=$STRIP" >> Makefile.settings; |
---|
749 | elif type strip > /dev/null 2> /dev/null; then |
---|
750 | echo "STRIP=strip" >> Makefile.settings; |
---|
751 | else |
---|
752 | echo |
---|
753 | echo 'No strip utility found, cannot remove unnecessary parts from executable.' |
---|
754 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
755 | strip=0; |
---|
756 | fi; |
---|
757 | fi |
---|
758 | |
---|
759 | if [ ! "$systemd" = 0 ]; then |
---|
760 | if ! $PKG_CONFIG --exists systemd ; then |
---|
761 | if [ $systemd -eq 1 ]; then |
---|
762 | echo "systemd requested but not found" |
---|
763 | exit 1 |
---|
764 | else |
---|
765 | systemd=0 |
---|
766 | fi |
---|
767 | elif [ $systemd = "auto" ]; then |
---|
768 | systemd=1 |
---|
769 | fi |
---|
770 | fi |
---|
771 | |
---|
772 | pkgconf_systemd_var() { |
---|
773 | # First try deprecated variable, use newer variable if not found |
---|
774 | if $PKG_CONFIG --print-variables systemd | grep -q $1 ; then |
---|
775 | $PKG_CONFIG --variable=$1 systemd |
---|
776 | else |
---|
777 | $PKG_CONFIG --variable=$2 systemd |
---|
778 | fi |
---|
779 | } |
---|
780 | |
---|
781 | if [ "$systemd" -eq 1 ]; then |
---|
782 | if [ -z "$systemdsystemunitdir" ]; then |
---|
783 | systemdsystemunitdir=$(pkgconf_systemd_var systemdsystemunitdir systemd_system_unit_dir) |
---|
784 | fi |
---|
785 | if [ -z "$sysusersdir" ] ; then |
---|
786 | sysusersdir=$(pkgconf_systemd_var sysusersdir sysusers_dir) |
---|
787 | fi |
---|
788 | fi |
---|
789 | |
---|
790 | if [ -n "$systemdsystemunitdir" ]; then |
---|
791 | echo "SYSTEMDSYSTEMUNITDIR=$systemdsystemunitdir" >> Makefile.settings |
---|
792 | fi |
---|
793 | if [ -n "$sysusersdir" ]; then |
---|
794 | echo "SYSUSERSDIR=$sysusersdir" >> Makefile.settings |
---|
795 | fi |
---|
796 | |
---|
797 | if [ "$gcov" = "1" ]; then |
---|
798 | echo "CFLAGS+=--coverage" >> Makefile.settings |
---|
799 | echo "EFLAGS+=--coverage" >> Makefile.settings |
---|
800 | fi |
---|
801 | |
---|
802 | if [ "$plugins" = 0 ]; then |
---|
803 | plugindir="" |
---|
804 | echo '#undef WITH_PLUGINS' >> config.h |
---|
805 | else |
---|
806 | echo '#define WITH_PLUGINS' >> config.h |
---|
807 | fi |
---|
808 | |
---|
809 | otrprefix="" |
---|
810 | if [ "$otr" = "auto" ]; then |
---|
811 | ! $PKG_CONFIG --exists libotr |
---|
812 | otr=$? |
---|
813 | fi |
---|
814 | |
---|
815 | if [ "$otr" != 0 ] && ! $PKG_CONFIG --atleast-version=4.0 --print-errors libotr; then |
---|
816 | exit 1 |
---|
817 | fi |
---|
818 | |
---|
819 | if [ "$otr" = 1 ]; then |
---|
820 | # BI == built-in |
---|
821 | echo '#define OTR_BI' >> config.h |
---|
822 | echo "EFLAGS+=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings |
---|
823 | echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings |
---|
824 | echo 'OTR_BI=otr.o' >> Makefile.settings |
---|
825 | elif [ "$otr" = "plugin" ]; then |
---|
826 | # for some mysterious reason beyond the comprehension of my mortal mind, |
---|
827 | # the libgcrypt flags aren't needed when building as plugin. add them anyway. |
---|
828 | echo '#define OTR_PI' >> config.h |
---|
829 | echo "OTRFLAGS=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings |
---|
830 | echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings |
---|
831 | echo 'OTR_PI=otr.so' >> Makefile.settings |
---|
832 | fi |
---|
833 | |
---|
834 | if [ -z "$PYTHON" ]; then |
---|
835 | for pp in python python3 python2; do |
---|
836 | if which $pp > /dev/null; then |
---|
837 | PYTHON=$pp |
---|
838 | break |
---|
839 | fi |
---|
840 | done |
---|
841 | fi |
---|
842 | |
---|
843 | if [ "$doc" = "1" ]; then |
---|
844 | # check this here just in case someone tries to install it in python2.4... |
---|
845 | if [ ! -e $srcdir/doc/user-guide/help.txt ] && ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then |
---|
846 | echo |
---|
847 | echo 'ERROR: Python (>=2.5 or 3.x) is required to generate docs' |
---|
848 | echo "(Use the PYTHON environment variable if it's in a weird location)" |
---|
849 | exit 1 |
---|
850 | fi |
---|
851 | echo "DOC=1" >> Makefile.settings |
---|
852 | echo "PYTHON=$PYTHON" >> Makefile.settings |
---|
853 | fi |
---|
854 | |
---|
855 | get_version |
---|
856 | |
---|
857 | if [ ! "$BITLBEE_VERSION" = "$REAL_BITLBEE_VERSION" ]; then |
---|
858 | echo "Spoofing version number: $BITLBEE_VERSION" |
---|
859 | echo "#undef BITLBEE_VERSION" >> config.h |
---|
860 | echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h |
---|
861 | echo |
---|
862 | fi |
---|
863 | |
---|
864 | if ! make helloworld > /dev/null 2>&1; then |
---|
865 | echo "WARNING: Your version of make (BSD make?) does not support BitlBee's makefiles." |
---|
866 | echo "BitlBee needs GNU make to build properly. On most systems GNU make is available" |
---|
867 | echo "under the name 'gmake'." |
---|
868 | echo |
---|
869 | if gmake helloworld > /dev/null 2>&1; then |
---|
870 | echo "gmake seems to be available on your machine, great." |
---|
871 | echo |
---|
872 | else |
---|
873 | echo "gmake is not installed (or not working). Please try to install it." |
---|
874 | echo |
---|
875 | fi |
---|
876 | fi |
---|
877 | |
---|
878 | pkgconfiglibs='' |
---|
879 | case "$arch" in |
---|
880 | CYGWIN* ) |
---|
881 | pkgconfiglibs='-L${libdir} -lbitlbee -no-undefined' |
---|
882 | esac |
---|
883 | |
---|
884 | pkgconfigrequires='glib-2.0' |
---|
885 | if [ "$external_json_parser" = '1' ]; then |
---|
886 | pkgconfigrequires="$pkgconfigrequires json-parser" |
---|
887 | fi |
---|
888 | |
---|
889 | cat <<EOF >bitlbee.pc |
---|
890 | prefix=$prefix |
---|
891 | includedir=$includedir |
---|
892 | plugindir=$plugindir |
---|
893 | libdir=$libdir |
---|
894 | datadir=$datadir |
---|
895 | |
---|
896 | Name: bitlbee |
---|
897 | Description: IRC to IM gateway |
---|
898 | Requires: $pkgconfigrequires |
---|
899 | Version: $BITLBEE_VERSION |
---|
900 | Libs: $pkgconfiglibs |
---|
901 | Cflags: -I\${includedir} |
---|
902 | |
---|
903 | EOF |
---|
904 | |
---|
905 | protocols='' |
---|
906 | protoobjs='' |
---|
907 | |
---|
908 | if [ "$purple" = 0 ]; then |
---|
909 | echo '#undef WITH_PURPLE' >> config.h |
---|
910 | else |
---|
911 | if ! $PKG_CONFIG purple; then |
---|
912 | echo |
---|
913 | echo 'Cannot find libpurple development libraries, aborting. (Install libpurple-dev?)' |
---|
914 | exit 1 |
---|
915 | fi |
---|
916 | echo '#define WITH_PURPLE' >> config.h |
---|
917 | cat<<EOF >>Makefile.settings |
---|
918 | EFLAGS += $($PKG_CONFIG purple --libs) |
---|
919 | PURPLE_CFLAGS += $($PKG_CONFIG purple --cflags) |
---|
920 | EOF |
---|
921 | protocols=$protocols'purple ' |
---|
922 | protoobjs=$protoobjs'purple_mod.o ' |
---|
923 | |
---|
924 | # only disable these if the user didn't enable them explicitly |
---|
925 | [ "$jabber" = "default-on" ] && jabber=0 |
---|
926 | |
---|
927 | echo '#undef PACKAGE' >> config.h |
---|
928 | echo '#define PACKAGE "BitlBee-LIBPURPLE"' >> config.h |
---|
929 | |
---|
930 | if [ "$events" = "libevent" ]; then |
---|
931 | echo 'Warning: Some libpurple modules (including msn-pecan) do their event handling' |
---|
932 | echo 'outside libpurple, talking to GLib directly. At least for now the combination' |
---|
933 | echo 'libpurple + libevent is *not* recommended!' |
---|
934 | echo |
---|
935 | fi |
---|
936 | fi |
---|
937 | |
---|
938 | case "$CC" in |
---|
939 | *gcc* ) |
---|
940 | echo CFLAGS+=-MMD -MF .depend/\$@.d >> Makefile.settings |
---|
941 | for i in . lib tests protocols protocols/*/; do |
---|
942 | mkdir -p $i/.depend |
---|
943 | done |
---|
944 | esac |
---|
945 | |
---|
946 | if [ "$jabber" = 0 ]; then |
---|
947 | echo '#undef WITH_JABBER' >> config.h |
---|
948 | else |
---|
949 | echo '#define WITH_JABBER' >> config.h |
---|
950 | protocols=$protocols'jabber ' |
---|
951 | protoobjs=$protoobjs'jabber_mod.o ' |
---|
952 | fi |
---|
953 | |
---|
954 | if [ "$twitter" = 0 ]; then |
---|
955 | echo '#undef WITH_TWITTER' >> config.h |
---|
956 | else |
---|
957 | echo '#define WITH_TWITTER' >> config.h |
---|
958 | protocols=$protocols'twitter ' |
---|
959 | protoobjs=$protoobjs'twitter_mod.o ' |
---|
960 | fi |
---|
961 | |
---|
962 | if [ "$protocols" = "PROTOCOLS = " ]; then |
---|
963 | echo "Warning: You haven't selected any communication protocol to compile!" |
---|
964 | echo " BitlBee will run, but you will be unable to connect to IM servers!" |
---|
965 | fi |
---|
966 | |
---|
967 | echo "PROTOCOLS = $protocols" >> Makefile.settings |
---|
968 | echo "PROTOOBJS = $protoobjs" >> Makefile.settings |
---|
969 | |
---|
970 | echo Architecture: $arch |
---|
971 | case "$arch" in |
---|
972 | Linux ) |
---|
973 | ;; |
---|
974 | GNU/* ) |
---|
975 | ;; |
---|
976 | *BSD ) |
---|
977 | ;; |
---|
978 | Darwin ) |
---|
979 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
980 | ;; |
---|
981 | IRIX ) |
---|
982 | ;; |
---|
983 | SunOS ) |
---|
984 | echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings |
---|
985 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
986 | echo '#define NO_FD_PASSING' >> config.h |
---|
987 | if [ "$arch_rel" = "5.10" ]; then |
---|
988 | echo '#define NO_STRCASESTR' >> config.h |
---|
989 | fi |
---|
990 | ;; |
---|
991 | AIX ) |
---|
992 | echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings |
---|
993 | ;; |
---|
994 | CYGWIN* ) |
---|
995 | echo 'EFLAGS+=-Wl,--export-all,--out-implib,libbitlbee.dll.a' >> Makefile.settings |
---|
996 | echo 'IMPLIB=libbitlbee.dll.a' >> Makefile.settings |
---|
997 | ;; |
---|
998 | Windows ) |
---|
999 | echo 'Native windows compilation is not supported anymore, use cygwin instead.' |
---|
1000 | ;; |
---|
1001 | * ) |
---|
1002 | echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.' |
---|
1003 | echo 'Please report any problems at http://bugs.bitlbee.org/.' |
---|
1004 | ;; |
---|
1005 | esac |
---|
1006 | |
---|
1007 | if [ -n "$target" ]; then |
---|
1008 | echo "Cross-compiling for: $target" |
---|
1009 | fi |
---|
1010 | |
---|
1011 | echo |
---|
1012 | echo 'Configuration done:' |
---|
1013 | |
---|
1014 | if [ "$debug" = "1" ]; then |
---|
1015 | echo ' Debugging enabled.' |
---|
1016 | else |
---|
1017 | echo ' Debugging disabled.' |
---|
1018 | fi |
---|
1019 | |
---|
1020 | if [ "$asan" = "1" ]; then |
---|
1021 | echo ' AddressSanitizer (ASAN) enabled.' |
---|
1022 | else |
---|
1023 | echo ' AddressSanitizer (ASAN) disabled.' |
---|
1024 | fi |
---|
1025 | |
---|
1026 | if [ "$pie" = "1" ]; then |
---|
1027 | echo ' Building PIE executable' |
---|
1028 | else |
---|
1029 | echo ' Building non-PIE executable' |
---|
1030 | fi |
---|
1031 | |
---|
1032 | if [ "$strip" = "1" ]; then |
---|
1033 | echo ' Binary stripping enabled.' |
---|
1034 | else |
---|
1035 | echo ' Binary stripping disabled.' |
---|
1036 | fi |
---|
1037 | |
---|
1038 | if [ "$otr" = "1" ]; then |
---|
1039 | echo ' Off-the-Record (OTR) Messaging enabled.' |
---|
1040 | elif [ "$otr" = "plugin" ]; then |
---|
1041 | echo ' Off-the-Record (OTR) Messaging enabled (as a plugin).' |
---|
1042 | else |
---|
1043 | echo ' Off-the-Record (OTR) Messaging disabled.' |
---|
1044 | fi |
---|
1045 | |
---|
1046 | if [ "$systemd" = "1" ]; then |
---|
1047 | echo ' systemd enabled.' |
---|
1048 | else |
---|
1049 | echo ' systemd disabled.' |
---|
1050 | fi |
---|
1051 | |
---|
1052 | echo ' Using python: '$PYTHON |
---|
1053 | |
---|
1054 | if [ "$external_json_parser" = "1" ]; then |
---|
1055 | echo ' Using system JSON parser.' |
---|
1056 | else |
---|
1057 | echo ' Using bundled JSON parser.' |
---|
1058 | fi |
---|
1059 | |
---|
1060 | echo ' Using event handler: '$events |
---|
1061 | echo ' Using SSL library: '$ssl |
---|
1062 | #echo ' Building with these storage backends: '$STORAGES |
---|
1063 | |
---|
1064 | if [ -n "$protocols" ]; then |
---|
1065 | echo ' Building with these protocols:' $protocols$protocols_mods |
---|
1066 | case "$protocols" in |
---|
1067 | *purple*) |
---|
1068 | echo " Note that BitlBee-libpurple is supported on a best-effort basis. It's" |
---|
1069 | echo " not *fully* compatible with normal BitlBee. Don't use it unless you" |
---|
1070 | echo " absolutely need it (i.e. support for a certain protocol or feature)." |
---|
1071 | esac |
---|
1072 | else |
---|
1073 | echo ' Building without IM-protocol support. We wish you a lot of fun...' |
---|
1074 | fi |
---|