Changes in configure [8e5751e:2f8e3ca]
Legend:
- Unmodified
- Added
- Removed
-
configure
r8e5751e r2f8e3ca 16 16 config='/var/lib/bitlbee/' 17 17 plugindir='$prefix/lib/bitlbee/' 18 rpcplugindir='$plugindir/rpc/'19 18 includedir='$prefix/include/bitlbee/' 20 19 systemdsystemunitdir='' … … 24 23 pcdir='$prefix/lib/pkgconfig' 25 24 systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib" 25 sysroot='' 26 27 configure_args="$@" 26 28 27 29 # Set these to default-on to let it be overriden by either the user or purple … … 37 39 twitter=1 38 40 purple=0 39 rpc=140 41 41 42 doc=1 … … 53 54 pie=1 54 55 55 arch= `uname -s`56 cpu= `uname -m`56 arch=$(uname -s) 57 cpu=$(uname -m) 57 58 58 59 GLIB_MIN_VERSION=2.16 … … 105 106 106 107 while [ -n "$1" ]; do 107 e=" `expr "X$1" : 'X--\(.*=.*\)'`"108 e="$(expr "X$1" : 'X--\(.*=.*\)')" 108 109 if [ -z "$e" ]; then 109 110 cat<<EOF … … 120 121 --datadir=... $datadir 121 122 --plugindir=... $plugindir 122 --rpcplugindir=... $rpcplugindir123 123 --systemdsystemunitdir=... $systemdsystemunitdir 124 124 --pidfile=... $pidfile … … 133 133 --purple=0/1 Disable/enable libpurple support $purple 134 134 (automatically disables other protocol modules) 135 --rpc=0/1 Disable/enable RPC plugin interface $rpc136 135 137 136 --doc=0/1 Disable/enable help.txt generation $doc … … 153 152 154 153 --target=... Cross compilation target same as host 154 --sysroot=... Cross compilation sysroot $sysroot 155 155 EOF 156 156 exit; … … 161 161 162 162 # Expand $prefix and get rid of double slashes 163 bindir=`eval echo "$bindir/" | sed 's/\/\{1,\}/\//g'` 164 sbindir=`eval echo "$sbindir/" | sed 's/\/\{1,\}/\//g'` 165 etcdir=`eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g'` 166 mandir=`eval echo "$mandir/" | sed 's/\/\{1,\}/\//g'` 167 datadir=`eval echo "$datadir/" | sed 's/\/\{1,\}/\//g'` 168 config=`eval echo "$config/" | sed 's/\/\{1,\}/\//g'` 169 plugindir=`eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g'` 170 rpcplugindir=$(eval echo "$rpcplugindir/" | sed 's/\/\{1,\}/\//g') 171 includedir=`eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g'` 172 libevent=`eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g'` 173 174 pidfile=`eval echo "$pidfile" | sed 's/\/\{1,\}/\//g'` 175 ipcsocket=`eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g'` 176 pcdir=`eval echo "$pcdir" | sed 's/\/\{1,\}/\//g'` 163 bindir=$(eval echo "$bindir/" | sed 's/\/\{1,\}/\//g') 164 sbindir=$(eval echo "$sbindir/" | sed 's/\/\{1,\}/\//g') 165 etcdir=$(eval echo "$etcdir/" | sed 's/\/\{1,\}/\//g') 166 mandir=$(eval echo "$mandir/" | sed 's/\/\{1,\}/\//g') 167 datadir=$(eval echo "$datadir/" | sed 's/\/\{1,\}/\//g') 168 config=$(eval echo "$config/" | sed 's/\/\{1,\}/\//g') 169 plugindir=$(eval echo "$plugindir/" | sed 's/\/\{1,\}/\//g') 170 includedir=$(eval echo "$includedir"/ | sed 's/\/\{1,\}/\//g') 171 libevent=$(eval echo "$libevent"/ | sed 's/\/\{1,\}/\//g') 172 173 pidfile=$(eval echo "$pidfile" | sed 's/\/\{1,\}/\//g') 174 ipcsocket=$(eval echo "$ipcsocket" | sed 's/\/\{1,\}/\//g') 175 pcdir=$(eval echo "$pcdir" | sed 's/\/\{1,\}/\//g') 177 176 178 177 protocols_mods="" … … 180 179 cat <<EOF >Makefile.settings 181 180 ## BitlBee settings, generated by configure 181 182 # ./configure $configure_args 183 182 184 PREFIX=$prefix 183 185 BINDIR=$bindir … … 187 189 DATADIR=$datadir 188 190 PLUGINDIR=$plugindir 189 RPCPLUGINDIR=$rpcplugindir190 191 CONFIG=$config 191 192 INCLUDEDIR=$includedir … … 233 234 of them can/will be overridden at run-time */ 234 235 236 #define BITLBEE_CONFIGURE_ARGS "$configure_args" 237 235 238 #define CONFIG "$config" 236 239 #define ETCDIR "$etcdir" 237 240 #define VARDIR "$datadir" 238 241 #define PLUGINDIR "$plugindir" 239 #define RPCPLUGINDIR "$rpcplugindir"240 242 #define PIDFILE "$pidfile" 241 243 #define IPCSOCKET "$ipcsocket" … … 247 249 248 250 if [ -n "$target" ]; then 249 PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig 250 export PKG_CONFIG_LIBDIR 251 PATH=/usr/$target/bin:$PATH 251 # prepend sysroot to system lib dirs 252 253 systemlibdirs_cross='' 254 for i in $systemlibdirs; do 255 systemlibdirs_cross="$systemlibdirs_cross $sysroot$i" 256 done 257 systemlibdirs=$systemlibdirs_cross 258 unset systemlibdirs_cross 259 260 # backward compatibility 261 262 if [ -z "$PKG_CONFIG_LIBDIR" ]; then 263 PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig 264 export PKG_CONFIG_LIBDIR 265 fi 266 267 if [ -d /usr/$target/bin ]; then 268 PATH=/usr/$target/bin:$PATH 269 fi 270 271 if [ -d /usr/$target/lib ]; then 272 systemlibdirs="$systemlibdirs /usr/$target/lib" 273 fi 274 252 275 CC=$target-cc 253 276 LD=$target-ld 254 systemlibdirs="/usr/$target/lib"277 STRIP=$target-strip 255 278 fi 256 279 … … 259 282 LDFLAGS="$LDFLAGS -fsanitize=address" 260 283 debug=1 261 fi262 263 if [ "$tsan" = "1" ]; then264 echo265 echo "Threaded BitlBee? Have a nice tall glass of http://imgur.com/gallery/tX4qxzS"266 echo "No need to sanitise threads in a single-threaded process!"267 284 fi 268 285 … … 321 338 if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then 322 339 cat<<EOF >>Makefile.settings 323 EFLAGS+= `$PKG_CONFIG --libs glib-2.0 gmodule-2.0`324 CFLAGS+= `$PKG_CONFIG --cflags glib-2.0 gmodule-2.0`340 EFLAGS+=$($PKG_CONFIG --libs glib-2.0 gmodule-2.0) 341 CFLAGS+=$($PKG_CONFIG --cflags glib-2.0 gmodule-2.0) 325 342 EOF 326 343 else 327 344 echo 328 echo 'Found glib2 ' `$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.'345 echo 'Found glib2 '$($PKG_CONFIG glib-2.0 --modversion)', but version '$GLIB_MIN_VERSION' or newer is required.' 329 346 exit 1 330 347 fi … … 362 379 if $PKG_CONFIG --exists gnutls; then 363 380 cat <<EOF >>Makefile.settings 364 EFLAGS+= `$PKG_CONFIG --libs gnutls` `libgcrypt-config --libs`365 CFLAGS+= `$PKG_CONFIG --cflags gnutls` `libgcrypt-config --cflags`381 EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs) 382 CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags) 366 383 EOF 367 384 ssl=gnutls 368 if ! pkg-configgnutls --atleast-version=2.8; then385 if ! $PKG_CONFIG gnutls --atleast-version=2.8; then 369 386 echo 370 387 echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.' … … 373 390 elif libgnutls-config --version > /dev/null 2> /dev/null; then 374 391 cat <<EOF >>Makefile.settings 375 EFLAGS+= `libgnutls-config --libs` `libgcrypt-config --libs`376 CFLAGS+= `libgnutls-config --cflags` `libgcrypt-config --cflags`392 EFLAGS+=$(libgnutls-config --libs) $(libgcrypt-config --libs) 393 CFLAGS+=$(libgnutls-config --cflags) $(libgcrypt-config --cflags) 377 394 EOF 378 395 … … 388 405 if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then 389 406 cat<<EOF >>Makefile.settings 390 EFLAGS+= `$PKG_CONFIG --libs nss`391 CFLAGS+= `$PKG_CONFIG --cflags nss`407 EFLAGS+=$($PKG_CONFIG --libs nss) 408 CFLAGS+=$($PKG_CONFIG --cflags nss) 392 409 EOF 393 410 … … 634 651 if [ -z "$systemdsystemunitdir" ]; then 635 652 if $PKG_CONFIG --exists systemd; then 636 systemdsystemunitdir= `$PKG_CONFIG --variable=systemdsystemunitdir systemd`653 systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) 637 654 fi 638 655 fi … … 655 672 fi 656 673 657 if [ "$rpc" = 0 ]; then658 # Somewhat pointless at this stage already but at least this keeps it659 # out of bitlbee.pc which is probably a good thing.660 rpcplugindir=""661 fi662 663 674 otrprefix="" 664 for i in / /usr /usr/local; do665 if [ -f ${i}/lib/libotr.a ]; then666 otrprefix=${i}667 break668 fi669 done670 675 if [ "$otr" = "auto" ]; then 671 if [ -n "$otrprefix" ]; then 672 otr=1 673 else 674 otr=0 675 fi 676 fi 676 ! $PKG_CONFIG --exists libotr 677 otr=$? 678 fi 679 680 if [ "$otr" != 0 ] && ! $PKG_CONFIG --atleast-version=4.0 --print-errors libotr; then 681 exit 1 682 fi 683 677 684 if [ "$otr" = 1 ]; then 678 685 # BI == built-in 679 686 echo '#define OTR_BI' >> config.h 680 echo "EFLAGS+= -L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings681 echo "CFLAGS+= -I${otrprefix}/include" >> Makefile.settings687 echo "EFLAGS+=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings 688 echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings 682 689 echo 'OTR_BI=otr.o' >> Makefile.settings 683 690 elif [ "$otr" = "plugin" ]; then 691 # for some mysterious reason beyond the comprehension of my mortal mind, 692 # the libgcrypt flags aren't needed when building as plugin. add them anyway. 684 693 echo '#define OTR_PI' >> config.h 685 echo "OTRFLAGS= -L${otrprefix}/lib -lotr" >> Makefile.settings686 echo "CFLAGS+= -I${otrprefix}/include" >> Makefile.settings694 echo "OTRFLAGS=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings 695 echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings 687 696 echo 'OTR_PI=otr.so' >> Makefile.settings 688 fi689 if [ "$otr" != 0 ] && ! pkg-config libotr --atleast-version=4.0; then690 echo691 echo 'WARNING: Your libotr seems to be old. BitlBee now needs at least libotr 4.0.'692 # Not hard-failing because the code above doesn't use pkg-config, so who knows693 # what's true at this point...694 697 fi 695 698 … … 747 750 includedir=$includedir 748 751 plugindir=$plugindir 749 rpcplugindir=$rpcplugindir750 752 751 753 Name: bitlbee … … 840 842 protocols=$protocols'twitter ' 841 843 protoobjs=$protoobjs'twitter_mod.o ' 842 fi843 844 if [ "$rpc" = 0 ]; then845 echo '#undef WITH_RPC' >> config.h846 else847 echo '#define WITH_RPC' >> config.h848 protocols=$protocols'rpc '849 protoobjs=$protoobjs'rpc_mod.o '850 844 fi 851 845 … … 937 931 echo ' Using event handler: '$events 938 932 echo ' Using SSL library: '$ssl 933 #echo ' Building with these storage backends: '$STORAGES 939 934 940 935 if [ -n "$protocols" ]; then
Note: See TracChangeset
for help on using the changeset viewer.