EDIT:
I'm not sure but it seems to me there are two other ways to get a app built against 10.5 working on 10.4... the first one implicates the use of the MACOSX_DEPLOYMENT_TARGET flag, the second of CC="gcc -mmacosx-version-min=10.4", but I have to understand them deeply...
They are the same, but for safety you use both.
From man gcc:
-mmacosx-version-min=version
The earliest version of MacOS X that this executable will run on is
version. Typical values of version include 10.1, 10.2, and 10.3.9.
This value can also be set with the MACOSX_DEPLOYMENT_TARGET
environment variable. If both the command-line option is specified
and the environment variable is set, the command-line option will
take precedence.
I tried to use as min version 10.4, but to use 10.5 SDK and it seems work.
I don't know if it is right but the SDK determines the maximum system whose API you want to benefit from
and the DEPLOYMENT_TARGET the minimal supported OS version...
Maybe it is useless or maybe there is a runtime detect...
Someone can help?
Attenction to all libraries compiled with MacPorts, I had to use:
port install .... +universal macosx_deployment_target=10.4 universal_target=10.4
EDIT:
See
here.