As part of my work towards ROS on OS X I need to be able to enforce the build architectures.  For cmake you can set this variable:

set(CMAKE_OSX_ARCHITECTURES "i386;x86_64")

For non-cmake packages (autoconf) you can just set the environment variables to:

export CFLAGS=" -arch i386 -arch x86_64 $CFLAGS"
export CXXFLAGS=" -arch i386 -arch x86_64 $CXXFLAGS"
export LDFLAGS=" -arch i386 -arch x86_64 $LDFLAGS"

And sometimes you need to add the

--disable-dependency-tracking

Option to ./configure

For now I have handled the cmake packages with the attached patch.  And I have handled other non-cmake packages on a package per package basis.

Is there a better way/place to do this?

Thanks, 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William Woodall
Graduate Software Engineering
Auburn University
w@auburn.edu
wjwwood@gmail.com
williamjwoodall.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~