SciRuby/nmatrix — pull request #129 by cjfuller (2013-09-17 06:47:37+00:00)
Title: attempt to fix compilation header paths on ubuntu without breaking OSX

Another attempt at fixing #88. This time I left the logic of the `dir_config` statements alone (though I pulled out the paths to allow reuse), which should hopefully prevent any problems associated with linking as in #69 (and #97). I added two additional header checks after the `dir_config` part in order to fix the case where it can find the library but not the header on Ubuntu.

Tested on:

- Ubuntu 13.04, where it will now compile out of the box with `rake compile` (no `CPLUS_INCLUDE_PATH` hack necessary). Atlas was installed with `apt-get install libatlas-base-dev`.

- OSX 10.8.4 with gcc 4.8.1 (not entirely sure how atlas was installed, but it's not my computer so I don't want to go messing with it), where it also compiles out of the box wtih `rake compile`.

- Ubuntu 12.04, which still requires `CPLUS_INCLUDE_PATH=/usr/include/atlas` with `rake compile` when atlas is installed by `apt-get install libatlas-base-dev`. (Otherwise it detects the wrong cblas.h -- `apt-get` installs two of them -- and I haven't been able to get it to choose the right one.)