python-imaging/Pillow — pull request #381 by aronrosenberg (2013-10-16 19:53:35+00:00)
Title: Add Xquartz path to Mac search directory. Fixes 10.9 Mavericks clean install issue

On a clean Mac 10.9 Mavericks install with XQuartz as the X11 system, Pillow fails to build with the following error:

cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imagingtk.c -o build/temp.macosx-10.9-intel-2.7/_imagingtk.o -framework Tcl -framework Tk

clang: warning: -framework Tcl: 'linker' input unused

clang: warning: -framework Tk: 'linker' input unused

clang: warning: argument unused during compilation: '-mno-fused-madd'

In file included from _imagingtk.c:19:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found

# include

^

1 error generated.

error: command 'cc' failed with exit status 1

The fix is to include /opt/X11/include and /opt/X11/lib which is where the files are now located in 10.9 Mavericks installs