Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r0a69d7b r85cf37f  
    1414datadir='$prefix/share/bitlbee/'
    1515config='/var/lib/bitlbee/'
     16plugindir='$prefix/lib/bitlbee/'
     17includedir='$prefix/include/bitlbee/'
     18libevent='/usr/'
    1619pidfile='/var/run/bitlbee.pid'
    1720ipcsocket='/var/run/bitlbee'
    18 plugindir='$prefix/lib/bitlbee'
    1921pcdir='$prefix/lib/pkgconfig'
    20 includedir='$prefix/include/bitlbee'
    2122
    2223msn=1
     
    2829strip=1
    2930ipv6=1
     31
     32events=glib
    3033ssl=auto
    3134
     
    6467--ipv6=0/1      IPv6 socket support                     $ipv6
    6568
     69--events=...    Event handler (glib, libevent)          $events
    6670--ssl=...       SSL library to use (gnutls, nss, openssl, bogus, auto)
    6771                                                        $ssl
     
    8084config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'`
    8185plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'`
     86includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'`
     87libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'`
     88
    8289pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'`
    8390ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'`
    84 includedir=`eval echo "$includedir" | sed 's/\/\{1,\}/\//g'`
    8591pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'`
    8692
     
    163169fi
    164170
    165 GLIB=0
    166 
    167171if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG glib-2.0; then
    168172        cat<<EOF>>Makefile.settings
     
    171175EOF
    172176        echo '#define GLIB2' >> config.h
    173         GLIB=2
    174177elif type glib-config > /dev/null 2> /dev/null; then
    175178        cat<<EOF>>Makefile.settings
     
    178181EOF
    179182        echo '#define GLIB1' >> config.h
    180         GLIB=1
    181183else
    182184        echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
     
    184186fi
    185187
    186 if [ GLIB = 1 -o -r /usr/include/iconv.h ]; then
     188if [ -r /usr/include/iconv.h ]; then
    187189        :;
    188190elif [ -r /usr/local/include/iconv.h ]; then
    189         echo CFLAGS+=-I/usr/local/include >> Makefile.settings;
     191        echo CFLAGS+=-I/usr/local/include >> Makefile.settings
    190192else
    191193        echo
    192194        echo 'Warning: Could not find iconv.h, you might have to install it and/or modify'
    193         echo 'Makefile.settings to tell where this file is.';
    194 fi
     195        echo 'Makefile.settings to tell where this file is.'
     196fi
     197
     198
     199if [ "$events" = "libevent" ]; then
     200        if ! [ -e "${libevent}include/event.h" ]; then
     201                echo
     202                echo 'Warning: Could not find event.h, you might have to install it and/or specify'
     203                echo 'its location using the --libevent= argument. (Example: If event.h is in'
     204                echo '/usr/local/include and binaries are in /usr/local/lib: --libevent=/usr/local)'
     205        fi
     206       
     207        echo '#define EVENTS_LIBEVENT' >> config.h
     208        cat <<EOF>>Makefile.settings
     209EFLAGS+=-levent -L${libevent}lib
     210CFLAGS+=-I${libevent}include
     211EOF
     212elif [ "$events" = "glib" ]; then
     213        ## We already use glib anyway, so this is all we need (and in fact not even this, but just to be sure...):
     214        echo '#define EVENTS_GLIB' >> config.h
     215else
     216        echo
     217        echo 'ERROR: Unknown event handler specified.'
     218        exit 1
     219fi
     220echo 'EVENT_HANDLER=events_'$events'.o' >> Makefile.settings
    195221
    196222
     
    426452fi
    427453
    428 if [ "$msn" = "1" ]; then
    429         echo '  Using SSL library: '$ssl;
    430 fi
     454echo '  Using event handler: '$events;
     455echo '  Using SSL library: '$ssl;
    431456
    432457#if [ "$flood" = "0" ]; then
Note: See TracChangeset for help on using the changeset viewer.