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