Samba4 installs several headers into the toplevel include path if the --enable-fhs option is not used, e.g. util.h, charset.h, etc.. This is even acknowledged in the m4 fragment at "source4/build/m4/check_path.m4", which fails if /usr or /usr/local is given as a prefix. Rather than (trying to) hack around the issue, either --enable-fhs should be the default, or the option should be removed entirely, and only the FHS-compliant paths should be used. The same m4 fragment also acknowledges that the current default is for "legacy SAMBA directories", so I say that it is time to remove the legacy paths.
Created attachment 4071 [details]
Make --enable-fhs the default.
Some time ago we discussed the usage of "--enable-fhs", but we came to the conclusion that it both makes sense to use (UNIX distribution packages) but also to not using it (interesting for tests).
Certainly it shouldn't happen that headers are installed in the system include directory if there hasn't been specified "--enable-fhs". My opinion is that it would be better to correct the errors in the "m4" files. Therefore please provide such a patch proposal!
Could you please point out which headers are installed in toplevel directories, so we could write a patch to fix the problem?
I close this since I couldn't verify the headers which would be installed in wrong locations. If you think you are really right, please point out the lines in the files were the wrong path variables for them are located.