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/sbin/' |
---|
12 | etcdir='$prefix/etc/bitlbee/' |
---|
13 | mandir='$prefix/share/man/' |
---|
14 | datadir='$prefix/share/bitlbee/' |
---|
15 | config='/var/lib/bitlbee/' |
---|
16 | plugindir='$prefix/lib/bitlbee/' |
---|
17 | includedir='$prefix/include/bitlbee/' |
---|
18 | libevent='/usr/' |
---|
19 | pidfile='/var/run/bitlbee.pid' |
---|
20 | ipcsocket='/var/run/bitlbee.sock' |
---|
21 | pcdir='$prefix/lib/pkgconfig' |
---|
22 | systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64" |
---|
23 | |
---|
24 | msn=1 |
---|
25 | jabber=1 |
---|
26 | oscar=1 |
---|
27 | yahoo=1 |
---|
28 | |
---|
29 | debug=0 |
---|
30 | strip=1 |
---|
31 | gcov=0 |
---|
32 | plugins=1 |
---|
33 | |
---|
34 | events=glib |
---|
35 | ldap=0 |
---|
36 | ssl=auto |
---|
37 | |
---|
38 | arch=`uname -s` |
---|
39 | cpu=`uname -m` |
---|
40 | |
---|
41 | GLIB_MIN_VERSION=2.4 |
---|
42 | |
---|
43 | echo BitlBee configure |
---|
44 | |
---|
45 | while [ -n "$1" ]; do |
---|
46 | e="`expr "X$1" : 'X--\(.*=.*\)'`" |
---|
47 | if [ -z "$e" ]; then |
---|
48 | cat<<EOF |
---|
49 | |
---|
50 | Usage: $0 [OPTIONS] |
---|
51 | |
---|
52 | Option Description Default |
---|
53 | |
---|
54 | --prefix=... Directories to put files in $prefix |
---|
55 | --bindir=... $bindir |
---|
56 | --etcdir=... $etcdir |
---|
57 | --mandir=... $mandir |
---|
58 | --datadir=... $datadir |
---|
59 | --plugindir=... $plugindir |
---|
60 | --pidfile=... $pidfile |
---|
61 | --config=... $config |
---|
62 | --ipcsocket=... $ipcsocket |
---|
63 | |
---|
64 | --msn=0/1 Disable/enable MSN part $msn |
---|
65 | --jabber=0/1 Disable/enable Jabber part $jabber |
---|
66 | --oscar=0/1 Disable/enable Oscar part (ICQ, AIM) $oscar |
---|
67 | --yahoo=0/1 Disable/enable Yahoo part $yahoo |
---|
68 | |
---|
69 | --debug=0/1 Disable/enable debugging $debug |
---|
70 | --strip=0/1 Disable/enable binary stripping $strip |
---|
71 | --gcov=0/1 Disable/enable test coverage reporting $gcov |
---|
72 | --plugins=0/1 Disable/enable plugins support $plugins |
---|
73 | |
---|
74 | --events=... Event handler (glib, libevent) $events |
---|
75 | --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto) |
---|
76 | $ssl |
---|
77 | |
---|
78 | --target=... Cross compilation target same as host |
---|
79 | EOF |
---|
80 | exit; |
---|
81 | fi |
---|
82 | eval "$e" |
---|
83 | shift; |
---|
84 | done |
---|
85 | |
---|
86 | # Expand $prefix and get rid of double slashes |
---|
87 | bindir=`eval echo "$bindir/" | sed 's/\/\{1,\}/\//g'` |
---|
88 | etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'` |
---|
89 | mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'` |
---|
90 | datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'` |
---|
91 | config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'` |
---|
92 | plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'` |
---|
93 | includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'` |
---|
94 | libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'` |
---|
95 | |
---|
96 | pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'` |
---|
97 | ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'` |
---|
98 | pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'` |
---|
99 | |
---|
100 | cat<<EOF>Makefile.settings |
---|
101 | ## BitlBee settings, generated by configure |
---|
102 | PREFIX=$prefix |
---|
103 | BINDIR=$bindir |
---|
104 | ETCDIR=$etcdir |
---|
105 | MANDIR=$mandir |
---|
106 | DATADIR=$datadir |
---|
107 | PLUGINDIR=$plugindir |
---|
108 | CONFIG=$config |
---|
109 | INCLUDEDIR=$includedir |
---|
110 | PCDIR=$pcdir |
---|
111 | |
---|
112 | TARGET=$target |
---|
113 | ARCH=$arch |
---|
114 | CPU=$cpu |
---|
115 | |
---|
116 | DESTDIR= |
---|
117 | LFLAGS= |
---|
118 | EFLAGS= |
---|
119 | EOF |
---|
120 | |
---|
121 | cat<<EOF>config.h |
---|
122 | /* BitlBee settings, generated by configure |
---|
123 | |
---|
124 | Do *NOT* use any of these defines in your code without thinking twice, most |
---|
125 | of them can/will be overridden at run-time */ |
---|
126 | |
---|
127 | #define CONFIG "$config" |
---|
128 | #define ETCDIR "$etcdir" |
---|
129 | #define VARDIR "$datadir" |
---|
130 | #define PLUGINDIR "$plugindir" |
---|
131 | #define PIDFILE "$pidfile" |
---|
132 | #define IPCSOCKET "$ipcsocket" |
---|
133 | #define ARCH "$arch" |
---|
134 | #define CPU "$cpu" |
---|
135 | EOF |
---|
136 | |
---|
137 | |
---|
138 | |
---|
139 | if [ -n "$target" ]; then |
---|
140 | PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig |
---|
141 | export PKG_CONFIG_LIBDIR |
---|
142 | PATH=/usr/$target/bin:$PATH |
---|
143 | CC=$target-cc |
---|
144 | LD=$target-ld |
---|
145 | systemlibdirs="/usr/$target/lib" |
---|
146 | fi |
---|
147 | |
---|
148 | |
---|
149 | if [ "$debug" = "1" ]; then |
---|
150 | [ -z "$CFLAGS" ] && CFLAGS=-g |
---|
151 | echo 'DEBUG=1' >> Makefile.settings |
---|
152 | CFLAGS="$CFLAGS -DDEBUG" |
---|
153 | else |
---|
154 | [ -z "$CFLAGS" ] && CFLAGS="-O2 -fno-strict-aliasing" |
---|
155 | fi |
---|
156 | |
---|
157 | echo CFLAGS=$CFLAGS >> Makefile.settings |
---|
158 | echo CFLAGS+=-I`pwd` -I`pwd`/lib -I`pwd`/protocols -I. >> Makefile.settings |
---|
159 | |
---|
160 | echo CFLAGS+=-DHAVE_CONFIG_H >> Makefile.settings |
---|
161 | |
---|
162 | if [ -n "$CC" ]; then |
---|
163 | CC=$CC |
---|
164 | elif type gcc > /dev/null 2> /dev/null; then |
---|
165 | CC=gcc |
---|
166 | elif type cc > /dev/null 2> /dev/null; then |
---|
167 | CC=cc |
---|
168 | else |
---|
169 | echo 'Cannot find a C compiler, aborting.' |
---|
170 | exit 1; |
---|
171 | fi |
---|
172 | |
---|
173 | echo "CC=$CC" >> Makefile.settings; |
---|
174 | |
---|
175 | if [ -z "$LD" ]; then |
---|
176 | if type ld > /dev/null 2> /dev/null; then |
---|
177 | LD=ld |
---|
178 | else |
---|
179 | echo 'Cannot find ld, aborting.' |
---|
180 | exit 1; |
---|
181 | fi |
---|
182 | fi |
---|
183 | |
---|
184 | echo "LD=$LD" >> Makefile.settings |
---|
185 | |
---|
186 | if [ -z "$PKG_CONFIG" ]; then |
---|
187 | PKG_CONFIG=pkg-config |
---|
188 | fi |
---|
189 | |
---|
190 | if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then |
---|
191 | if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then |
---|
192 | cat<<EOF>>Makefile.settings |
---|
193 | EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0` |
---|
194 | CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0` |
---|
195 | EOF |
---|
196 | else |
---|
197 | echo |
---|
198 | echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.' |
---|
199 | exit 1 |
---|
200 | fi |
---|
201 | else |
---|
202 | echo |
---|
203 | echo 'Cannot find glib2 development libraries, aborting. (Install libglib2-dev?)' |
---|
204 | exit 1 |
---|
205 | fi |
---|
206 | |
---|
207 | if [ "$events" = "libevent" ]; then |
---|
208 | if ! [ -f "${libevent}include/event.h" ]; then |
---|
209 | echo |
---|
210 | echo 'Warning: Could not find event.h, you might have to install it and/or specify' |
---|
211 | echo 'its location using the --libevent= argument. (Example: If event.h is in' |
---|
212 | echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)' |
---|
213 | fi |
---|
214 | |
---|
215 | echo '#define EVENTS_LIBEVENT' >> config.h |
---|
216 | cat <<EOF>>Makefile.settings |
---|
217 | EFLAGS+=-levent -L${libevent}lib |
---|
218 | CFLAGS+=-I${libevent}include |
---|
219 | EOF |
---|
220 | elif [ "$events" = "glib" ]; then |
---|
221 | ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...): |
---|
222 | echo '#define EVENTS_GLIB' >> config.h |
---|
223 | else |
---|
224 | echo |
---|
225 | echo 'ERROR: Unknown event handler specified.' |
---|
226 | exit 1 |
---|
227 | fi |
---|
228 | echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings |
---|
229 | |
---|
230 | detect_gnutls() |
---|
231 | { |
---|
232 | if $PKG_CONFIG --exists gnutls; then |
---|
233 | cat <<EOF>>Makefile.settings |
---|
234 | EFLAGS+=`$PKG_CONFIG --libs gnutls` |
---|
235 | CFLAGS+=`$PKG_CONFIG --cflags gnutls` |
---|
236 | EOF |
---|
237 | ssl=gnutls |
---|
238 | ret=1 |
---|
239 | elif libgnutls-config --version > /dev/null 2> /dev/null; then |
---|
240 | cat <<EOF>>Makefile.settings |
---|
241 | EFLAGS+=`libgnutls-config --libs` |
---|
242 | CFLAGS+=`libgnutls-config --cflags` |
---|
243 | EOF |
---|
244 | |
---|
245 | ssl=gnutls |
---|
246 | ret=1; |
---|
247 | else |
---|
248 | ret=0; |
---|
249 | fi; |
---|
250 | } |
---|
251 | |
---|
252 | detect_nss() |
---|
253 | { |
---|
254 | if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG mozilla-nss; then |
---|
255 | cat<<EOF>>Makefile.settings |
---|
256 | EFLAGS+=`$PKG_CONFIG --libs mozilla-nss` |
---|
257 | CFLAGS+=`$PKG_CONFIG --cflags mozilla-nss` |
---|
258 | EOF |
---|
259 | |
---|
260 | ssl=nss |
---|
261 | ret=1; |
---|
262 | else |
---|
263 | ret=0; |
---|
264 | fi; |
---|
265 | } |
---|
266 | |
---|
267 | detect_ldap() |
---|
268 | { |
---|
269 | TMPFILE=$(mktemp) |
---|
270 | if $CC -o $TMPFILE -shared -lldap 2>/dev/null >/dev/null; then |
---|
271 | cat<<EOF>>Makefile.settings |
---|
272 | EFLAGS+=-lldap |
---|
273 | CFLAGS+= |
---|
274 | EOF |
---|
275 | ldap=1 |
---|
276 | rm -f $TMPFILE |
---|
277 | ret=1 |
---|
278 | else |
---|
279 | ldap=0 |
---|
280 | ret=0 |
---|
281 | fi |
---|
282 | } |
---|
283 | |
---|
284 | RESOLV_TESTCODE=' |
---|
285 | #include <arpa/nameser.h> |
---|
286 | #include <resolv.h> |
---|
287 | |
---|
288 | int main() |
---|
289 | { |
---|
290 | ns_initparse( NULL, 0, NULL ); |
---|
291 | ns_parserr( NULL, ns_s_an, 0, NULL ); |
---|
292 | } |
---|
293 | ' |
---|
294 | |
---|
295 | detect_resolv_dynamic() |
---|
296 | { |
---|
297 | TMPFILE=$(mktemp) |
---|
298 | ret=1 |
---|
299 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -lresolv >/dev/null 2>/dev/null |
---|
300 | if [ "$?" = "0" ]; then |
---|
301 | echo 'EFLAGS+=-lresolv' >> Makefile.settings |
---|
302 | ret=0 |
---|
303 | fi |
---|
304 | |
---|
305 | rm -f $TMPFILE |
---|
306 | return $ret |
---|
307 | } |
---|
308 | |
---|
309 | detect_resolv_static() |
---|
310 | { |
---|
311 | TMPFILE=$(mktemp) |
---|
312 | ret=1 |
---|
313 | for i in $systemlibdirs; do |
---|
314 | if [ -f $i/libresolv.a ]; then |
---|
315 | echo "$RESOLV_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null |
---|
316 | if [ "$?" = "0" ]; then |
---|
317 | echo 'EFLAGS+='$i'/libresolv.a' >> Makefile.settings |
---|
318 | ret=0 |
---|
319 | fi |
---|
320 | fi |
---|
321 | done |
---|
322 | |
---|
323 | rm -f $TMPFILE |
---|
324 | return $ret |
---|
325 | } |
---|
326 | |
---|
327 | if [ "$ssl" = "auto" ]; then |
---|
328 | detect_gnutls |
---|
329 | if [ "$ret" = "0" ]; then |
---|
330 | detect_nss |
---|
331 | fi |
---|
332 | elif [ "$ssl" = "gnutls" ]; then |
---|
333 | detect_gnutls |
---|
334 | elif [ "$ssl" = "nss" ]; then |
---|
335 | detect_nss |
---|
336 | elif [ "$ssl" = "sspi" ]; then |
---|
337 | echo |
---|
338 | elif [ "$ssl" = "openssl" ]; then |
---|
339 | echo |
---|
340 | echo 'No detection code exists for OpenSSL. Make sure that you have a complete' |
---|
341 | echo 'install of OpenSSL (including devel/header files) before reporting' |
---|
342 | echo 'compilation problems.' |
---|
343 | echo |
---|
344 | echo 'Also, keep in mind that the OpenSSL is, according to some people, not' |
---|
345 | echo 'completely GPL-compatible. Using GnuTLS or NSS is recommended and better' |
---|
346 | echo 'supported by us. However, on many BSD machines, OpenSSL can be considered' |
---|
347 | echo 'part of the operating system, which makes it GPL-compatible.' |
---|
348 | echo |
---|
349 | echo 'For more info, see: http://www.openssl.org/support/faq.html#LEGAL2' |
---|
350 | echo ' http://www.gnome.org/~markmc/openssl-and-the-gpl.html' |
---|
351 | echo |
---|
352 | echo 'Please note that distributing a BitlBee binary which links to OpenSSL is' |
---|
353 | echo 'probably illegal. If you want to create and distribute a binary BitlBee' |
---|
354 | echo 'package, you really should use GnuTLS or NSS instead.' |
---|
355 | echo |
---|
356 | echo 'Also, the OpenSSL license requires us to say this:' |
---|
357 | echo ' * "This product includes software developed by the OpenSSL Project' |
---|
358 | echo ' * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"' |
---|
359 | |
---|
360 | echo 'EFLAGS+=-lssl -lcrypto' >> Makefile.settings |
---|
361 | |
---|
362 | ret=1 |
---|
363 | elif [ "$ssl" = "bogus" ]; then |
---|
364 | echo |
---|
365 | echo 'Using bogus SSL code. This means some features will not work properly.' |
---|
366 | |
---|
367 | ## Yes, you, at the console! How can you authenticate if you don't have any SSL!? |
---|
368 | if [ "$msn" = "1" -o "$yahoo" = "1" ]; then |
---|
369 | echo |
---|
370 | echo 'WARNING: The MSN and Yahoo! modules will not work without SSL. Disabling.' |
---|
371 | msn=0 |
---|
372 | yahoo=0 |
---|
373 | fi |
---|
374 | |
---|
375 | ret=1 |
---|
376 | else |
---|
377 | echo |
---|
378 | echo 'ERROR: Unknown SSL library specified.' |
---|
379 | exit 1 |
---|
380 | fi |
---|
381 | |
---|
382 | if [ "$ret" = "0" ]; then |
---|
383 | echo |
---|
384 | echo 'ERROR: Could not find a suitable SSL library (GnuTLS, libnss or OpenSSL).' |
---|
385 | echo ' Please note that this script doesn'\''t have detection code for OpenSSL,' |
---|
386 | echo ' so if you want to use that, you have to select it by hand. If you don'\''t' |
---|
387 | echo ' need SSL support, you can select the "bogus" SSL library. (--ssl=bogus)' |
---|
388 | |
---|
389 | exit 1 |
---|
390 | fi; |
---|
391 | |
---|
392 | echo 'SSL_CLIENT=ssl_'$ssl'.o' >> Makefile.settings |
---|
393 | |
---|
394 | if detect_resolv_dynamic || detect_resolv_static; then |
---|
395 | echo '#define HAVE_RESOLV_A' >> config.h |
---|
396 | fi |
---|
397 | |
---|
398 | STORAGES="xml" |
---|
399 | |
---|
400 | if [ "$ldap" = "auto" ]; then |
---|
401 | detect_ldap |
---|
402 | fi |
---|
403 | |
---|
404 | if [ "$ldap" = 0 ]; then |
---|
405 | echo "#undef WITH_LDAP" >> config.h |
---|
406 | elif [ "$ldap" = 1 ]; then |
---|
407 | echo |
---|
408 | echo 'LDAP support is a work in progress and does NOT work AT ALL right now.' |
---|
409 | echo |
---|
410 | exit 1 |
---|
411 | |
---|
412 | echo "#define WITH_LDAP 1" >> config.h |
---|
413 | STORAGES="$STORAGES ldap" |
---|
414 | fi |
---|
415 | |
---|
416 | for i in $STORAGES; do |
---|
417 | STORAGE_OBJS="$STORAGE_OBJS storage_$i.o" |
---|
418 | done |
---|
419 | echo "STORAGE_OBJS="$STORAGE_OBJS >> Makefile.settings |
---|
420 | |
---|
421 | if [ "$strip" = 0 ]; then |
---|
422 | echo "STRIP=\# skip strip" >> Makefile.settings; |
---|
423 | else |
---|
424 | if [ "$debug" = 1 ]; then |
---|
425 | echo |
---|
426 | echo 'Stripping binaries does not make sense when debugging. Stripping disabled.' |
---|
427 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
428 | strip=0; |
---|
429 | elif [ -n "$STRIP" ]; then |
---|
430 | echo "STRIP=$STRIP" >> Makefile.settings; |
---|
431 | elif type strip > /dev/null 2> /dev/null; then |
---|
432 | echo "STRIP=strip" >> Makefile.settings; |
---|
433 | else |
---|
434 | echo |
---|
435 | echo 'No strip utility found, cannot remove unnecessary parts from executable.' |
---|
436 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
437 | strip=0; |
---|
438 | fi; |
---|
439 | fi |
---|
440 | |
---|
441 | if [ "$gcov" = "1" ]; then |
---|
442 | echo "CFLAGS+=--coverage" >> Makefile.settings |
---|
443 | echo "EFLAGS+=--coverage" >> Makefile.settings |
---|
444 | fi |
---|
445 | |
---|
446 | if [ "$plugins" = 0 ]; then |
---|
447 | echo '#undef WITH_PLUGINS' >> config.h |
---|
448 | else |
---|
449 | echo '#define WITH_PLUGINS' >> config.h |
---|
450 | fi |
---|
451 | |
---|
452 | if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then |
---|
453 | echo |
---|
454 | echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' |
---|
455 | echo 'Install xmlto if you want online help to work.' |
---|
456 | fi |
---|
457 | |
---|
458 | echo |
---|
459 | if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then |
---|
460 | nick=`bzr nick` |
---|
461 | if [ -n "$nick" -a "$nick" != "bitlbee" ]; then |
---|
462 | nick="-$nick" |
---|
463 | else |
---|
464 | nick="" |
---|
465 | fi |
---|
466 | rev=`bzr revno` |
---|
467 | echo 'Using bzr revision #'$rev' as version number' |
---|
468 | BITLBEE_VERSION=\"bzr$nick-$rev\" |
---|
469 | fi |
---|
470 | |
---|
471 | if [ -n "$BITLBEE_VERSION" ]; then |
---|
472 | echo 'Spoofing version number: '$BITLBEE_VERSION |
---|
473 | echo '#undef BITLBEE_VERSION' >> config.h |
---|
474 | echo '#define BITLBEE_VERSION '$BITLBEE_VERSION >> config.h |
---|
475 | echo |
---|
476 | fi |
---|
477 | |
---|
478 | cat <<EOF>bitlbee.pc |
---|
479 | prefix=$prefix |
---|
480 | includedir=$includedir |
---|
481 | |
---|
482 | Name: bitlbee |
---|
483 | Description: IRC to IM gateway |
---|
484 | Requires: glib-2.0 |
---|
485 | Version: $BITLBEE_VERSION |
---|
486 | Libs: |
---|
487 | Cflags: -I\${includedir} |
---|
488 | |
---|
489 | EOF |
---|
490 | |
---|
491 | protocols='' |
---|
492 | protoobjs='' |
---|
493 | |
---|
494 | if [ "$msn" = 0 ]; then |
---|
495 | echo '#undef WITH_MSN' >> config.h |
---|
496 | else |
---|
497 | echo '#define WITH_MSN' >> config.h |
---|
498 | protocols=$protocols'msn ' |
---|
499 | protoobjs=$protoobjs'msn_mod.o ' |
---|
500 | fi |
---|
501 | |
---|
502 | if [ "$jabber" = 0 ]; then |
---|
503 | echo '#undef WITH_JABBER' >> config.h |
---|
504 | else |
---|
505 | echo '#define WITH_JABBER' >> config.h |
---|
506 | protocols=$protocols'jabber ' |
---|
507 | protoobjs=$protoobjs'jabber_mod.o ' |
---|
508 | fi |
---|
509 | |
---|
510 | if [ "$oscar" = 0 ]; then |
---|
511 | echo '#undef WITH_OSCAR' >> config.h |
---|
512 | else |
---|
513 | echo '#define WITH_OSCAR' >> config.h |
---|
514 | protocols=$protocols'oscar ' |
---|
515 | protoobjs=$protoobjs'oscar_mod.o ' |
---|
516 | fi |
---|
517 | |
---|
518 | if [ "$yahoo" = 0 ]; then |
---|
519 | echo '#undef WITH_YAHOO' >> config.h |
---|
520 | else |
---|
521 | echo '#define WITH_YAHOO' >> config.h |
---|
522 | protocols=$protocols'yahoo ' |
---|
523 | protoobjs=$protoobjs'yahoo_mod.o ' |
---|
524 | fi |
---|
525 | |
---|
526 | if [ "$protocols" = "PROTOCOLS = " ]; then |
---|
527 | echo "Warning: You haven't selected any communication protocol to compile!" |
---|
528 | echo " BitlBee will run, but you will be unable to connect to IM servers!" |
---|
529 | fi |
---|
530 | |
---|
531 | echo "PROTOCOLS = $protocols" >> Makefile.settings |
---|
532 | echo "PROTOOBJS = $protoobjs" >> Makefile.settings |
---|
533 | |
---|
534 | echo Architecture: $arch |
---|
535 | case "$arch" in |
---|
536 | Linux ) |
---|
537 | ;; |
---|
538 | GNU/* ) |
---|
539 | ;; |
---|
540 | *BSD ) |
---|
541 | ;; |
---|
542 | Darwin ) |
---|
543 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
544 | ;; |
---|
545 | IRIX ) |
---|
546 | ;; |
---|
547 | SunOS ) |
---|
548 | echo 'EFLAGS+=-lresolv -lnsl -lsocket' >> Makefile.settings |
---|
549 | echo 'STRIP=\# skip strip' >> Makefile.settings |
---|
550 | ;; |
---|
551 | AIX ) |
---|
552 | echo 'EFLAGS+=-Wl,-brtl' >> Makefile.settings |
---|
553 | ;; |
---|
554 | CYGWIN* ) |
---|
555 | echo 'Cygwin is not officially supported.' |
---|
556 | ;; |
---|
557 | Windows ) |
---|
558 | ;; |
---|
559 | * ) |
---|
560 | echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.' |
---|
561 | echo 'Please report any problems at http://bugs.bitlbee.org/.' |
---|
562 | ;; |
---|
563 | esac |
---|
564 | |
---|
565 | if [ -n "$target" ]; then |
---|
566 | echo "Cross-compiling for: $target" |
---|
567 | fi |
---|
568 | |
---|
569 | echo |
---|
570 | echo 'Configuration done:' |
---|
571 | |
---|
572 | if [ "$debug" = "1" ]; then |
---|
573 | echo ' Debugging enabled.' |
---|
574 | else |
---|
575 | echo ' Debugging disabled.' |
---|
576 | fi |
---|
577 | |
---|
578 | if [ "$strip" = "1" ]; then |
---|
579 | echo ' Binary stripping enabled.' |
---|
580 | else |
---|
581 | echo ' Binary stripping disabled.' |
---|
582 | fi |
---|
583 | |
---|
584 | echo ' Using event handler: '$events |
---|
585 | echo ' Using SSL library: '$ssl |
---|
586 | echo ' Building with these storage backends: '$STORAGES |
---|
587 | |
---|
588 | if [ -n "$protocols" ]; then |
---|
589 | echo ' Building with these protocols:' $protocols |
---|
590 | else |
---|
591 | echo ' Building without IM-protocol support. We wish you a lot of fun...' |
---|
592 | fi |
---|