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