Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2009 16:10:26 -0800
From:      Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: reference for beginner on configure/make/compile/linking/etc.
Message-ID:  <200906111610.27482.mel.flynn%2Bfbsd.questions@mailing.thruhere.net>
In-Reply-To: <70C0964126D66F458E688618E1CD008A0793EF4E@WADPEXV0.waddell.com>
References:  <70C0964126D66F458E688618E1CD008A0793EF4E@WADPEXV0.waddell.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 11 June 2009 14:09:43 Gary Gatten wrote:

> It seems
> COMPLETELY overly complex to me - maybe cause the developer tries to
> make it as portable as possible, but with every *nix like things putting
> files wherever they want, different cc's / ld's, etc. - I can see where
> it can get hairy.

It *is* overly complex. The original design goal of "easily create portable 
shell to configure and Makefiles" has long been replaced with "cruft now 
requiring perl, additional files for linking (.la) and overall confusion when 
things don't work". It is no wonder that larger projects are switching to 
cmake and smaller to jam/scons.

That said, if the developers know what they're doing, you won't see any OS 
assumption in the source code (#ifdef __FreeBSD__ and similar) and you would 
be able to assert portability differences by grepping for 
'^#ifn?def[[:space:]]+HAVE_' in headers and source. Problems with 
configure/automake usually can be classified in the following categories:
- Unhandled cases developers are not aware of: prerequisite headers or headers 
in different locations then are assumed. Library symbols in differently named 
libraries.
- Attempt to figure out a prerequisite is present not directly supported by 
autoconf/automake then created by the developers in not so portable script.
- Assumptions on struct members, number of arguments to certain functions, 
size of data structures, presence of symbols.
- Lex/yacc/bison parser generator version problems.

I've always found curl (ftp/curl) port a good example of autoconf usage.
-- 
Mel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906111610.27482.mel.flynn%2Bfbsd.questions>