[OLSR-users] Support for OpenBSD?

Thomas Lopatic (spam-protected)
Tue May 17 02:24:35 CEST 2005


Hi Holger,

[...]

> I read some web pages about autoconf and they all say that autoconf is
> really useful for making software more portable... In fact I think that
> a configure-tested "#ifdef HAVE_SOMETHING" is probably easier to
> maintain than a hardcoded "#if defined SOME_OS || defined OTHER_OS ||
> defined ..."

[...]

Just like Andreas I think that in the case of olsrd autoconf does not
necessarily make things easier. We've managed to split the source code
into a generic part (with not very many #ifdefs) and an OS-specific part
(which doesn't have that many #ifdefs either). I think that autoconf makes
sense if you have source code that is interleaved with a lot of short
OS-specific idioms. In our case, however, the generic part hardly has any
OS-specific idioms and the OS-specific part is too different for each
supported platform - it IS a single big OS-specific idiom.

So, if we used autoconf, I think that this would degenerate and we'd end
up with something like "#ifdef HAVE_WIN32", "#ifdef HAVE_BSD", and "#ifdef
HAVE_LINUX", i.e. using autoconf to save the user "OS=win32", "OS=fbsd",
"OS=nbsd", and "OS=linux" on the "make" command line.

-Thomas




More information about the Olsr-users mailing list