reference for beginner on configure/make/compile/linking/etc.

Mel Flynn mel.flynn+fbsd.questions at
Fri Jun 12 00:10:30 UTC 2009

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 
- 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.

More information about the freebsd-questions mailing list