VirtualBox

Changeset 36697 in vbox


Ignore:
Timestamp:
Apr 18, 2011 8:25:05 AM (14 years ago)
Author:
vboxsync
Message:

configure: added --enable-vnc (thanks Branko Majic)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r36097 r36697  
    8989WITH_HARDENING=1
    9090WITH_VDE=0
     91WITH_VNC=0
    9192WITH_DOCS=1
    9293BUILD_LIBXML2=
     
    124125INCZ=""
    125126LIBZ="-lz"
     127INCVNCSERVER=""
     128LIBVNCSERVER="-lvncserver"
    126129CXX_FLAGS=""
    127130if [ "$OS" = "freebsd" ]; then
     
    952955      cnf_append "SDK_VBOX_LIBPNG_LIBS" "`strip_l "$LIBPNG"`"
    953956      cnf_append "SDK_VBOX_LIBPNG_INCS" "$INCPNG"
     957    fi
     958  fi
     959}
     960
     961#
     962# Check for libvncserver, needed for VNC in OSE
     963#
     964check_vncserver()
     965{
     966  test_header libvncserver
     967  cat > $ODIR.tmp_src.cc <<EOF
     968#include <cstdio>
     969#include <rfb/rfbconfig.h>
     970
     971extern "C" int main()
     972{
     973  const char* v=LIBVNCSERVER_VERSION;
     974  unsigned int major = 0, minor = 0, micro = 0;
     975
     976  for (; *v !='.' && *v != '\0'; v++) major = major*10 + *v-'0';
     977  if (*v == '.') v++;
     978  for (; *v !='.' && *v != '\0'; v++) minor = minor*10 + *v-'0';
     979  if (*v == '.') v++;
     980  for (; *v !='.' && *v != '\0'; v++) micro = micro*10 + *v-'0';
     981
     982  printf("found version %s", LIBVNCSERVER_PACKAGE_VERSION);
     983  if (major*10000 + minor*100 + micro >= 907)
     984  {
     985    printf(", OK.\n");
     986    return 0;
     987  }
     988  else
     989  {
     990    printf(", expected version 0.9.7 or higher\n");
     991    return 1;
     992  }
     993}
     994EOF
     995  if test_compile "$LIBVNCSERVER $INCVNCSERVER" libvncserver libvncserver; then
     996    if test_execute; then
     997      cnf_append "VBOX_WITH_VNC" "1"
    954998    fi
    955999  fi
     
    21162160[ $WITH_OPENGL  -eq 1 ] && echo "  --disable-opengl         disable OpenGL support (2D & 3D)"
    21172161[ $WITH_GSOAP   -eq 0 ] && echo "  --enable-webservice      enable the webservice stuff"
     2162[ $OSE          -eq 1 ] && echo "  --enable-vnc             enable the VNC server"
    21182163[ $WITH_DOCS    -eq 1 ] && echo "  --disable-docs           don't build the documentation"
    21192164[ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo "  --enable-vde             enable VDE networking"
     
    22802325    --enable-webservice)
    22812326      [ $WITH_GSOAP -eq 0 ] && WITH_GSOAP=1
     2327      ;;
     2328    --enable-vnc)
     2329      WITH_VNC=1
    22822330      ;;
    22832331    --disable-hardening)
     
    25522600  cnf_append "VBOX_WITH_DOCS" ""
    25532601  cnf_append "VBOX_WITH_DOCS_PACKING" ""
     2602fi
     2603
     2604# VNC server support
     2605if [ $OSE -ge 1 ]; then
     2606  if [ $WITH_VNC = 1 ]; then
     2607    check_vncserver
     2608  else
     2609    cnf_append "VBOX_WITH_VNC" ""
     2610  fi
    25542611fi
    25552612
Note: See TracChangeset for help on using the changeset viewer.

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