In those cases, you must be certain that the info script associated with the universal binary installation (or the target platform installation if you are strictly cross-compiling) is the one that executes during the configuration process, rather than the info script associated with an installation specific to your host architecture.
Probably the most difficult situation you may experience is that of a self-bootstrapping tool—a tool that uses a (possibly stripped-down) copy of itself to either compile the final version of itself or to construct support files or libraries. Ideally, you should be able to build the executable as a universal binary in a single build pass.
Some programs may use autoconf macros that are not supported by the version of autoconf that shipped with OS X.
This is particularly an issue when generating a binary containing object code for more than one architecture.
In many cases, binaries containing object code for more than one architecture can be generated simply by running the normal configuration script, then overriding the architecture flags at compile time.
In those cases, the recommended solution is to pre-install a version of the tool for the host architecture, then modify the build scripts to rename the target’s intermediate copy of the tool and copy the host’s copy in place of that intermediate build product (for example, ).
By doing this, later parts of the build script will execute the version of the tool built for the host architecture.
This section covers some of the more common issues that you may encounter in bringing your UNIX application to OS X. Beyond these basics, if the project does not build, you may need to modify your makefile using some of the tips provided in the following sections.
These issues apply largely without regard to what type of development you are doing. After you do that, more extensive refactoring may be required.
In these cases, you will have to manually alter either the configuration scripts or the resulting headers to be appropriate for the actual target architecture (rather than the build architecture).
In some cases, this can be solved by telling the configure script that you are cross-compiling using the flags.
In that case, you should not have to do anything special for the build to succeed.
In some cases, however, it is not possible to simultaneously compile for multiple architectures and the build system wasn’t designed for cross-compiling.
For more information about 64-bit executables, see However, applications that make configuration-time decisions about the size of data structures will generally fail to build correctly in such an environment (since those sizes may need to be different depending on whether the compiler is executing a .