Hi, On Mon, Mar 26, 2012 at 07:58:02PM +0200, Alon Bar-Lev wrote: > The problem is the use of the TARGET_XXXX not the use of HAVE. > As I wrote before next stage is to get rid of the syshead.h and its > complexity. > There is no sense to check for platform, just if header exists.
Check for header is too fragile, obviously - it checks for header, but fails, because header needs other headers. We need the TARGET_XXX stuff anyway, because tun.c and route.c need them - stuff like "how is the /bin/route syntax for IPv6 on xxxBSD" can not be detected by configure. So I'm much more in favour of actually keeping what we have: knowledge about every platform. We *know* which headers are there on FreeBSD, NetBSD, OpenBSD - and the way OpenVPN needs to tie into the system for ifconfig and route means "porting to a yet-unknown operating system by just running 'configure ; make' is a pipe dream, no more". This might work for stuff that's sufficiently far away from the system innards, and using pkg-config libraries for the nitty gritty details, but it won't for OpenVPN. > In the mean time please try the following[1] patch. > > Alon > > [1] > https://github.com/alonbl/openvpn/commit/b0f45ae19909b33723faebe7f8fb003f82900ff4 That patch makes configure detect <netinet/in.h> (as such: thanks, it helps), but it makes configure even more complicated, which means "config.log is even longer and harder to read". <rant> All this crap in configure really needs to go away... checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes ... checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes ... checking whether SIGHUP is declared... yes checking whether SIGINT is declared... yes checking whether SIGUSR1 is declared... yes checking whether SIGUSR2 is declared... yes checking whether SIGTERM is declared... yes ... checking for socket... yes checking for recv... yes checking for recvfrom... yes checking for send... yes checking for sendto... yes checking for listen... yes checking for accept... yes checking for connect... yes checking for bind... yes checking for select... yes checking for gethostbyname... yes ... all of these are on any operating that has any chance of running OpenVPN. So testing for it is a pure waste of code lines and cpu cycles. </rant> gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
pgpdrBuWKjXv6.pgp
Description: PGP signature