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