OpenVPN / openvpn3-linux

OpenVPN 3 Linux client
GNU Affero General Public License v3.0
554 stars 148 forks source link

Add flag to use system default ASIO on compile #14

Closed isac322 closed 4 years ago

isac322 commented 4 years ago

Hi, Firstly thanks for your work. I'm currently trying to make a user defined openvpn3 client package on archlinux. Actually it's already uploaded on here. And I want to use official asio package of archlinux which is currently 1.14.0 instead of default submodule for maintainability.

So I tried to modify configure.ac but I faced two issues.

  1. even if I set ASIO_SOURCEDIR to system asio path, archlinux does not install asio like there source tree does. asio source tree: asio/asio/include/asio, archlinux: usr/include/asio/ (you can check in Package Contents on here)
  2. I can not set to use system asio on runtime. I did not check source but I guess -DASIO_STANDALONE exists to include asio binary to openvpn3-linux binary. So even if I set ASIO_SOURCEDIR, I can not exclude -DASIO_STANDALONE.

Should I add another flag to set to use system asio? need some help!

dsommers commented 4 years ago

Can you please check if the dev/gh-issue-14-asio-include-dir branch works for you?

dsommers commented 4 years ago

In regards to your question 2). ASIO is a source based header library, so there are no binary library built which OpenVPN 3 or OpenVPN 3 Linux is linked against. Just look at the "Package contents" of the ASIO package, and you will see there are only include files packaged.

dsommers commented 4 years ago

ping @isac322 ... If you can test if this approach in the development branch works for you, I'll get that merged into master pretty quickly.