[SDL] Try to configure - compile the test.

Gabriel Jacobo gabomdq at gmail.com
Wed Oct 9 10:08:45 PDT 2013


Glancing at your patch I don't see what the difference is with what I
commited, but if you can update this so it applies on the latest rev from
HG I'll review it. Thanks!


2013/10/9 T. Joseph Carter <tjcarter at spiritsubstance.com>

> Gabriel,
>
> I just made a patch that does the same kind of thing.  Well, it does that
> and a few other things.  I'd suggest that it might be a better fix.  I've
> resolved the conflict and attached the result.  Lemme know what you think.
>
> Works on Ubuntu and doesn't break anything new on my Mac.  I say doesn't
> break anything _new_ because a few things are quite broken on the mac in
> the past 24-36 hours.
>
> Joseph
>
>
> On Wed, Oct 09, 2013 at 11:35:47AM -0300, Gabriel Jacobo wrote:
>
>> This should fix the GL and GLES problems in tests:
>> http://hg.libsdl.org/SDL/rev/**7995e0920bf9<http://hg.libsdl.org/SDL/rev/7995e0920bf9>
>>
>> One caveat though...if you are using Linux with Nvidia binaries testgles
>> won't work out of the box...
>>
>> The compile command for it will be something like:
>>
>> gcc -o testgles ../testgles.c -g -O2 -D_REENTRANT
>> -I/usr/local/include/SDL2
>>  -DHAVE_OPENGLES -DHAVE_OPENGL -Wl,-rpath,/usr/local/lib -L/usr/local/lib
>> -lSDL2 -lpthread   -lSDL2_test  -lGLESv1_CM -lm
>>
>> However, Nvidia is not providing libGLESv1_CM.so, Mesa is, and they are
>> incompatible...so while it will appear that everything is fine, what you
>> actually want for this to work is something like:
>>
>> gcc -o testgles ../testgles.c -g -O2 -D_REENTRANT
>> -I/usr/local/include/SDL2
>>  -DHAVE_OPENGLES -DHAVE_OPENGL -Wl,-rpath,/usr/local/lib -L/usr/local/lib
>> -lSDL2 -lpthread   -lSDL2_test -L/usr/lib/nvidia-313-updates  -lGL -lm
>>
>> And before you come complaining about this, I think Linus Torvalds said it
>> best...(NSFW)
>> http://www.geekosystem.com/wp-**content/uploads/2012/06/v40g6.**gif<http://www.geekosystem.com/wp-content/uploads/2012/06/v40g6.gif>
>>
>>
>>
>> 2013/10/8 T. Joseph Carter <tjcarter at spiritsubstance.com>
>>
>>  On Tue, Oct 08, 2013 at 07:29:18PM +0200, Loïc Maury wrote:
>>>
>>>  adding a couple of debug echo statements at this point to the standard
>>>>
>>>>> configure.in to see what configure thinks those values are?  If
>>>>> they're
>>>>> not what they should be, that'd be useful to know.
>>>>>
>>>>>
>>>> I have added at the end of if test x$have_x, and just before
>>>> dnl Check for OpenGL,
>>>>
>>>> echo "$ac_x_includes and $ac_x_libraries", values are empty, so the
>>>> AC_PATH_X doesn't work for me ?
>>>>
>>>>
>>> More variables to test in about the same spot:
>>>
>>> $have_x
>>> $x_includes
>>> $x_libraries
>>>
>>> I notice that the main configure.in uses those, not $ac_x_includes …
>>>
>>>
>>>  Otherwise, let's continue:
>>>
>>>>
>>>>> Default to we don't have OpenGL
>>>>> If we can compile #include "SDL_opengl.h", we DO have OpenGL
>>>>>
>>>>>
>>>> for me, it seem that the :
>>>> AC_TRY_COMPILE([
>>>> #include "SDL_opengl.h"
>>>> ],[
>>>> ],[
>>>> have_opengl=yes
>>>> ])
>>>>
>>>> doesn't work
>>>> in fact at last I have opengl/opengles = no
>>>> maybe because the AC_PATH_X path before.
>>>>
>>>>
>>> Possibly.  The no input files error is bugging me.  Usually you get that
>>> when gcc is misconfigured or not installed in the right spot on mingw or
>>> something.  Well, one bug at a time.
>>>
>>> Let's leave this here in case someone is looking at this message without
>>> context and wants to try and interpret it:
>>>
>>>  Here what I have in config.log :
>>>
>>>>
>>>> configure:3594: checking for X
>>>> configure:3702: gcc -E  conftest.c
>>>> configure:3702: $? = 0
>>>> configure:3733: gcc -o conftest -g -O2 -I/usr/local/include/SDL2
>>>> -D_REENTRANT   conftest.c -lX11   -L/usr/local/lib
>>>> -Wl,-rpath,/usr/local/lib -lSDL2 -lpthread -lSDL2_test >&5
>>>> configure:3733: $? = 0
>>>> configure:3783: result: libraries , headers
>>>> configure:3805: checking for OpenGL support
>>>> configure:3822: gcc -c -g -O2 -I/usr/local/include/SDL2 -D_REENTRANT -I
>>>> conftest.c >&5
>>>> gcc: fatal error: no input files
>>>> compilation terminated.
>>>> configure:3822: $? = 4
>>>> configure: failed program was:
>>>> | /* confdefs.h */
>>>> | #define PACKAGE_NAME ""
>>>> | #define PACKAGE_TARNAME ""
>>>> | #define PACKAGE_VERSION ""
>>>> | #define PACKAGE_STRING ""
>>>> | #define PACKAGE_BUGREPORT ""
>>>> | #define PACKAGE_URL ""
>>>> | /* end confdefs.h.  */
>>>> |
>>>> |  #include "SDL_opengl.h"
>>>> |
>>>> | int
>>>> | main ()
>>>> | {
>>>> |
>>>> |
>>>> |   ;
>>>> |   return 0;
>>>> | }
>>>> configure:3828: result: no
>>>> configure:3831: checking for OpenGL ES support
>>>> configure:3852: gcc -c -g -O2 -I/usr/local/include/SDL2 -D_REENTRANT -I
>>>> conftest.c >&5
>>>> gcc: fatal error: no input files
>>>> compilation terminated.
>>>> configure:3852: $? = 4
>>>> configure: failed program was:
>>>> | /* confdefs.h */
>>>> | #define PACKAGE_NAME ""
>>>> | #define PACKAGE_TARNAME ""
>>>> | #define PACKAGE_VERSION ""
>>>> | #define PACKAGE_STRING ""
>>>> | #define PACKAGE_BUGREPORT ""
>>>> | #define PACKAGE_URL ""
>>>> | /* end confdefs.h.  */
>>>> |
>>>> |  #if defined (__IPHONEOS__)
>>>> |     #include <OpenGLES/ES1/gl.h>
>>>> |  #else
>>>> |     #include <GLES/gl.h>
>>>> |  #endif /* __QNXNTO__ */
>>>> |
>>>> | int
>>>> | main ()
>>>> | {
>>>> |
>>>> |
>>>> |   ;
>>>> |   return 0;
>>>> | }
>>>> configure:3858: result: no
>>>>
>>>> For the path, I don't modified something, it was installed here at the
>>>> package install step.
>>>>
>>>> Sorry if I forgive to give more informations, I'am not a specialist
>>>> with autotools:)
>>>>
>>>> Thank you for your help and time
>>>>
>>>>
>>> I'm happy to help.  I'd be a lot happier if I actually WAS some help…
>>>  It's been a freakin' decade since I dealt with autocrap.  I really did
>>> not
>>> miss it.  :D
>>>
>>> But it needs fixing, and fixing it is relevant to my interests, which
>>> involve nice, crunchy pi…
>>>
>>> Joseph
>>>
>>> ______________________________****_________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org
>>> http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org>
>>> <ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
>>> >
>>>
>>>
>>
>>
>> --
>> Gabriel.
>>
>
>  ______________________________**_________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
>>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>


-- 
Gabriel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20131009/234d553c/attachment-0009.htm>


More information about the SDL mailing list