building.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <PAGE>
  2. <INCLUDE file="inc/header.tmpl" />
  3. <VAR match="VAR_SEL_STARTED" replace="selected" />
  4. <VAR match="VAR_SEL_BUILDING" replace="selected" />
  5. <PARSE file="menu1.xml" />
  6. <PARSE file="menu2-started.xml" />
  7. <INCLUDE file="inc/content.tmpl" />
  8. <h1>Building OpenConnect</h1>
  9. <p>Unless you need to test the very latest version, you should not
  10. need to build OpenConnect for yourself. See the <a href="packages.html">packages</a>
  11. page for information about your operating system or distribution. If there
  12. is none, then you can file a bug or enhancement request asking for
  13. one.</p>
  14. <h2>Requirements</h2>
  15. <p>To build OpenConnect from its source code, you will need the following
  16. libraries and tools installed:</p>
  17. <ul>
  18. <li><b><tt>libxml2</tt></b></li>
  19. <li><b><tt>zlib</tt></b></li>
  20. <li>Either <b><tt>OpenSSL</tt></b> or <b><tt>GnuTLS</tt></b> <i>(v3.2.10+)</i></li>
  21. <li><b><tt>pkg-config</tt></b></li>
  22. </ul>
  23. And <em>optionally</em> also:
  24. <ul>
  25. <li><b><tt><a href="https://p11-glue.github.io/p11-glue/p11-kit.html">p11-kit</a></tt></b> <i>(for PKCS#11 support)</i></li>
  26. <li><b><tt><a href="https://github.com/OpenSC/libp11/wiki">libp11</a></tt></b> <i>(also needed for PKCS#11 support if using OpenSSL)</i></li>
  27. <li><b><tt><a href="https://code.google.com/archive/p/libproxy/">libproxy</a></tt></b></li>
  28. <li><b><tt><a href="http://trousers.sourceforge.net/">trousers</a></tt></b> <i>(for TPMv1 support if using GnuTLS)</i></li>
  29. <li><b><tt><a href="https://www.gnu.org/software/libtasn1/">libtasn1</a></tt></b> and <em>either</em> <b><tt><a href="https://github.com/tpm2-software/tpm2-tss">tss2-esys</a></tt></b> or <b><tt><a href="https://sourceforge.net/projects/ibmtpm20tss/">IBM's TPM 2.0 TSS</a></tt></b>. <i>(for TPMv2 support if using GnuTLS)</i></li>
  30. <li><b><tt><a href="http://stoken.sf.net/">libstoken</a></tt></b> <i>(for SecurID software token support)</i></li>
  31. <li><b><tt><a href="https://www.nongnu.org/oath-toolkit/">libpskc</a></tt></b> <i>(for RFC6030 PSKC file storage of HOTP/TOTP keys)</i></li>
  32. <li><b><tt><a href="https://pcsclite.alioth.debian.org/pcsclite.html">libpcsclite</a></tt></b> <i>(for Yubikey hardware HOTP/HOTP support)</i></li>
  33. </ul>
  34. <p>OpenConnect supports the use of HTTP and SOCKS proxies to connect to the
  35. AnyConnect service, even without using libproxy. You may wish to use libproxy
  36. if you want OpenConnect to automatically use the appropriate proxies for your
  37. environment, without having to manually give it the <tt>--proxy</tt> argument
  38. on the command line.</p>
  39. <h2>Install vpnc-script</h2>
  40. <p>OpenConnect should be given a default <a href="vpnc-script.html">vpnc-script</a>
  41. for network configuration (routing and DNS) at compile-time. This can be overridden
  42. at runtime (with <tt>--script</tt>).</p>
  43. <p>The <tt>configure</tt> script will check whether either
  44. <tt>/etc/vpnc/vpnc-script</tt> or <tt>/usr/share/vpnc-scripts/vpnc-script</tt>
  45. exists and can be executed, and will fail if not. If you don't already have
  46. a copy then you should install one. It might be in a separate <tt>vpnc-script</tt>
  47. package for your operating system, it might be part of their <tt>vpnc</tt> package,
  48. and there's one linked from the <a href="vpnc-script.html">vpnc-script page</a>, if
  49. you need to download it manually. Install it as <tt>/etc/vpnc/vpnc-script</tt>.</p>
  50. <p>If you do not want to OpenConnect to use a vpnc-script from one of these
  51. standard locations, you can configure OpenConnect to
  52. use a different location by default. When running the <tt>./configure</tt> script
  53. in the instructions below, you can append an argument such as <tt>--with-vpnc-script=<i>/where/I/put/vpnc-script</i></tt> to its command line. Note that the path you give will not be checked; the script doesn't have to be present when you <b>build</b> OpenConnect. But of course OpenConnect won't work very
  54. well without it, so you'll still have to install it later.</p>
  55. <h2>Building OpenConnect</h2>
  56. <p>If you checked the source code out from git rather from a release tarball
  57. then run this command first to prepare the build system:</p>
  58. <ul>
  59. <li><tt>./autogen.sh</tt></li>
  60. </ul>
  61. <p>Then to build it, run the following commands:</p>
  62. <ul>
  63. <li><tt>./configure</tt></li>
  64. <li><tt>make</tt></li>
  65. <li><tt>make install</tt> <i>(If you want to install it)</i></li>
  66. </ul>
  67. <p>Note that OpenConnect will attempt to use the GnuTLS library by default.
  68. If you want it to use OpenSSL instead, then add <tt>--without-gnutls</tt> to the
  69. <tt>./configure</tt> command above.</p>
  70. <p>If compilation fails, please make sure you have a working compiler and the
  71. <b>development</b> packages for all the required libraries mentioned above. If
  72. it still doesn't build, please send the full output in a plain-text mail to the
  73. <a href="mail.html">mailing list</a>.</p>
  74. <h2>Test suite</h2>
  75. <p>The included test suite can be run as <tt>make check</tt>.</p>
  76. <p>It depends on the following programs and libraries being available:</p>
  77. <ul>
  78. <li><a href="/ocserv">ocserv</a></li>
  79. <li><a href="https://cwrap.org/socket_wrapper.html">socket_wrapper</a></li>
  80. <li><a href="https://cwrap.org/uid_wrapper.html">uid_wrapper</a></li>
  81. </ul>
  82. <h2>Test suite</h2>
  83. <p>The included test suite can be run as <tt>make check</tt>.</p>
  84. <p>It depends on the following programs and libraries being available:</p>
  85. <ul>
  86. <li><a href="/ocserv">ocserv</a></li>
  87. <li><a href="https://cwrap.org/socket_wrapper.html">socket_wrapper</a></li>
  88. <li><a href="https://cwrap.org/uid_wrapper.html">uid_wrapper</a></li>
  89. </ul>
  90. <h2>TUN/TAP driver</h2>
  91. <h3>Mac OS</h3>
  92. <p>Mac OS X users with OS X 10.6 or older, or using OpenConnect 6.00 or older,
  93. will also need to install the <a href="http://tuntaposx.sourceforge.net/">Mac OS X tun/tap driver</a>.
  94. Newer versions of OpenConnect will use the <tt>utun</tt> device on OS X which does not
  95. require additional kernel modules to be installed.</p>
  96. <p>Solaris/OpenIndiana users will need the <a href="http://www.whiteboard.ne.jp/~admin2/tuntap/">Solaris TAP driver</a>.
  97. Note that for IPv6 support, the Solaris tun/tap driver from 16th Nov 2009 or newer is required.</p>
  98. <h3>Windows</h3>
  99. <p>On Windows, OpenConnect uses the
  100. <a href="https://community.openvpn.net/openvpn/wiki/GettingTapWindows">TAP-Windows driver from OpenVPN</a> (version 9.9 or
  101. later; requires Windows 2003 or newer). This driver is only available for the 32-bit and 64-bit x86
  102. architectures.</p>
  103. <p>OpenConnect v9.00 also contains <b><i>experimental</i></b> support for the
  104. <a href="https://www.wintun.net">Wintun layer-3 driver from Wireguard</a>
  105. (requires Windows 7 or newer). This is a more modern driver, and supports 32-bit and 64-bit ARM
  106. architectures as well, however it does not yet appear to be fully stable
  107. (see <a href="https://gitlab.com/openconnect/openconnect/-/issues/338">issue #338</a>).
  108. OpenConnect v9.00 will only attempt to use Wintun if TAP-Windows is unavailable.</p>
  109. <INCLUDE file="inc/footer.tmpl" />
  110. </PAGE>