darktable-org/darktable — pull request #385 by parafin (2013-12-01 00:30:52+00:00)
Title: redo #include <tr1/memory> vs #include <memory> logic

is for libstdc++, is for libc++ and alike ones.
On OS X clang can link against either of them depending on the passed options,
so checking the compiler doesn't actually work.
Neither does work checking the __cplusplus macros because it depends only on the presence of -std=c++11 switch,
so it may be not >= 201103L but we will still have to use with libc++.
For some reason include is present even when using libstdc++,
so I check for the presence of instead, it works as expected.
If there's a compiler that doesn't support both and __has_include()
then the logic in this commit will fail, but I don't have a better solution.
Let's hope it handles all practical cases ATM.

P.S.
Tested only on OS X and Linux with GCC, so please check other configurations.