<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - make fails without C_INCLUDE_PATH: xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61919">61919</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>make fails without C_INCLUDE_PATH: xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>darxus@chaosreigns.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Making all in xlib
make[4]: Entering directory
`/home/darxus/source/mesa/src/gallium/winsys/sw/xlib'
  CC     xlib_sw_winsys.lo
xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or
directory

Built libX11 from source, installed into $installdir.  Building mesa with:
./autogen.sh --prefix=$installdir --enable-gles2 --disable-gallium-egl
--with-egl-platforms=wayland,x11,drm --enable-gbm --enable-shared-glapi
--with-gallium-drivers=r300,r600,swrast,nouveau,svga

I have these variables set, which I believe should be sufficient for mesa to
find libX11 in $installdir:

PKG_CONFIG_PATH=$installdir/lib/pkgconfig/:$installdir/share/pkgconfig/
ACLOCAL="aclocal -I $installdir/share/aclocal"
LIBRARY_PATH=$installdir/lib
PATH=$installdir/bin:$PATH

With this set, it does not fail, but I believe this should not be required:

C_INCLUDE_PATH=$installdir/include


35189d768bf80fdedbb6e70f49215cc8b734f343 is the first bad commit
commit 35189d768bf80fdedbb6e70f49215cc8b734f343
Author: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>>
Date:   Mon Mar 4 10:23:54 2013 -0800

    configure.ac: Don't check for X11 unconditionally.

    X11 is already checked conditionally below.

    Fixes OSMesa-only configurations to not require X11.

    Note: This is a candidate for the 9.1 branch.
    Reviewed-by: Brian Paul <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>>

:100644 100644 785259554bbb833bc6d03c50414b8262bc553341
1b13d06be3ac263088b5d2d15923c383453d16b6 M      configure.ac
bisect run success</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>