- Timestamp:
- 2015-05-04T21:58:50Z (10 years ago)
- Children:
- 5726a0d
- Parents:
- 531eabd (diff), 5ca1416 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r531eabd rb1dc403 38 38 purple=0 39 39 40 doc=1 40 41 debug=0 41 42 strip=1 … … 56 57 GLIB_MIN_VERSION=2.16 57 58 58 echo BitlBee configure59 60 59 # Cygwin and Darwin don't support PIC/PIE 61 60 case "$arch" in 62 63 64 65 61 CYGWIN* ) 62 pie=0;; 63 Darwin ) 64 pie=0;; 66 65 esac 66 67 get_version() { 68 REAL_BITLBEE_VERSION=$(grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/') 69 BITLBEE_VERSION=$REAL_BITLBEE_VERSION 70 71 if [ -d $srcdir/.git ] && type git > /dev/null 2> /dev/null; then 72 timestamp=$(cd $srcdir; git show -s --format=%ci HEAD | sed 's/ .*$//; s/-//g') 73 branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD) 74 75 search="(.+)-([0-9]+)-(g[0-9a-f]+)" 76 replace="\1+$timestamp+$branch+\2-\3-git" 77 78 BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s/$search/$replace/") 79 80 unset timestamp branch search replace 81 fi 82 } 83 84 if [ "$1" = "--dump-version" ]; then 85 srcdir=$(cd $(dirname $0);pwd) 86 get_version 87 echo $BITLBEE_VERSION 88 exit 89 fi 90 91 echo BitlBee configure 67 92 68 93 while [ -n "$1" ]; do … … 96 121 --rpc=0/1 Disable/enable RPC interface $rpc 97 122 123 --doc=0/1 Disable/enable help.txt generation $doc 98 124 --debug=0/1 Disable/enable debugging $debug 99 125 --strip=0/1 Disable/enable binary stripping $strip … … 450 476 ret=1 451 477 echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - $LIBRESOLV >/dev/null 2>/dev/null 452 453 454 478 if [ "$?" = "0" ]; then 479 ret=0 480 fi 455 481 456 482 rm -f $TMPFILE … … 465 491 if [ -f $i/libresolv.a ]; then 466 492 echo "$RESOLV_NS_TESTCODE" | $CC -o $TMPFILE -x c - -Wl,$i/libresolv.a >/dev/null 2>/dev/null 467 468 469 493 if [ "$?" = "0" ]; then 494 ret=0 495 fi 470 496 fi 471 497 done … … 477 503 detect_nameser_has_ns_types() 478 504 { 479 480 481 482 483 484 485 486 487 488 489 505 TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX) 506 ret=1 507 # since we aren't actually linking with ns_* routines 508 # we can just compile the test code 509 echo "$RESOLV_NS_TYPES_TESTCODE" | $CC -o $TMPFILE -x c - >/dev/null 2>/dev/null 510 if [ "$?" = "0" ]; then 511 ret=0 512 fi 513 514 rm -f $TMPFILE 515 return $ret 490 516 } 491 517 … … 548 574 if detect_resolv_dynamic || detect_resolv_static; then 549 575 echo '#define HAVE_RESOLV_A' >> config.h 550 551 552 553 else 554 576 if detect_resolv_ns_dynamic || detect_resolv_ns_static; then 577 echo '#define HAVE_RESOLV_A_WITH_NS' >> config.h 578 fi 579 else 580 echo 'Insufficient resolv routines. Jabber server must be set explicitly' 555 581 fi 556 582 … … 649 675 fi 650 676 651 if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then 652 echo 653 echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' 654 echo 'Install xmlto if you want online help to work.' 655 fi 656 657 REAL_BITLBEE_VERSION=`grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/'` 658 echo 659 if [ -z "$BITLBEE_VERSION" -a -d .bzr ] && type bzr > /dev/null 2> /dev/null; then 660 nick=`bzr nick` 661 if [ -n "$nick" -a "$nick" != "bitlbee" ]; then 662 nick="-$nick" 677 if [ "$doc" = "1" ]; then 678 if [ ! -e doc/user-guide/help.txt ] && \ 679 ! type xmlto > /dev/null 2> /dev/null || \ 680 ! type xsltproc > /dev/null 2> /dev/null 681 then 682 echo 683 echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' 684 echo 'Install xmlto and xsltproc if you want online help to work.' 663 685 else 664 nick="" 665 fi 666 rev=`bzr revno` 667 echo 'Using bzr revision #'$rev' as version number' 668 BITLBEE_VERSION=$REAL_BITLBEE_VERSION-bzr$nick-$rev 669 fi 670 671 if [ -z "$BITLBEE_VERSION" -a -d .git ] && type git > /dev/null 2> /dev/null; then 672 rev=`git describe --long --tags`-`git rev-parse --abbrev-ref HEAD` 673 echo 'Using '$rev' as git version number' 674 BITLBEE_VERSION=$rev-git 675 fi 676 677 if [ -n "$BITLBEE_VERSION" ]; then 686 echo "DOC=1" >> Makefile.settings 687 fi 688 689 if [ "$skype" = "1" -o "$skype" = "plugin" ]; then 690 # skype also needs asciidoc 691 if ! type a2x > /dev/null 2> /dev/null; then 692 echo 693 echo 'WARNING: The skyped man page requires asciidoc. It will not be generated.' 694 else 695 echo "ASCIIDOC=1" >> Makefile.settings 696 fi 697 fi 698 fi 699 700 get_version 701 702 if [ "$BITLBEE_VERSION" != "$REAL_BITLBEE_VERSION" ]; then 678 703 echo 'Spoofing version number: '$BITLBEE_VERSION 679 704 echo '#undef BITLBEE_VERSION' >> config.h 680 705 echo '#define BITLBEE_VERSION "'$BITLBEE_VERSION'"' >> config.h 681 706 echo 682 else683 # for pkg-config684 BITLBEE_VERSION=$REAL_BITLBEE_VERSION685 707 fi 686 708
Note: See TracChangeset
for help on using the changeset viewer.