automake, autoconf compiling
Tom Huppi
thuppi at huppi.com
Thu Jan 13 17:13:50 PST 2005
On Thu, 13 Jan 2005, Giorgos Keramidas wrote:
<snip>
> I use autoconf/automake and libtool daily at work[1].
>
> The programs I write have to run on at least 3 different operating
> systems (FreeBSD, Linux and Solaris) without the need for constant
> manual tweaking of the source.
At work (former), I was responsible for code which was to
*compile* on 6 or 7 different platforms. I choose one (often my
FreeBSD workstation) upon which to execute the auto-tools and
didn't bother with most of the others though I kept a compatible
set of these tools on Linux and Solaris for convenience. Indeed,
the whole paradigm behind these tools is that they should _not_ be
needed on the target platform. 'autoconf' goes to great pains to
generate platform independent Bourne shell configure script for a
very good reason! Unfortunately too many people either
misunderstand the paradigm and/or or mis-use the tools and I
suspect that this is a good portion of the reason why the FreeBSD
ports infrastructure needs to play so many silly games with the
auto-tools. Properly speaking, the target platform shouldn't need
them at all, but I'm sure there are details of certain source
distributions which I am not aware of.
Thanks,
- Tom
> The best way to do that is to use the same version of autotools on all
> those platforms. So, I install the latest possible versions of these
> tools with --prefix=/opt/autotools on all the machines I have to use,
> and stop worrying about all the details.
>
> When I have to use the tools, I add /opt/autotools/bin at the beginning
> of my PATH. When I don't need them, I remove /opt/autotools/bin from my
> path.
>
> This has worked wonders so far.
>
> - Giorgos
>
>
>
> [1] The operative keyword here is "at work". I don't use autoconf and
> friends for programs I write on my own. I prefer bsd.*.mk for that.
>
More information about the freebsd-newbies
mailing list