Changes in configure [2f8e3ca:8e5751e]
Legend:
- Unmodified
- Added
- Removed
-
configure
r2f8e3ca r8e5751e 16 16 config='/var/lib/bitlbee/' 17 17 plugindir='$prefix/lib/bitlbee/' 18 rpcplugindir='$plugindir/rpc/' 18 19 includedir='$prefix/include/bitlbee/' 19 20 systemdsystemunitdir='' … … 23 24 pcdir='$prefix/lib/pkgconfig' 24 25 systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib" 25 sysroot=''26 27 configure_args="$@"28 26 29 27 # Set these to default-on to let it be overriden by either the user or purple … … 39 37 twitter=1 40 38 purple=0 39 rpc=1 41 40 42 41 doc=1 … … 54 53 pie=1 55 54 56 arch= $(uname -s)57 cpu= $(uname -m)55 arch=`uname -s` 56 cpu=`uname -m` 58 57 59 58 GLIB_MIN_VERSION=2.16 … … 106 105 107 106 while [ -n "$1" ]; do 108 e=" $(expr "X$1" : 'X--\(.*=.*\)')"107 e="`expr "X$1" : 'X--\(.*=.*\)'`" 109 108 if [ -z "$e" ]; then 110 109 cat<<EOF … … 121 120 --datadir=... $datadir 122 121 --plugindir=... $plugindir 122 --rpcplugindir=... $rpcplugindir 123 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 $rpc 135 136 136 137 --doc=0/1 Disable/enable help.txt generation $doc … … 152 153 153 154 --target=... Cross compilation target same as host 154 --sysroot=... Cross compilation sysroot $sysroot155 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 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') 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'` 176 177 177 178 protocols_mods="" … … 179 180 cat <<EOF >Makefile.settings 180 181 ## BitlBee settings, generated by configure 181 182 # ./configure $configure_args183 184 182 PREFIX=$prefix 185 183 BINDIR=$bindir … … 189 187 DATADIR=$datadir 190 188 PLUGINDIR=$plugindir 189 RPCPLUGINDIR=$rpcplugindir 191 190 CONFIG=$config 192 191 INCLUDEDIR=$includedir … … 234 233 of them can/will be overridden at run-time */ 235 234 236 #define BITLBEE_CONFIGURE_ARGS "$configure_args"237 238 235 #define CONFIG "$config" 239 236 #define ETCDIR "$etcdir" 240 237 #define VARDIR "$datadir" 241 238 #define PLUGINDIR "$plugindir" 239 #define RPCPLUGINDIR "$rpcplugindir" 242 240 #define PIDFILE "$pidfile" 243 241 #define IPCSOCKET "$ipcsocket" … … 249 247 250 248 if [ -n "$target" ]; then 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 249 PKG_CONFIG_LIBDIR=/usr/$target/lib/pkgconfig 250 export PKG_CONFIG_LIBDIR 251 PATH=/usr/$target/bin:$PATH 275 252 CC=$target-cc 276 253 LD=$target-ld 277 STRIP=$target-strip254 systemlibdirs="/usr/$target/lib" 278 255 fi 279 256 … … 282 259 LDFLAGS="$LDFLAGS -fsanitize=address" 283 260 debug=1 261 fi 262 263 if [ "$tsan" = "1" ]; then 264 echo 265 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!" 284 267 fi 285 268 … … 338 321 if $PKG_CONFIG glib-2.0 --atleast-version=$GLIB_MIN_VERSION; then 339 322 cat<<EOF >>Makefile.settings 340 EFLAGS+= $($PKG_CONFIG --libs glib-2.0 gmodule-2.0)341 CFLAGS+= $($PKG_CONFIG --cflags glib-2.0 gmodule-2.0)323 EFLAGS+=`$PKG_CONFIG --libs glib-2.0 gmodule-2.0` 324 CFLAGS+=`$PKG_CONFIG --cflags glib-2.0 gmodule-2.0` 342 325 EOF 343 326 else 344 327 echo 345 echo 'Found glib2 ' $($PKG_CONFIG glib-2.0 --modversion)', but version '$GLIB_MIN_VERSION' or newer is required.'328 echo 'Found glib2 '`$PKG_CONFIG glib-2.0 --modversion`', but version '$GLIB_MIN_VERSION' or newer is required.' 346 329 exit 1 347 330 fi … … 379 362 if $PKG_CONFIG --exists gnutls; then 380 363 cat <<EOF >>Makefile.settings 381 EFLAGS+= $($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs)382 CFLAGS+= $($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags)364 EFLAGS+=`$PKG_CONFIG --libs gnutls` `libgcrypt-config --libs` 365 CFLAGS+=`$PKG_CONFIG --cflags gnutls` `libgcrypt-config --cflags` 383 366 EOF 384 367 ssl=gnutls 385 if ! $PKG_CONFIGgnutls --atleast-version=2.8; then368 if ! pkg-config gnutls --atleast-version=2.8; then 386 369 echo 387 370 echo 'Warning: With GnuTLS versions <2.8, certificate expire dates are not verified.' … … 390 373 elif libgnutls-config --version > /dev/null 2> /dev/null; then 391 374 cat <<EOF >>Makefile.settings 392 EFLAGS+= $(libgnutls-config --libs) $(libgcrypt-config --libs)393 CFLAGS+= $(libgnutls-config --cflags) $(libgcrypt-config --cflags)375 EFLAGS+=`libgnutls-config --libs` `libgcrypt-config --libs` 376 CFLAGS+=`libgnutls-config --cflags` `libgcrypt-config --cflags` 394 377 EOF 395 378 … … 405 388 if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then 406 389 cat<<EOF >>Makefile.settings 407 EFLAGS+= $($PKG_CONFIG --libs nss)408 CFLAGS+= $($PKG_CONFIG --cflags nss)390 EFLAGS+=`$PKG_CONFIG --libs nss` 391 CFLAGS+=`$PKG_CONFIG --cflags nss` 409 392 EOF 410 393 … … 651 634 if [ -z "$systemdsystemunitdir" ]; then 652 635 if $PKG_CONFIG --exists systemd; then 653 systemdsystemunitdir= $($PKG_CONFIG --variable=systemdsystemunitdir systemd)636 systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` 654 637 fi 655 638 fi … … 672 655 fi 673 656 657 if [ "$rpc" = 0 ]; then 658 # Somewhat pointless at this stage already but at least this keeps it 659 # out of bitlbee.pc which is probably a good thing. 660 rpcplugindir="" 661 fi 662 674 663 otrprefix="" 664 for i in / /usr /usr/local; do 665 if [ -f ${i}/lib/libotr.a ]; then 666 otrprefix=${i} 667 break 668 fi 669 done 675 670 if [ "$otr" = "auto" ]; then 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 671 if [ -n "$otrprefix" ]; then 672 otr=1 673 else 674 otr=0 675 fi 676 fi 684 677 if [ "$otr" = 1 ]; then 685 678 # BI == built-in 686 679 echo '#define OTR_BI' >> config.h 687 echo "EFLAGS+= $($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings688 echo "CFLAGS+= $($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings680 echo "EFLAGS+=-L${otrprefix}/lib -lotr -lgcrypt" >> Makefile.settings 681 echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings 689 682 echo 'OTR_BI=otr.o' >> Makefile.settings 690 683 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.693 684 echo '#define OTR_PI' >> config.h 694 echo "OTRFLAGS= $($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings695 echo "CFLAGS+= $($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings685 echo "OTRFLAGS=-L${otrprefix}/lib -lotr" >> Makefile.settings 686 echo "CFLAGS+=-I${otrprefix}/include" >> Makefile.settings 696 687 echo 'OTR_PI=otr.so' >> Makefile.settings 688 fi 689 if [ "$otr" != 0 ] && ! pkg-config libotr --atleast-version=4.0; then 690 echo 691 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 knows 693 # what's true at this point... 697 694 fi 698 695 … … 750 747 includedir=$includedir 751 748 plugindir=$plugindir 749 rpcplugindir=$rpcplugindir 752 750 753 751 Name: bitlbee … … 842 840 protocols=$protocols'twitter ' 843 841 protoobjs=$protoobjs'twitter_mod.o ' 842 fi 843 844 if [ "$rpc" = 0 ]; then 845 echo '#undef WITH_RPC' >> config.h 846 else 847 echo '#define WITH_RPC' >> config.h 848 protocols=$protocols'rpc ' 849 protoobjs=$protoobjs'rpc_mod.o ' 844 850 fi 845 851 … … 931 937 echo ' Using event handler: '$events 932 938 echo ' Using SSL library: '$ssl 933 #echo ' Building with these storage backends: '$STORAGES934 939 935 940 if [ -n "$protocols" ]; then
Note: See TracChangeset
for help on using the changeset viewer.