VirtualBox

Changeset 15247 in vbox for trunk/configure


Ignore:
Timestamp:
Dec 10, 2008 1:49:37 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
40663
Message:

configure: libcap check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r15057 r15247  
    8484LIBCRYPTO="-lcrypto"
    8585LIBPTHREAD="-lpthread"
     86LIBCAP="-lcap"
    8687LIBX11="-L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11"
    8788INCX11="/usr/local/include"
     
    15691570}
    15701571
     1572#
     1573# Check for libcap.
     1574# Required to pass CAP_NET_RAW to our binaries to allow to open SOCK_RAW
     1575# sockets for doing ICMP requests.
     1576#
     1577check_libcap()
     1578{
     1579  test_header "libcap library"
     1580  cat > .tmp_src.cc << EOF
     1581#include <cstdio>
     1582#include <sys/capability.h>
     1583
     1584extern "C" int main(void)
     1585{
     1586  cap_t caps = cap_get_proc();
     1587  printf("Current caps are '%s'\n", cap_to_text(caps, NULL));
     1588  return 0;
     1589}
     1590EOF
     1591  if test_compile $LIBCAP libcap libcap; then
     1592    if test_execute; then
     1593      log_success "found"
     1594    fi
     1595  fi
     1596}
    15711597
    15721598#
     
    20642090    cnf_append "VBOX_WITH_DBUS" ""
    20652091  fi
     2092  check_libcap
    20662093  check_compiler_h
    20672094  [ "$BUILD_MACHINE" = "amd64" ] && check_32bit
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette