Problem do compile: cannot find XShm.h

Hello, I am trying to compile sdl 1.2.15. After some difficulties in the configure stage, I as able to reach the compilation stage. But now another problem showed up, something that configure was not able to detect. During the compilation I am receiving this:

./src/video/x11/SDL_x11dyn.h:45:33: error: X11/extensions/XShm.h: No such file or direct
  In file included from ./src/video/x11/SDL_x11dga_c.h:24,
                           from ./src/video/x11/SDL_x11dga.c:30:
./src/video/x11/SDL_x11video.h:77: error: expected specifier-qualifier-list before ‘XShmSegmentInfo’

I do have the XShm.h file, but as everything else, I did install it into custom directories. Technically, it shall not be a problem, because I pass the XShm.h location to configure:

CPPFLAGS=-I"/media/34GB/Arquivos-de-Programas-Linux/xorg/Xproto-7.0.6/include/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/X11- -I/media/34GB/Arquivos-de-Programas-Linux/Alsa-1.0.10/include/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xextproto-7.0.2/include/X11/extensions/" LDFLAGS=-L/media/34GB/Arquivos-de-Programas-Linux/xorg/X11- ./configure

However, after doing so, the above error messages persisted. I also did try:

export C_INCLUDE_FLAGS=/media/34GB/Arquivos-de-Programas-Linux/xorg/Xextproto-7.0.2/include/X11/extensions/

That also did not work. Finally I did create a symbolic link to it…

ln -s /media/34GB/Arquivos-de-Programas-Linux/xorg/Xextproto-7.0.2/include/X11/extensions/XShm.h /usr/local/include/

…and it also did not work. What else can I do?

I was able to solve it by by swapping:




Anyway, IMO configure of sdl 1.2.15 is broken. It does not check for the presence of “XShm.h” that belongs to Xextproto in the X detection test. Also, if I pass the presence of the X11 header files through “–x-includes” and the X11 library files through “–x-libraries”, it pass the X detection test as expected, but the OpenGL test brake down, because glx.h depends on Xlib.h and Xutil.h, and these “–x-anything” does not seem to override the compíler search paths