Would it not the be the work of autoconfig and automake to setup sys-headers=/usr/include/ automatic ?
I suppose yes, they should, but they still require some hint, usually provided from the developers, about what to check for.
Honestly I'm not a fan of these tools, in my opinion they are actually used and abused, and that very often will result in a cryptic errors ... "undefined AC_MACRO ....", later solved by adding 'pkg-config' or something else, totally unrelated to the error.
You (I did) will spend lot of time looking for what is wrong, without a real hint about what is going on.
So, I always used them passively, never actively, my answer may reflect my limited knowledge of them.
PS: I do not have that problem, I do not develop in C any more (I am tired about the C-compiler war).
I use fpc (free pascal compiler) and develop in Pascal, that has no problem of compatibility and works on nearly all os that exist. And the new Pascal object permits all (even more) than C or C++.
Porting software it is not limited to language differences, and C is implemented very consistently across different compilers/OSes,
and require deep knowledge of both the originate OS and the target OS ... I could mention just as an example a simple app requiring to access Linux-udev events or FreeBSD devd events: in Linux your program will make use of libudev, in FreeBSD will make use of a socket, there is no way a language itself can overcome this type of differences, autoconf/automake will not help here, same for "fpc".
As a result, because the knowledge of different OSes is not so widely diffused, software is often written in a non portable way, even if portability was desired from the original author, same when using tools like autoconf/automake.