When compiling/installing an OSMesa-only Mesa (no GLX or DRI), the following patch: https://cgit.freedesktop.org/mesa/mesa/commit/?id=42968424fb4100f2035badf236b005cc8d62a592 prevents include/GL/*.h headers, including osmesa.h, gl.h and gl_mangle.h, from being installed. I do not understand the rationale behind this patch. AFAIK, only glx.h and glx_mangle.h should be conditionally installed.
Most/all of that should be resolved with commit a89faa2022fd995af2019c886b152b49a01f9392. Please give it a try and let me know the exact configure line (and the summary?) if things are still odd.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/881.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.