| | 610 | # Check for libxslt, needed by VBoxSettings |
|---|
| | 611 | # |
|---|
| | 612 | check_libxslt() |
|---|
| | 613 | { |
|---|
| | 614 | if [ -z "$BUILD_LIBXSLT" ]; then |
|---|
| | 615 | test_header libxslt |
|---|
| | 616 | if which_wrapper pkg-config > /dev/null; then |
|---|
| | 617 | libxslt_ver=`pkg-config libxslt --modversion 2>> $LOG` |
|---|
| | 618 | if [ $? -ne 0 ]; then |
|---|
| | 619 | log_failure "not found" |
|---|
| | 620 | fail |
|---|
| | 621 | else |
|---|
| | 622 | FLGXSLT=`pkg-config libxslt --cflags` |
|---|
| | 623 | INCXSLT=`strip_I "$FLGXSLT"` |
|---|
| | 624 | LIBXSLT=`pkg-config libxslt --libs` |
|---|
| | 625 | cat > .tmp_src.cc << EOF |
|---|
| | 626 | #include <cstdio> |
|---|
| | 627 | #include <libxslt/xsltconfig.h> |
|---|
| | 628 | extern "C" int main(void) |
|---|
| | 629 | { |
|---|
| | 630 | printf("found version %s", LIBXSLT_DOTTED_VERSION); |
|---|
| | 631 | #if LIBXSLT_VERSION >= 10122 |
|---|
| | 632 | printf(", OK.\n"); |
|---|
| | 633 | return 0; |
|---|
| | 634 | #else |
|---|
| | 635 | printf(", expected version 1.1.22 or higher\n"); |
|---|
| | 636 | return 1; |
|---|
| | 637 | #endif |
|---|
| | 638 | } |
|---|
| | 639 | EOF |
|---|
| | 640 | [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"` |
|---|
| | 641 | if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then |
|---|
| | 642 | if test_execute; then |
|---|
| | 643 | cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT" |
|---|
| | 644 | cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`" |
|---|
| | 645 | fi |
|---|
| | 646 | fi |
|---|
| | 647 | fi |
|---|
| | 648 | elif which_wrapper xslt-config; then |
|---|
| | 649 | libxslt_ver=`xslt-config --version` |
|---|
| | 650 | if [ $? -ne 0 ]; then |
|---|
| | 651 | log_failure "not found" |
|---|
| | 652 | fail |
|---|
| | 653 | else |
|---|
| | 654 | log_success "found version $libxslt_ver" |
|---|
| | 655 | FLGXSLT=`xslt-config --cflags` |
|---|
| | 656 | INCXSLT=`strip_I "$FLGXSLT"` |
|---|
| | 657 | LIBXSLT=`xslt-config --libs` |
|---|
| | 658 | cat > .tmp_src.cc << EOF |
|---|
| | 659 | #include <cstdio> |
|---|
| | 660 | #include <libxslt/xsltconfig.h> |
|---|
| | 661 | extern "C" int main(void) |
|---|
| | 662 | { |
|---|
| | 663 | printf("found version %s", LIBXSLT_DOTTED_VERSION); |
|---|
| | 664 | #if LIBXSLT_VERSION >= 10122 |
|---|
| | 665 | printf(", OK.\n"); |
|---|
| | 666 | return 0; |
|---|
| | 667 | #else |
|---|
| | 668 | printf(", expected version 1.1.22 or higher\n"); |
|---|
| | 669 | return 1; |
|---|
| | 670 | #endif |
|---|
| | 671 | } |
|---|
| | 672 | EOF |
|---|
| | 673 | [ -n "$INCXSLT" ] && I_INCXSLT=`prefix_I "$INCXSLT"` |
|---|
| | 674 | if test_compile "$LIBXSLT $LIBPTHREAD $I_INCXSLT" xslt xslt; then |
|---|
| | 675 | if test_execute; then |
|---|
| | 676 | cnf_append "SDK_VBOX_LIBXSLT_INCS" "$INCXSLT" |
|---|
| | 677 | cnf_append "SDK_VBOX_LIBXSLT_LIBS" "`strip_l "$LIBXSLT"`" |
|---|
| | 678 | fi |
|---|
| | 679 | fi |
|---|
| | 680 | fi |
|---|
| | 681 | else |
|---|
| | 682 | log_failure "neither pkg-config nor xslt-config found" |
|---|
| | 683 | fail |
|---|
| | 684 | fi |
|---|
| | 685 | fi |
|---|
| | 686 | } |
|---|
| | 687 | |
|---|
| | 688 | # |
|---|