configure patch for MacOS 10.7
Hi,
I'm forwarding this "as-is", as I do not have enough understanding of autoconf to say whether this is necessary, or "the right fix" - but anyway, I've been told that this is needed to make our configure behave on MacOS 10.7.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 2 lines · Gert Doering
Can you send me the changes you had to do? OpenVPN "should" build out of the box on all supported platforms, and that includes OS X.
Here's the diff, it's just three places that AC_LANG_SOURCE needed to be added to AC_COMPILE_IFELSEs as per the change described in http://lists.gnu.org/archive/html/autoconf/2010-09/msg00069.html (changelog for 2.68).
acinclude.m4 +8 -8
@@ -17,16 +17,16 @@ dnl @author James Yonan <[email protected]...> AC_DEFUN([AX_EMPTY_ARRAY], [ AC_MSG_RESULT([checking for C compiler empty array support]) - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ struct { int foo; int bar[[0]]; } mystruct; - ], [ + ])], [ AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, 0, [Dimension to use for empty array declaration]) ], [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ struct { int foo; int bar[[]]; } mystruct; - ], [ + ])], [ AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE,, [Dimension to use for empty array declaration]) ], [ AC_MSG_ERROR([C compiler is unable to creaty empty arrays])
@@ -45,11 +45,11 @@ dnl @author James Yonan <[email protected]...>, Matthias Andree <[email protected]... AC_DEFUN([AX_CPP_VARARG_MACRO_GCC], [dnl AS_VAR_PUSHDEF([VAR],[ax_cv_cpp_vararg_macro_gcc])dnl AC_CACHE_CHECK([for GNU GCC vararg macro support], VAR, [dnl - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #define macro(a, b...) func(a, b) int func(int a, int b, int c); int test() { return macro(1, 2, 3); } - ], [ VAR=yes ], [VAR=no])]) + ])], [ VAR=yes ], [VAR=no])]) if test $VAR = yes ; then AC_DEFINE([HAVE_CPP_VARARG_MACRO_GCC], 1, [Define to 1 if your compiler supports GNU GCC-style variadic macros])
@@ -67,11 +67,11 @@ dnl @author James Yonan <[email protected]...>, Matthias Andree <[email protected]... AC_DEFUN([AX_CPP_VARARG_MACRO_ISO], [dnl AS_VAR_PUSHDEF([VAR],[ax_cv_cpp_vararg_macro_iso])dnl AC_CACHE_CHECK([for ISO C 1999 vararg macro support], VAR, [dnl - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #define macro(a, ...) func(a, __VA_ARGS__) int func(int a, int b, int c); int test() { return macro(1, 2, 3); } - ], [ VAR=yes ], [VAR=no])]) + ])], [ VAR=yes ], [VAR=no])]) if test $VAR = yes ; then AC_DEFINE([HAVE_CPP_VARARG_MACRO_ISO], 1, [Define to 1 if your compiler supports ISO C99 variadic macros])
Quoted 10 lines · Byron Ellacott
Quoted 3 lines
Yep, debian stable, and a client system of OS X 10.7. I had to change a few things in acinclude.m4 to get openvpn-testing to build for OS X, due to the version of autoconf on the system, and I had to extend the permitted netbits further to accommodate the /116 I have, but after that, the VPN connected and started passing IPv6 traffic.
(Next problem: my /116 is not routed, the remote end gets NDs that the linux kernel cannot or will not pass through to an internal interface, but that's nothing to do with OpenVPN).
If you only have a single IPv6 network, and a incomplete to that, it might be more straightforward to run OpenVPN in tap mode and bridge between "eth0" and "tap0" on the server.
I'd looked very briefly at whether tap mode would work better in this case, and it almost certainly will. My aim is to demonstrate a VPN that supports both IPv6 and two-factor authentication, so I'll probably give bridge mode a go to demonstrate packets can pass, then call it a success.
Quoted 3 lines
"tun" and "server-ipv6" really is meant for routed subnets, not for addressess stolen from a subnet used on a different interface (you can do that with proxy-ND, but I'm not sure how to do that on Linux)
The subnet is only a /116, but it's not in use on eth0. It's not routed, because it's supposed to be used if you have more than one virtual host in the pool and want to assign addresses according to your own scheme, so another approach I could take to get packets flowing is to use an ND proxy daemon.
Quoted 2 lines
Much better: complain to your provider to give you a reasonable network, like a /56, and use one /64 on the LAN and another /64 for openvp-tun .-)
Yes, this would be better. When we (eventually) deploy a v6 VPN for production, it will be using APNIC's own address space, and we'll provide ourselves with a proper /64. In the case of linode, their initial proposal was to offer a /128 and nothing more. Given it's native v6, it's still a step up from a thousand other virtual hosting companies :-)
Byron
----- Mail original -----
Quoted 7 lines
De: "Gert Doering" <[email protected]...>
À: [email protected] Envoyé: Mardi 7 Février 2012 11:24:13
Objet: [Openvpn-devel] configure patch for MacOS 10.7Hi,
Quoted 8 lines
I'm forwarding this "as-is", as I do not have enough understanding of autoconf to say whether this is necessary, or "the right fix" - but anyway, I've been told that this is needed to make our configure behave on MacOS 10.7.
gert
--
Adding AC_LANG_SOURCE where it is required is the right fix. I made that fix on other packages. This is not specific to MacOS, that just depend on the autoconf version installed on the system.
With autoconf-2.68 installed and running autoreconf on a package produce warning where AC_LANG_SOURCE is missing. That look to be done properly (I haven't tested the patch)
Gilles
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 9 lines · Gert Doering
Hi,
I'm forwarding this "as-is", as I do not have enough understanding of autoconf to say whether this is necessary, or "the right fix" - but anyway, I've been told that this is needed to make our configure behave on MacOS 10.7.
gert
Applied to the master branch on -stable and -testing trees.
commit 3a90edbd194140eef51c245edfcf9afc0ecb2d13
Author: Byron Ellacott <[email protected]...> Date: Mon Feb 6 19:57:00 2012 +0100
autoconf fixes for building on OSX
[DS: a few whitespace fixes was added as well during the merge]
Signed-off-by: Byron Ellacott <[email protected]...>
Acked-by: Gilles Espinasse <[email protected]...>
Signed-off-by: David Sommerseth <[email protected]...>kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk8z2ecACgkQDC186MBRfrp2uQCgnwNsEiwhHfgbdi9Bs1ttkNHL oqIAoJB18nrWOeF4izWXMSSG56KxgUST
=FiKQ
-----END PGP SIGNATURE-----
Am 07.02.2012 11:24, schrieb Gert Doering:
Quoted 6 lines
Hi,
I'm forwarding this "as-is", as I do not have enough understanding of autoconf to say whether this is necessary, or "the right fix" - but anyway, I've been told that this is needed to make our configure behave on MacOS 10.7.
Looks useful at first superficial inspection - haven't tested it though.
If it breaks, you'll likely notice on the next ./configure run :)