diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-05-19 09:48:30 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-05-19 09:48:30 +0200 | 
| commit | ac83732afa83f21915e536c5c6f29f033f8623a3 (patch) | |
| tree | 8aa4206d613c1ca9ea483f3b380a8af6867b6441 | |
| parent | af9980f76b1f79aab90addc0228417093993e96b (diff) | |
| parent | c2ee85ca305873302588224e14d200ca3dcd3057 (diff) | |
Merging --events=
| -rwxr-xr-x | configure | 45 | ||||
| -rw-r--r-- | protocols/Makefile | 3 | 
2 files changed, 38 insertions, 10 deletions
| @@ -13,11 +13,12 @@ etcdir='$prefix/etc/bitlbee/'  mandir='$prefix/share/man/'  datadir='$prefix/share/bitlbee/'  config='/var/lib/bitlbee/' +plugindir='$prefix/lib/bitlbee/' +includedir='$prefix/include/bitlbee/' +libevent='/usr/'  pidfile='/var/run/bitlbee.pid'  ipcsocket='/var/run/bitlbee' -plugindir='$prefix/lib/bitlbee'  pcdir='$prefix/lib/pkgconfig' -includedir='$prefix/include/bitlbee'  msn=1  jabber=1 @@ -27,6 +28,8 @@ yahoo=1  debug=0  strip=1  ipv6=1 + +events=glib  ssl=auto  arch=`uname -s` @@ -63,6 +66,7 @@ Option		Description				Default  --ipv6=0/1	IPv6 socket support			$ipv6 +--events=...	Event handler (glib, libevent)		$events  --ssl=...	SSL library to use (gnutls, nss, openssl, bogus, auto)  							$ssl  EOF @@ -79,9 +83,11 @@ mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'`  datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'`  config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'`  plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'` +includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'` +libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'` +  pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'`  ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'` -includedir=`eval echo "$includedir" | sed 's/\/\{1,\}/\//g'`  pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'`  cat<<EOF>Makefile.settings @@ -182,12 +188,36 @@ fi  if [ -r /usr/include/iconv.h ]; then  	:;  elif [ -r /usr/local/include/iconv.h ]; then -	echo CFLAGS+=-I/usr/local/include >> Makefile.settings; +	echo CFLAGS+=-I/usr/local/include >> Makefile.settings  else  	echo  	echo 'Warning: Could not find iconv.h, you might have to install it and/or modify' -	echo 'Makefile.settings to tell where this file is.'; +	echo 'Makefile.settings to tell where this file is.' +fi + + +if [ "$events" = "libevent" ]; then +	if ! [ -e "${libevent}include/event.h" ]; then +		echo +		echo 'Warning: Could not find event.h, you might have to install it and/or specify' +		echo 'its location using the --libevent= argument. (Example: If event.h is in' +		echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)' +	fi +	 +	echo '#define EVENTS_LIBEVENT' >> config.h +	cat <<EOF>>Makefile.settings +EFLAGS+=-levent -L${libevent}lib +CFLAGS+=-I${libevent}include +EOF +elif [ "$events" = "glib" ]; then +	## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...): +	echo '#define EVENTS_GLIB' >> config.h +else +	echo +	echo 'ERROR: Unknown event handler specified.' +	exit 1  fi +echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings  detect_gnutls() @@ -421,9 +451,8 @@ else  	echo '  Binary stripping disabled.';  fi -if [ "$msn" = "1" ]; then -	echo '  Using SSL library: '$ssl; -fi +echo '  Using event handler: '$events; +echo '  Using SSL library: '$ssl;  #if [ "$flood" = "0" ]; then  #	echo '  Flood protection disabled.'; diff --git a/protocols/Makefile b/protocols/Makefile index 4f61d6e4..b74212f4 100644 --- a/protocols/Makefile +++ b/protocols/Makefile @@ -9,8 +9,7 @@  -include ../Makefile.settings  # [SH] Program variables -objects = events_libevent.o http_client.o md5.o nogaim.o proxy.o sha.o $(SSL_CLIENT) -#objects = events_glib.o http_client.o md5.o nogaim.o proxy.o sha.o $(SSL_CLIENT) +objects = $(EVENT_HANDLER) http_client.o md5.o nogaim.o proxy.o sha.o $(SSL_CLIENT)  # [SH] The next two lines should contain the directory name (in $(subdirs))  #      and the name of the object file, which should be linked into | 
