FreeRADIUS/freeradius-server — pull request #791 by leprechau (2014-09-15 21:20:50+00:00)
Title: FR_SMART_CHECK_INCLUDE prefix fixup

The smart_prefix parts in FR_SMART_CHECK_INCLUDE do not seem to be working as intended in testing on my OSX and Linux systems.

Example: $smart_prefix = "json json-c”

The code checks with: "-isystem json/" and "-isystem json-c/“ but does not succeed when json.h is located under /usr/include/json-c/json.h (which is a standard path).

The intent appears to be that the compiler (clang / gcc) will prepend the system default search paths but this doesn’t seem to be the case.

Under OSX the overall function works when it falls through to the ‘guessing’ section when the file is present under /usr/local/include/json-c/json.h installed by homebrew.

This can be fixed by simply adding "/usr/include" to the end of _smart_include_dir and doing away with the previous check that was attempting to use the default search paths with prefixes.

Anyone have any other thoughts?