Looking For Static

Here is a curious problem: static linking standard C++ libraries into an executable binary. It is something that I have figured out how to do with a manually constructed link command. But I would really like to know if it’s possible to ask an autotools-based build environment to do the same thing. This is an interesting circumstance since a Linux developer does not usually need to be bothered with such matters; the build tools (autotools, in this case) just make the right build decisions depending on the host system. The build process for many software packages causes the software to ‘nest’ into the host system. Flash Player is different and I have a need to force this particular build decision.

Is there a setting in autoconf/automake and friends to ask the toolset to static link libstdc++? My searches on this matter have been fruitless, though some have alleged that there are projects out there that need to do this. Alternatively, I might be willing to evaluate other build systems (I often hear that SCons and CMake are leading contenders in this field) if they can fulfill this requirement, in addition to some other requirements (all quite reasonable):

  • automatically keep track of dependencies
  • manage multiple build targets
  • create multiple build configurations in separate directories, working from the same source tree

PS: To re-iterate a running theme on this blog, Adobe is not open sourcing the Player at this time. So please do not propose that as a possible solution to this quandary.