We don't actually use the XCode IDE. But we do need a compiler and related tools.
Apple allows downloading just the command line developer tools. In fact, in Mavericks, trying to invoke any developer tool (like
strings) will prompt you to install the command line developer tools or all of XCode.
We'll be using a script, so there's no interaction required, and so we can handle Mavericks or earlier versions.
curl -k -O https://raw.github.com/timsutton/osx-vm-templates/master/scripts/xcode-cli-tools.sh chmod +x xcode-cli-tools.sh sudo ./xcode-cli-tools.sh
Alternatively, you can log into Apple Developer Center, download the Command Line Tools for XCode appropriate for the version of OS X you're running, and install it from the DMG file.