#1941: #include <SDL/*> is invalid
-------------------------------------------------+--------------------------
        Reporter:  ohnobi...@…                   |        Type:  bug         
          Status:  new                           |    Priority:  minor       
       Milestone:  unspecified                   |   Component:  Build system
         Version:  unspecified                   |    Keywords:              
Operating_system:  All/Non-Specific              |   Blockedby:              
        Blocking:                                |  
-------------------------------------------------+--------------------------
 http://www.libsdl.org/faq.php?action=listentries&category=2#19

 Using #include <SDL/SDL.h> (or similar) instead of #include <SDL.h> causes
 compilation problems in some scenarios on my Gentoo GNU/Linux portage-
 multilib system:

 checking whether to compile in debug mode... no
 checking for SDL... yes
 checking for PNG... yes
 checking for THEORA... yes
 checking for OPENAL... yes
 checking for OGGVORBIS... yes
 checking for GLee... no
 configure: Using integrated GLee
 checking for nearbyint in -lm... yes
 checking for XSetSelectionOwner in -lX11... yes
 checking Xm/Xm.h usability... yes
 checking Xm/Xm.h presence... yes
 checking for Xm/Xm.h... yes
 checking for XmCreateErrorDialog in -lXm... yes
 checking popt.h usability... yes
 checking popt.h presence... yes
 checking for popt.h... yes
 checking for poptGetContext in -lpopt... yes
 checking physfs.h usability... yes
 checking physfs.h presence... yes
 checking for physfs.h... yes
 checking for PHYSFS_init in -lphysfs... yes
 checking SDL/SDL_opengl.h usability... no
 checking SDL/SDL_opengl.h presence... no
 checking for SDL/SDL_opengl.h... no
 configure: error: SDL OpenGL header not found. Please install SDL with
 OpenGL support.

 excerpt from config.log:

 configure:10103: checking SDL/SDL_opengl.h usability
 configure:10103: x86_64-pc-linux-gnu-gcc -std=gnu99 -c -O2 -pipe
 -march=athlon64 -g -ggdb -combine -ftree-vectorize -falign-functions=16
 -falign-labels=16 -falign-jumps=16  -fstack-protector   conftest.c >&5
 In file included from /usr/include/SDL/SDL_config.h:4,
                  from /usr/include/SDL/SDL_opengl.h:25,
                  from conftest.c:67:
 /usr/include/gentoo-multilib/amd64/SDL/SDL_config.h:30:26: error:
 SDL_platform.h: No such file or directory
 configure:10103: $? = 1

 The problem? gentoo-multilib/amd64/SDL/SDL_config.h use #include
 "SDL_platform.h" instead of #include <SDL/SDL_platform.h>. Also, this is
 Gentoo portage-multilib: since 32-bit and 64-bit code is installed side-
 by-side, headers which are different between 32-bit and 64-bit code is
 symlinked to different directories. Since /usr/include/SDL is not in CPP's
 include path for this configure check like it should be, SDL_config.h
 can't find /usr/include/SDL/SDL_platform.h. (SDL_platform.h is ABI-
 agnostic, so a copy doesn't also exist in /usr/include/gentoo-multilib-
 amd64/SDL ;-) ).

 Simply put: The SDL library only makes provisions for
 CPPFLAGS=-I/usr/include/SDL and #include <SDL_*.h>. Using #include
 <SDL/SDL.h> does cause failures -- under somewhat bizarre circumstances
 sometimes I guess ;-). I have seen bug #1683 and I recognize that this is
 a bug asking the opposite. But I hope that SDL's upstream FAQ and my
 special case are enough to support this patch :-).

-- 
Ticket URL: <http://developer.wz2100.net/ticket/1941>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to