ghisvail/pyNFFT — pull request #32 by cmarquardt (2014-05-23 23:24:22+00:00)
Title: Remove hardcoded compiler options to improve portability

In `setup.py`, some compiler options for `gcc` are hardcoded. This isn't portable; for example, the current version of the `clang` compiler on Mac OSX doesn't know about `-malign-double` (which only makes sense on 32-bit platforms anyway), and therefore the compilation of the module fails. For Intel compilers, `-ffast-math` doesn't exist (it's `-fast`). Oh, and `-O3` should be triggered by `-ffast-math` anyway.

I think it would be a more portable approach to rely on Python's build system which provides a default set of compiler options used for the build of python itself. If specifying additional compiler or build options is really required, users can always use environment variables like `CPPFLAGS`, `CFLAGS`and `LDFLAGS` when building a module. Unfortunately, distutils does not provide a good and standardised way to specify things like compiler options during compile time.

In the pull request, I have removed the hardcoded compiler options in `setup.py`and added a short description and an example for the use of environment variables when building pyNFFT.