Try to configure - compile the test

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

Did you install the library so that the tests can find it?

JosephOn Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

Hello Joseph,

I think,

I have GL/ GLES/ GLES2/ in /usr/include and lib in /usr/lib.

I have installed :

libgl1-mesa-dev
libgles1-mesa-dev
libglu1-mesa-dev

and some others library, but maybe I need more libs ?

Thank you

LoicOn Mon, Oct 7, 2013 at 8:55 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

Did you install the library so that the tests can find it?

Joseph

On Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Lo?c wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.
Unfortunately when I try ./configure on test directory, it seem that it
doesn’t find the opengl and opengl es

Yeah, I have similar issues. If you look at config.log and then
test/configure you’ll find the issues.

The script uses ac_x_includes and ac_x_libraries which are empty for
me and that causes it to set invalid include path and library path
command-line options for the config tests. Not sure where they should
get the paths from. If they’re also empty for you, try adding ./ or
something in front of it.

And then it does this.

GLLIB="“
if test x$have_opengles = xyes; then
CFLAGS=”$CFLAGS -DHAVE_OPENGLES"
GLLIB="$XPATH -lGLESv1_CM"
elif test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
else
GLLIB=""
fi

So if you have both, only the options for OpenGL ES will get added. I
think I changed it to this to make it work.

GLLIB="“
if test x$have_opengles = xyes; then
CFLAGS=”$CFLAGS -DHAVE_OPENGLES"
GLLIB="$XPATH -lGLESv1_CM"
fi
if test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$GLLIB $XPATH $SYS_GL_LIBS"
fi

I don’t know autotools at all. Perhaps someone can suggest proper fixes?

I think I may have found your problem. Basically, SDL uses a much
more advanced test. Secondly, SDL itself can handle both OpenGLES v1
and v2. The test is limited to v1. Have a look at the difference.
Fair warning, this is autoconf. It will drive you insane. :wink:

test/configure.in:

So what this does is attempt to see if you have either
OpenGLES/ES1/gl.h (on an iPhone) or GLES/gl.h (anywhere else). If
so, it assumes that you do have OpenGL ES and that the correct thing
to link is libGLESv1_CM with the appropriate suffix for your
platform. Simple. And it’s gonna fail if you don’t have that header
in that relative path in your include path.

That’s just too breakable IMO.

configure.in:

Okay, the first thing this code does is let you decide to enable or
disable OpenGL ES support in SDL, and specify where to look for it if
it’s not in your path. Someone needs to make a gles-config or even
just an opengl-config with a standard interface for determining where
and how to compile/link OpenGL, GLES, etc. and talk the vendors into
making it part of their standard driver packages. But that’s an
upstream issue?good luck talking them into it. :smiley:

Next it looks for EGL, again by including its header. This should
not be necessary for a test to do, since those details are handled by
SDL. And indeed, testgles.c doesn’t include those headers itself.
It lets SDL pull them in.

Then it looks for whether a program will compile including GLES/gl.h
and GLES/glext.h. That’s OpenGL ES v1 support. OpenGL ES v2 depends
on GLES2/gl2.h and GLES2/gl2ext.h in the same way.

Then you come to how you actually link these things? On an iPhone,
you need -Wl,-framework,OpenGLES (which is libtool’s way of
specifying -framework OpenGLES). BeOS needs an explicit -lGL. That
kind of thing. Otherwise, SDL binds OpenGL at runtime so that you
can sanely swap drivers. Not so necessary anymore, but once upon a
time the ability and need to do that was pretty significant. So much
so that I wrote a little SDL helper (not really a library) that kind
of gave you the same kind of setup SDL uses internally, but using the
qgl namespace used by Quake2/3 since Quake’s popular enough that the
namespace is now de facto reserved for that purpose. :wink: (But that’s
ancient history.)

So what I’m betting is that you have OpenGL ES v2, but not v1.
Nonetheless, though, I think the real solution to this is to change
test/configure.in to somehow ascertain from SDL whether OpenGL,
OpenGL ES v1, or OpenGL ES v2 is available.

That won’t get you testgles, if you have v2. In that case, your best
bet would be to modify testgles to support both via #ifdef macros or
straight up port the code into a testgles2.

JosephOn Mon, Oct 07, 2013 at 10:13:00PM +0200, Lo?c Maury wrote:

Hello Joseph,

I think,

I have GL/ GLES/ GLES2/ in /usr/include and lib in /usr/lib.

I have installed :

libgl1-mesa-dev
libgles1-mesa-dev
libglu1-mesa-dev

and some others library, but maybe I need more libs ?

Thank you

Loic

On Mon, Oct 7, 2013 at 8:55 PM, T. Joseph Carter < @T_Joseph_Carter> wrote:

Did you install the library so that the tests can find it?

Joseph

On Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://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

Hello,

Thank you for the help Norfanin and Joseph.

So I have changed the configure.in

I have first added this before test (if test x$have_x = xyes; then) :

ac_x_includes="/usr/include/X11/“
ac_x_libraries=”/usr/lib/X11/"

and removed this :

if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLLIB="$XPATH -lGLESv1_CM"
elif test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
else
GLLIB=""
fi

to this :

GLLIB="-lGLESv1_CM -lGL"
CFLAGS="$CFLAGS -DHAVE_OPENGLES -DHAVE_OPENGL"

and do :

autoreconf -i
./configure detect opengl and opengl es now
and make

and can launch the two examples :
./testgl2
./testgles

but there re something I don’t understand, testgl2 use opengl
and testgles use opengl es ?

but in make and the test in configure.in with (if test x$have_opengles =
xyes…)

it configure CFLAGS and GLLIB with opengles or with opengl but not boths,

but I have two programs one use opengl and the other opengl es or I
misunderstand ?

Thank you

LoicOn Tue, Oct 8, 2013 at 1:47 AM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

I think I may have found your problem. Basically, SDL uses a much more
advanced test. Secondly, SDL itself can handle both OpenGLES v1 and v2.
The test is limited to v1. Have a look at the difference. Fair warning,
this is autoconf. It will drive you insane. :wink:

test/configure.in:

So what this does is attempt to see if you have either OpenGLES/ES1/gl.h
(on an iPhone) or GLES/gl.h (anywhere else). If so, it assumes that you do
have OpenGL ES and that the correct thing to link is libGLESv1_CM with the
appropriate suffix for your platform. Simple. And it’s gonna fail if you
don’t have that header in that relative path in your include path.

That’s just too breakable IMO.

configure.in:

Okay, the first thing this code does is let you decide to enable or
disable OpenGL ES support in SDL, and specify where to look for it if it’s
not in your path. Someone needs to make a gles-config or even just an
opengl-config with a standard interface for determining where and how to
compile/link OpenGL, GLES, etc. and talk the vendors into making it part of
their standard driver packages. But that’s an upstream issue?good luck
talking them into it. :smiley:

Next it looks for EGL, again by including its header. This should not be
necessary for a test to do, since those details are handled by SDL. And
indeed, testgles.c doesn’t include those headers itself. It lets SDL pull
them in.

Then it looks for whether a program will compile including GLES/gl.h and
GLES/glext.h. That’s OpenGL ES v1 support. OpenGL ES v2 depends on
GLES2/gl2.h and GLES2/gl2ext.h in the same way.

Then you come to how you actually link these things? On an iPhone, you
need -Wl,-framework,OpenGLES (which is libtool’s way of specifying
-framework OpenGLES). BeOS needs an explicit -lGL. That kind of thing.
Otherwise, SDL binds OpenGL at runtime so that you can sanely swap
drivers. Not so necessary anymore, but once upon a time the ability and
need to do that was pretty significant. So much so that I wrote a little
SDL helper (not really a library) that kind of gave you the same kind of
setup SDL uses internally, but using the qgl namespace used by Quake2/3
since Quake’s popular enough that the namespace is now de facto reserved
for that purpose. :wink: (But that’s ancient history.)

So what I’m betting is that you have OpenGL ES v2, but not v1.
Nonetheless, though, I think the real solution to this is to change test/
configure.in to somehow ascertain from SDL whether OpenGL, OpenGL ES v1,
or OpenGL ES v2 is available.

That won’t get you testgles, if you have v2. In that case, your best bet
would be to modify testgles to support both via #ifdef macros or straight
up port the code into a testgles2.

Joseph

On Mon, Oct 07, 2013 at 10:13:00PM +0200, Lo?c Maury wrote:

Hello Joseph,

I think,

I have GL/ GLES/ GLES2/ in /usr/include and lib in /usr/lib.

I have installed :

libgl1-mesa-dev
libgles1-mesa-dev
libglu1-mesa-dev

and some others library, but maybe I need more libs ?

Thank you

Loic

On Mon, Oct 7, 2013 at 8:55 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

Did you install the library so that the tests can find it?

Joseph

On Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

_____________****
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s actually not a good solution, however it helps explain the
problem immensely! You said the includes were in /usr/include and
the libs were in /usr/lib, but they’re not, are they? Your
libGLESv1_CM lives in /usr/lib/X11 and your GLES/gl.h is in
/usr/include/X11.

These aren’t part of the default include and library search paths
unless you supply --with-x to that configure.in (since SDL is in no
way dependent upon X11 from an end-user perspective?unless you need
to pick up an OpenGL library that happens to be stashed in
/usr/lib/X11 of course!)

If so, try reverting configure.in, rebuilding it, and running:

./configure --with-x

Please report back if this fixes it. :slight_smile:

If it does, we’re still gonna have to twiddle this configure.in some
because the Raspberry Pi puts OpenGL ES in a very nonstandard place,
and it’s not part of the system search path. This issue has already
been raised in relation to SDL dynamically opening the OpenGL ES
libraries.

Thoughts, anyone?

JosephOn Tue, Oct 08, 2013 at 02:33:09PM +0200, Lo?c Maury wrote:

Hello,

Thank you for the help Norfanin and Joseph.

So I have changed the configure.in

I have first added this before test (if test x$have_x = xyes; then) :

ac_x_includes="/usr/include/X11/“
ac_x_libraries=”/usr/lib/X11/"

and removed this :

if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLLIB="$XPATH -lGLESv1_CM"
elif test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
else
GLLIB=""
fi

to this :

GLLIB="-lGLESv1_CM -lGL"
CFLAGS="$CFLAGS -DHAVE_OPENGLES -DHAVE_OPENGL"

and do :

autoreconf -i
./configure detect opengl and opengl es now
and make

and can launch the two examples :
./testgl2
./testgles

but there re something I don’t understand, testgl2 use opengl
and testgles use opengl es ?

but in make and the test in configure.in with (if test x$have_opengles =
xyes…)

it configure CFLAGS and GLLIB with opengles or with opengl but not boths,

but I have two programs one use opengl and the other opengl es or I
misunderstand ?

Thank you

Loic

On Tue, Oct 8, 2013 at 1:47 AM, T. Joseph Carter < @T_Joseph_Carter> wrote:

I think I may have found your problem. Basically, SDL uses a much more
advanced test. Secondly, SDL itself can handle both OpenGLES v1 and v2.
The test is limited to v1. Have a look at the difference. Fair warning,
this is autoconf. It will drive you insane. :wink:

test/configure.in:

So what this does is attempt to see if you have either OpenGLES/ES1/gl.h
(on an iPhone) or GLES/gl.h (anywhere else). If so, it assumes that you do
have OpenGL ES and that the correct thing to link is libGLESv1_CM with the
appropriate suffix for your platform. Simple. And it’s gonna fail if you
don’t have that header in that relative path in your include path.

That’s just too breakable IMO.

configure.in:

Okay, the first thing this code does is let you decide to enable or
disable OpenGL ES support in SDL, and specify where to look for it if it’s
not in your path. Someone needs to make a gles-config or even just an
opengl-config with a standard interface for determining where and how to
compile/link OpenGL, GLES, etc. and talk the vendors into making it part of
their standard driver packages. But that’s an upstream issue?good luck
talking them into it. :smiley:

Next it looks for EGL, again by including its header. This should not be
necessary for a test to do, since those details are handled by SDL. And
indeed, testgles.c doesn’t include those headers itself. It lets SDL pull
them in.

Then it looks for whether a program will compile including GLES/gl.h and
GLES/glext.h. That’s OpenGL ES v1 support. OpenGL ES v2 depends on
GLES2/gl2.h and GLES2/gl2ext.h in the same way.

Then you come to how you actually link these things? On an iPhone, you
need -Wl,-framework,OpenGLES (which is libtool’s way of specifying
-framework OpenGLES). BeOS needs an explicit -lGL. That kind of thing.
Otherwise, SDL binds OpenGL at runtime so that you can sanely swap
drivers. Not so necessary anymore, but once upon a time the ability and
need to do that was pretty significant. So much so that I wrote a little
SDL helper (not really a library) that kind of gave you the same kind of
setup SDL uses internally, but using the qgl namespace used by Quake2/3
since Quake’s popular enough that the namespace is now de facto reserved
for that purpose. :wink: (But that’s ancient history.)

So what I’m betting is that you have OpenGL ES v2, but not v1.
Nonetheless, though, I think the real solution to this is to change test/
configure.in to somehow ascertain from SDL whether OpenGL, OpenGL ES v1,
or OpenGL ES v2 is available.

That won’t get you testgles, if you have v2. In that case, your best bet
would be to modify testgles to support both via #ifdef macros or straight
up port the code into a testgles2.

Joseph

On Mon, Oct 07, 2013 at 10:13:00PM +0200, Lo?c Maury wrote:

Hello Joseph,

I think,

I have GL/ GLES/ GLES2/ in /usr/include and lib in /usr/lib.

I have installed :

libgl1-mesa-dev
libgles1-mesa-dev
libglu1-mesa-dev

and some others library, but maybe I need more libs ?

Thank you

Loic

On Mon, Oct 7, 2013 at 8:55 PM, T. Joseph Carter < @T_Joseph_Carter> wrote:

Did you install the library so that the tests can find it?

Joseph

On Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile the
test programs.

Unfortunately when I try ./configure on test directory, it seem that it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

_____________****
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://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

That’s actually not a good solution, however it helps explain the problem
immensely! You said the includes were in /usr/include and the libs were in
/usr/lib, but they’re not, are they? Your libGLESv1_CM lives in
/usr/lib/X11 and your GLES/gl.h is in /usr/include/X11.

In fact I have :

/usr/include/[GL/GLES/GLES2/X11] and /usr/lib/X11, and
/usr/lib/i386-linux-gnu/ the libgl*

I’am on debian.

These aren’t part of the default include and library search paths unless
you supply --with-x to that configure.in (since SDL is in no way
dependent upon X11 from an end-user perspective?unless you need to pick up
an OpenGL library that happens to be stashed in /usr/lib/X11 of course!)

If so, try reverting configure.in, rebuilding it, and running:

./configure --with-x

Unfortunately that doesn’t fix the issues :

./configure --with-x :
checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

./configure --without-x :
checking for X… disabled
checking for OpenGL support… yes
checking for OpenGL ES support… yes

but of course the command make failed.

Thank you

LoicOn Tue, Oct 8, 2013 at 2:57 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

Please report back if this fixes it. :slight_smile:

If it does, we’re still gonna have to twiddle this configure.in some
because the Raspberry Pi puts OpenGL ES in a very nonstandard place, and
it’s not part of the system search path. This issue has already been
raised in relation to SDL dynamically opening the OpenGL ES libraries.

Thoughts, anyone?

Joseph

On Tue, Oct 08, 2013 at 02:33:09PM +0200, Lo?c Maury wrote:

Hello,

Thank you for the help Norfanin and Joseph.

So I have changed the configure.in

I have first added this before test (if test x$have_x = xyes; then) :

ac_x_includes="/usr/include/**X11/“
ac_x_libraries=”/usr/lib/X11/"

and removed this :

if test x$have_opengles = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGLES"
GLLIB="$XPATH -lGLESv1_CM"
elif test x$have_opengl = xyes; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
GLLIB="$XPATH $SYS_GL_LIBS"
else
GLLIB=""
fi

to this :

GLLIB="-lGLESv1_CM -lGL"
CFLAGS="$CFLAGS -DHAVE_OPENGLES -DHAVE_OPENGL"

and do :

autoreconf -i
./configure detect opengl and opengl es now
and make

and can launch the two examples :
./testgl2
./testgles

but there re something I don’t understand, testgl2 use opengl
and testgles use opengl es ?

but in make and the test in configure.in with (if test x$have_opengles =
xyes…)

it configure CFLAGS and GLLIB with opengles or with opengl but not boths,

but I have two programs one use opengl and the other opengl es or I
misunderstand ?

Thank you

Loic

On Tue, Oct 8, 2013 at 1:47 AM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

I think I may have found your problem. Basically, SDL uses a much more

advanced test. Secondly, SDL itself can handle both OpenGLES v1 and v2.
The test is limited to v1. Have a look at the difference. Fair
warning,
this is autoconf. It will drive you insane. :wink:

test/configure.in:

So what this does is attempt to see if you have either OpenGLES/ES1/gl.h
(on an iPhone) or GLES/gl.h (anywhere else). If so, it assumes that you
do
have OpenGL ES and that the correct thing to link is libGLESv1_CM with
the
appropriate suffix for your platform. Simple. And it’s gonna fail if
you
don’t have that header in that relative path in your include path.

That’s just too breakable IMO.

configure.in:

Okay, the first thing this code does is let you decide to enable or
disable OpenGL ES support in SDL, and specify where to look for it if
it’s
not in your path. Someone needs to make a gles-config or even just an
opengl-config with a standard interface for determining where and how to
compile/link OpenGL, GLES, etc. and talk the vendors into making it part
of
their standard driver packages. But that’s an upstream issue?good luck
talking them into it. :smiley:

Next it looks for EGL, again by including its header. This should not be
necessary for a test to do, since those details are handled by SDL. And
indeed, testgles.c doesn’t include those headers itself. It lets SDL
pull
them in.

Then it looks for whether a program will compile including GLES/gl.h and
GLES/glext.h. That’s OpenGL ES v1 support. OpenGL ES v2 depends on
GLES2/gl2.h and GLES2/gl2ext.h in the same way.

Then you come to how you actually link these things? On an iPhone, you
need -Wl,-framework,OpenGLES (which is libtool’s way of specifying
-framework OpenGLES). BeOS needs an explicit -lGL. That kind of thing.
Otherwise, SDL binds OpenGL at runtime so that you can sanely swap
drivers. Not so necessary anymore, but once upon a time the ability and
need to do that was pretty significant. So much so that I wrote a little
SDL helper (not really a library) that kind of gave you the same kind of
setup SDL uses internally, but using the qgl namespace used by Quake2/3
since Quake’s popular enough that the namespace is now de facto reserved
for that purpose. :wink: (But that’s ancient history.)

So what I’m betting is that you have OpenGL ES v2, but not v1.
Nonetheless, though, I think the real solution to this is to change
test/
configure.in to somehow ascertain from SDL whether OpenGL, OpenGL ES v1,
or OpenGL ES v2 is available.

That won’t get you testgles, if you have v2. In that case, your best bet
would be to modify testgles to support both via #ifdef macros or straight
up port the code into a testgles2.

Joseph

On Mon, Oct 07, 2013 at 10:13:00PM +0200, Lo?c Maury wrote:

Hello Joseph,

I think,

I have GL/ GLES/ GLES2/ in /usr/include and lib in /usr/lib.

I have installed :

libgl1-mesa-dev
libgles1-mesa-dev
libglu1-mesa-dev

and some others library, but maybe I need more libs ?

Thank you

Loic

On Mon, Oct 7, 2013 at 8:55 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

Did you install the library so that the tests can find it?

Joseph

On Mon, Oct 07, 2013 at 06:37:31PM +0200, Lo?c Maury wrote:

Hello,

I have just downloaded the source code, compiled, and try to compile
the
test programs.

Unfortunately when I try ./configure on test directory, it seem that
it
doesn’t
find the opengl and opengl es :

checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

But was found when I have compiled the sdl library.

Do you have any idea ?

Thank you

Lo?c

_____________******
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.org
<ht
tp://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org

<http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht
tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________****

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________****
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/****listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s actually not a good solution, however it helps explain the problem
immensely! You said the includes were in /usr/include and the libs were in
/usr/lib, but they’re not, are they? Your libGLESv1_CM lives in
/usr/lib/X11 and your GLES/gl.h is in /usr/include/X11.

In fact I have :

/usr/include/[GL/GLES/GLES2/X11] and /usr/lib/X11, and
/usr/lib/i386-linux-gnu/ the libgl*

I’am on debian.

Doesn’t help me much. I’m on a Mac. :slight_smile:

These aren’t part of the default include and library search paths unless
you supply --with-x to that configure.in (since SDL is in no way
dependent upon X11 from an end-user perspective?unless you need to pick up
an OpenGL library that happens to be stashed in /usr/lib/X11 of course!)

If so, try reverting configure.in, rebuilding it, and running:

./configure --with-x

Unfortunately that doesn’t fix the issues :

./configure --with-x :
checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

./configure --without-x :
checking for X… disabled
checking for OpenGL support… yes
checking for OpenGL ES support… yes

but of course the command make failed.

Huh. Okay, from the top.

Basic setup, check.
Default: Not unix, not windows, and not mac.
If host is ? not matched otherwise:
We’re unix
We want -lm
Our system OpenGL is -lGL (which isn’t true for GLES, but?)
We look for SDL, and we obviously find it.
We look for X by default. I don’t know why I said otherwise before.
If we have X:
If NOT ac_x_includes are “no” or “None”:
Add them to CFLAGS
If NOT ac_x_libraries are “no” or “None”:
XPATH is set to whatever ac_x_libraries contains
if ac_x_libraries actually contains nothing:
Set XLIB to "-lX11"
else:
Set XLIB to “-L$ac_x_libraries -lX11”

? now somewhere before this point, you set ac_x_libraries and
ac_x_includes by hand. Where did you put that exactly? would you
mind 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.
Otherwise, let’s continue:

Default to we don’t have OpenGL
If we can compile #include “SDL_opengl.h”, we DO have OpenGL

? SDL_opengl.h includes windows.h on WIN32, OpenGL/gl.h on a Mac,
and GL/gl.h anywhere else. It may or may not then provide its own
glext.h. As long as those headers exist where needed, you are
considered to have OpenGL. Continuing:

Default to we don’t have OpenGL ES
If we can compile the OpenGL ES header, we have GLES

?If we can include OpenGLES/ES1/gl.h (iPhone) or GLES/gl.h (anything
else), then we have OpenGL ES. This is obviously failing, and you
haven’t really posted the bit of the configure log that’d say why it
is. I keep operating under the assumption it’s a missing include
path, but everything you’re telling me says that’s not it. If your X
paths are correct above, then the header isn’t compiling for some
reason and we need to figure out why.

In my case, the reason is obvious from config.log:

configure:3831: checking for OpenGL ES support
configure:3852: gcc -c -g -O2 -D_THREAD_SAFE
-I/opt/local/include/SDL2 -I -I/opt/local/include conftest.c >&5
conftest.c:13:25: error: GLES/gl.h: No such file or directory
configure:3852: $? = 1

Indeed, I do not have OpenGL ES. :slight_smile: Continuing:

Default GLLIB to nothing
If we have OpenGL ES:
Append -DHAVE_OPENGLES to CFLAGS
Set GLLIB to “$XPATH -lGLESv1_CM” (ahh, hardcoding?)
Else if we have OpenGL:
Append -DHAVE_OPENGL to CFLAGS
Set GLLIB to “$XPATH $SYS_GL_LIBS” (which was defined earlier)
Else:
Uselessly set GLLIB to nothing again :slight_smile:

Check for SDL_ttf
If we have it:
Append -DHAVE_SDL_TTF to CFLAGS
Set SDL_TTF_LIB to “-lSDL2_ttf”

Lastly, spit out a Makefile.

Okay, the first problem here is that we assume you need X (and just
X) to be able to find OpenGL in some unusual place. I already know
that breaks on Raspberry Pi. But you’re not running a Pi. And then
the test for OpenGL ES is failing. But you insist you have
/usr/include/GLES/gl.h so that shouldn’t fail. But it does. And the
answer is in config.log.

JosephOn Tue, Oct 08, 2013 at 04:44:49PM +0200, Lo?c Maury wrote:

On Tue, Oct 8, 2013 at 2:57 PM, T. Joseph Carter < @T_Joseph_Carter> wrote:

That’s actually not a good solution, however it helps explain the problem

immensely! You said the includes were in /usr/include and the libs were
in
/usr/lib, but they’re not, are they? Your libGLESv1_CM lives in
/usr/lib/X11 and your GLES/gl.h is in /usr/include/X11.

In fact I have :

/usr/include/[GL/GLES/GLES2/*X11] and /usr/lib/X11, and
/usr/lib/i386-linux-gnu/ the libgl

I’am on debian.

Doesn’t help me much. I’m on a Mac. :slight_smile:

These aren’t part of the default include and library search paths unless

you supply --with-x to that configure.in (since SDL is in no way
dependent upon X11 from an end-user perspective?unless you need to pick
up
an OpenGL library that happens to be stashed in /usr/lib/X11 of course!)

If so, try reverting configure.in, rebuilding it, and running:

./configure --with-x

Unfortunately that doesn’t fix the issues :

./configure --with-x :
checking for X… libraries , headers
checking for OpenGL support… no
checking for OpenGL ES support… no

./configure --without-x :
checking for X… disabled
checking for OpenGL support… yes
checking for OpenGL ES support… yes

but of course the command make failed.

Huh. Okay, from the top.

Basic setup, check.
Default: Not unix, not windows, and not mac.
If host is ? not matched otherwise:
We’re unix
We want -lm
Our system OpenGL is -lGL (which isn’t true for GLES, but?)
We look for SDL, and we obviously find it.
We look for X by default. I don’t know why I said otherwise before.
If we have X:
If NOT ac_x_includes are “no” or “None”:
Add them to CFLAGS
If NOT ac_x_libraries are “no” or “None”:
XPATH is set to whatever ac_x_libraries contains
if ac_x_libraries actually contains nothing:
Set XLIB to "-lX11"
else:
Set XLIB to “-L$ac_x_libraries -lX11”

? now somewhere before this point, you set ac_x_libraries and
ac_x_includes by hand. Where did you put that exactly? would you mind

I have replaced AC_PATH_X by the ac_x_include/ac_x_libraries,
and I have tried with configure --x-includes and --x-libraries, but change
nothing.

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 ?

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.

? SDL_opengl.h includes windows.h on WIN32, OpenGL/gl.h on a Mac, and
GL/gl.h anywhere else. It may or may not then provide its own glext.h. As
long as those headers exist where needed, you are considered to have
OpenGL. Continuing:

Default to we don’t have OpenGL ES
If we can compile the OpenGL ES header, we have GLES

?If we can include OpenGLES/ES1/gl.h (iPhone) or GLES/gl.h (anything
else), then we have OpenGL ES. This is obviously failing, and you haven’t
really posted the bit of the configure log that’d say why it is. I keep
operating under the assumption it’s a missing include path, but everything
you’re telling me says that’s not it. If your X paths are correct above,
then the header isn’t compiling for some reason and we need to figure out
why.

In my case, the reason is obvious from config.log:

configure:3831: checking for OpenGL ES support
configure:3852: gcc -c -g -O2 -D_THREAD_SAFE -I/opt/local/include/SDL2 -I
-I/opt/local/include conftest.c >&5
conftest.c:13:25: error: GLES/gl.h: No such file or directory
configure:3852: $? = 1

Indeed, I do not have OpenGL ES. :slight_smile: Continuing:

Default GLLIB to nothing
If we have OpenGL ES:
Append -DHAVE_OPENGLES to CFLAGS
Set GLLIB to “$XPATH -lGLESv1_CM” (ahh, hardcoding?)
Else if we have OpenGL:
Append -DHAVE_OPENGL to CFLAGS
Set GLLIB to “$XPATH $SYS_GL_LIBS” (which was defined earlier)
Else:
Uselessly set GLLIB to nothing again :slight_smile:

Check for SDL_ttf
If we have it:
Append -DHAVE_SDL_TTF to CFLAGS
Set SDL_TTF_LIB to “-lSDL2_ttf”

Lastly, spit out a Makefile.

Okay, the first problem here is that we assume you need X (and just X) to
be able to find OpenGL in some unusual place. I already know that breaks
on Raspberry Pi. But you’re not running a Pi. And then the test for
OpenGL ES is failing. But you insist you have /usr/include/GLES/gl.h so
that shouldn’t fail. But it does. And the answer is in config.log.

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

Lo?cOn Tue, Oct 8, 2013 at 6:47 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

On Tue, Oct 08, 2013 at 04:44:49PM +0200, Lo?c Maury wrote:

On Tue, Oct 8, 2013 at 2:57 PM, T. Joseph Carter < tjcarter at spiritsubstance.com> wrote:

Joseph

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

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. :smiley:

But it needs fixing, and fixing it is relevant to my interests, which
involve nice, crunchy pi?

JosephOn Tue, Oct 08, 2013 at 07:29:18PM +0200, Lo?c Maury wrote:

This should fix the GL and GLES problems in tests:

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)

2013/10/8 T. Joseph Carter > 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. :smiley:

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.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.

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.

JosephOn 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

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

2013/10/8 T. Joseph Carter <@T_Joseph_Carter>

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. :smiley:

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.orghttp://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

-------------- next part --------------
diff -r b8d4be87970a test/Makefile.in
— a/test/Makefile.in Mon Oct 07 14:16:38 2013 -0700
+++ b/test/Makefile.in Wed Oct 09 09:32:00 2013 -0700
@@ -121,10 +121,10 @@
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@

testgl2$(EXE): $(srcdir)/testgl2.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIBS@ @MATHLIB@

testgles$(EXE): $(srcdir)/testgles.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLES1LIBS@ @MATHLIB@

testhaptic$(EXE): $(srcdir)/testhaptic.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
@@ -194,7 +194,7 @@
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

testshader$(EXE): $(srcdir)/testshader.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIBS@ @MATHLIB@

testshape$(EXE): $(srcdir)/testshape.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
diff -r b8d4be87970a test/configure
— a/test/configure Mon Oct 07 14:16:38 2013 -0700
+++ b/test/configure Wed Oct 09 09:32:00 2013 -0700
@@ -586,7 +586,8 @@
LIBOBJS
SDL_TTF_LIB
XLIB
-GLLIB
+GLESLIBS
+GLLIBS
CPP
XMKMF
SDL_CONFIG
@@ -3451,7 +3452,7 @@
rm -f conf.sdltest

CFLAGS="$CFLAGS $SDL_CFLAGS"
-LIBS="$LIBS $SDL_LIBS -lSDL2_test"
+LIBS="$LIBS $SDL_LIBS -lSDL2_test"

ac_ext=c
ac_cpp=’$CPP $CPPFLAGS’
@@ -3785,25 +3786,29 @@
fi

if test x$have_x = xyes; then

  • if test x$ac_x_includes = xno || test “x$ac_x_includes” = xNone; then
  •    :
    
  • else
  •    CFLAGS="$CFLAGS -I$ac_x_includes"
    
  • fi
  • if test x$ac_x_libraries = xno || test “x$ac_x_libraries” = xNone; then
  •    :
    
  • else
  •    XPATH="-L$ac_x_libraries"
    
  •    if test "x$ac_x_libraries" = x; then
    
  • case “x$ac_x_includes” in
  •    "x"|"xno"|"xNone")
    
  •        ;;
    
  •    *)
    
  •        CFLAGS="$CFLAGS -I$ac_x_includes"
    
  •        ;;
    
  • esac
  • case “x$ac_x_libraries” in
  •    "x"|"xno"|"xNone")
    
  •        XPATH=""
           XLIB="-lX11"
    
  •    else
    
  •        XLIB="-L$ac_x_libraries -lX11"
    
  •    fi
    
  • fi
  •        ;;
    
  •    *)
    
  •        XPATH="-L$ac_x_libraries"
    
  •        XLIB="-L$ac_x_libraries $XLIB"
    
  •        ;;
    
  • esac
    fi

{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL support” >&5
$as_echo_n “checking for OpenGL support… " >&6; }
+GLLIBS=”"
have_opengl=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -3822,14 +3827,16 @@
if ac_fn_c_try_compile “$LINENO”; then :

have_opengl=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGL"
+GLLIBS="$XPATH $SYS_GL_LIBS"

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo “$as_me:${as_lineno-$LINENO}: result: $have_opengl” >&5
$as_echo “$have_opengl” >&6; }

-{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL ES support” >&5
-$as_echo_n "checking for OpenGL ES support… " >&6; }
+{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL ES v1 support” >&5
+$as_echo_n "checking for OpenGL ES v1 support… " >&6; }
have_opengles=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -3852,22 +3859,14 @@
if ac_fn_c_try_compile “$LINENO”; then :

have_opengles=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+GLES1LIBS="$XPATH -lGLESv1_CM"

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo “$as_me:${as_lineno-$LINENO}: result: $have_opengles” >&5
$as_echo “$have_opengles” >&6; }

-GLLIB=""
-if test x$have_opengles = xyes; then

  • CFLAGS="$CFLAGS -DHAVE_OPENGLES"
  • GLLIB="$XPATH -lGLESv1_CM"
    -elif test x$have_opengl = xyes; then
  • CFLAGS="$CFLAGS -DHAVE_OPENGL"
  • GLLIB="$XPATH $SYS_GL_LIBS"
    -else
  • GLLIB=""
    -fi

diff -r b8d4be87970a test/configure.in
— a/test/configure.in Mon Oct 07 14:16:38 2013 -0700
+++ b/test/configure.in Wed Oct 09 09:32:00 2013 -0700
@@ -91,36 +91,42 @@
dnl Check for X11 path, needed for OpenGL on some systems
AC_PATH_X
if test x$have_x = xyes; then

  • if test x$ac_x_includes = xno || test “x$ac_x_includes” = xNone; then
  •    :
    
  • else
  •    CFLAGS="$CFLAGS -I$ac_x_includes"
    
  • fi
  • if test x$ac_x_libraries = xno || test “x$ac_x_libraries” = xNone; then
  •    :
    
  • else
  •    XPATH="-L$ac_x_libraries"
    
  •    if test "x$ac_x_libraries" = x; then
    
  • case “x$ac_x_includes” in
  •    "x"|"xno"|"xNone")
    
  •        ;;
    
  •    *)
    
  •        CFLAGS="$CFLAGS -I$ac_x_includes"
    
  •        ;;
    
  • esac
  • case “x$ac_x_libraries” in
  •    "x"|"xno"|"xNone")
    
  •        XPATH=""
           XLIB="-lX11"
    
  •    else
    
  •        XLIB="-L$ac_x_libraries -lX11"
    
  •    fi
    
  • fi
  •        ;;
    
  •    *)
    
  •        XPATH="-L$ac_x_libraries"
    
  •        XLIB="-L$ac_x_libraries $XLIB"
    
  •        ;;
    
  • esac
    fi

dnl Check for OpenGL
AC_MSG_CHECKING(for OpenGL support)
+GLLIBS="“
have_opengl=no
AC_TRY_COMPILE([
#include “SDL_opengl.h”
],[
],[
have_opengl=yes
+CFLAGS=”$CFLAGS -DHAVE_OPENGL"
+GLLIBS="$XPATH $SYS_GL_LIBS"
])
AC_MSG_RESULT($have_opengl)

-dnl Check for OpenGL ES
-AC_MSG_CHECKING(for OpenGL ES support)
+dnl Check for OpenGL ES v1
+AC_MSG_CHECKING(for OpenGL ES v1 support)
have_opengles=no
AC_TRY_COMPILE([
#if defined (IPHONEOS)
@@ -131,21 +137,13 @@
],[
],[
have_opengles=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+GLES1LIBS="$XPATH -lGLESv1_CM"
])
AC_MSG_RESULT($have_opengles)

-GLLIB=""
-if test x$have_opengles = xyes; then

  • CFLAGS="$CFLAGS -DHAVE_OPENGLES"
  • GLLIB="$XPATH -lGLESv1_CM"
    -elif test x$have_opengl = xyes; then
  • CFLAGS="$CFLAGS -DHAVE_OPENGL"
  • GLLIB="$XPATH $SYS_GL_LIBS"
    -else
  • GLLIB=""
    -fi

-AC_SUBST(GLLIB)
+AC_SUBST(GLLIBS)
+AC_SUBST(GLESLIBS)
AC_SUBST(XLIB)

dnl Check for SDL_ttf

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 > 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/**7995e0920bf9http://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.**gifhttp://www.geekosystem.com/wp-content/uploads/2012/06/v40g6.gif

2013/10/8 T. Joseph Carter

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. :smiley:

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.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://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.orghttp://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.

Somehow I sent the BEFORE resolving conflicts patch. Dropbox being
less awesome than usual. :confused:

Nutshell:

Makefile.in:
GLLIB -> GLLIBS
GLESLIB -> GLES1LIBS (for when there is also a GLES2LIBS test)

configure.in:
Changed how XPATH/CFLAGS/etc get set in the X check
Changed where the GL and GLES defines get set

Still missing:
Prefix for Raspberry Pi. Because I don’t know it.

Now let’s try again with the correct patch this time.

JosephOn Wed, Oct 09, 2013 at 02:08:45PM -0300, Gabriel Jacobo wrote:

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 <@T_Joseph_Carter>

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/**7995e0920bf9http://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.**gifhttp://www.geekosystem.com/wp-content/uploads/2012/06/v40g6.gif

2013/10/8 T. Joseph Carter <@T_Joseph_Carter>

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. :smiley:

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.orghttp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org
<ht**tp://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://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.orghttp://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.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-------------- next part --------------
diff -r 7995e0920bf9 test/Makefile.in
— a/test/Makefile.in Wed Oct 09 11:30:01 2013 -0300
+++ b/test/Makefile.in Wed Oct 09 10:25:05 2013 -0700
@@ -121,10 +121,10 @@
$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@

testgl2$(EXE): $(srcdir)/testgl2.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIBS@ @MATHLIB@

testgles$(EXE): $(srcdir)/testgles.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLES1LIBS@ @MATHLIB@

testhaptic$(EXE): $(srcdir)/testhaptic.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
@@ -194,7 +194,7 @@
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

testshader$(EXE): $(srcdir)/testshader.c

  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
  • $(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIBS@ @MATHLIB@

testshape$(EXE): $(srcdir)/testshape.c
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
diff -r 7995e0920bf9 test/configure
— a/test/configure Wed Oct 09 11:30:01 2013 -0300
+++ b/test/configure Wed Oct 09 10:25:05 2013 -0700
@@ -586,8 +586,8 @@
LIBOBJS
SDL_TTF_LIB
XLIB
-GLLIB
-GLESLIB
+GLES1LIBS
+GLLIBS
CPP
XMKMF
SDL_CONFIG
@@ -3452,7 +3452,7 @@
rm -f conf.sdltest

CFLAGS="$CFLAGS $SDL_CFLAGS"
-LIBS="$LIBS $SDL_LIBS -lSDL2_test"
+LIBS="$LIBS $SDL_LIBS -lSDL2_test"

ac_ext=c
ac_cpp=’$CPP $CPPFLAGS’
@@ -3786,26 +3786,29 @@
fi

if test x$have_x = xyes; then

  • if test x$ac_x_includes = xno || test “x$ac_x_includes” = xNone || test “x$ac_x_includes” = x; then
  •    :
    
  • else
  •    CFLAGS="$CFLAGS -I$ac_x_includes"
    
  • fi
  • if test x$ac_x_libraries = xno || test “x$ac_x_libraries” = xNone; then
  •    :
    
  • else
  •    if test "x$ac_x_libraries" = x; then
    
  • case “x$ac_x_includes” in
  •    "x"|"xno"|"xNone")
    
  •        ;;
    
  •    *)
    
  •        CFLAGS="$CFLAGS -I$ac_x_includes"
    
  •        ;;
    
  • esac
  • case “x$ac_x_libraries” in
  •    "x"|"xno"|"xNone")
           XPATH=""
           XLIB="-lX11"
    
  •    else
    
  •        ;;
    
  •    *)
           XPATH="-L$ac_x_libraries"
    
  •        XLIB="-L$ac_x_libraries -lX11"
    
  •    fi
    
  • fi
  •        XLIB="-L$ac_x_libraries $XLIB"
    
  •        ;;
    
  • esac
    fi

{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL support” >&5
$as_echo_n “checking for OpenGL support… " >&6; }
+GLLIBS=”"
have_opengl=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -3824,14 +3827,16 @@
if ac_fn_c_try_compile “$LINENO”; then :

have_opengl=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGL"
+GLLIBS="$XPATH $SYS_GL_LIBS"

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo “$as_me:${as_lineno-$LINENO}: result: $have_opengl” >&5
$as_echo “$have_opengl” >&6; }

-{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL ES support” >&5
-$as_echo_n "checking for OpenGL ES support… " >&6; }
+{ $as_echo “$as_me:${as_lineno-$LINENO}: checking for OpenGL ES v1 support” >&5
+$as_echo_n "checking for OpenGL ES v1 support… " >&6; }
have_opengles=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -3854,22 +3859,14 @@
if ac_fn_c_try_compile “$LINENO”; then :

have_opengles=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+GLES1LIBS="$XPATH -lGLESv1_CM"

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo “$as_me:${as_lineno-$LINENO}: result: $have_opengles” >&5
$as_echo “$have_opengles” >&6; }

-GLLIB=""
-GLESLIB=""
-if test x$have_opengles = xyes; then

  • CFLAGS="$CFLAGS -DHAVE_OPENGLES"
  • GLESLIB="$XPATH -lGLESv1_CM"
    -fi
    -if test x$have_opengl = xyes; then
  • CFLAGS="$CFLAGS -DHAVE_OPENGL"
  • GLLIB="$XPATH $SYS_GL_LIBS"
    -fi

diff -r 7995e0920bf9 test/configure.in
— a/test/configure.in Wed Oct 09 11:30:01 2013 -0300
+++ b/test/configure.in Wed Oct 09 10:25:05 2013 -0700
@@ -91,37 +91,42 @@
dnl Check for X11 path, needed for OpenGL on some systems
AC_PATH_X
if test x$have_x = xyes; then

  • if test x$ac_x_includes = xno || test “x$ac_x_includes” = xNone || test “x$ac_x_includes” = x; then
  •    :
    
  • else
  •    CFLAGS="$CFLAGS -I$ac_x_includes"
    
  • fi
  • if test x$ac_x_libraries = xno || test “x$ac_x_libraries” = xNone; then
  •    :
    
  • else
  •    if test "x$ac_x_libraries" = x; then
    
  • case “x$ac_x_includes” in
  •    "x"|"xno"|"xNone")
    
  •        ;;
    
  •    *)
    
  •        CFLAGS="$CFLAGS -I$ac_x_includes"
    
  •        ;;
    
  • esac
  • case “x$ac_x_libraries” in
  •    "x"|"xno"|"xNone")
           XPATH=""
           XLIB="-lX11"
    
  •    else
    
  •        ;;
    
  •    *)
           XPATH="-L$ac_x_libraries"
    
  •        XLIB="-L$ac_x_libraries -lX11"
    
  •    fi
    
  • fi
  •        XLIB="-L$ac_x_libraries $XLIB"
    
  •        ;;
    
  • esac
    fi

dnl Check for OpenGL
AC_MSG_CHECKING(for OpenGL support)
+GLLIBS="“
have_opengl=no
AC_TRY_COMPILE([
#include “SDL_opengl.h”
],[
],[
have_opengl=yes
+CFLAGS=”$CFLAGS -DHAVE_OPENGL"
+GLLIBS="$XPATH $SYS_GL_LIBS"
])
AC_MSG_RESULT($have_opengl)

-dnl Check for OpenGL ES
-AC_MSG_CHECKING(for OpenGL ES support)
+dnl Check for OpenGL ES v1
+AC_MSG_CHECKING(for OpenGL ES v1 support)
have_opengles=no
AC_TRY_COMPILE([
#if defined (IPHONEOS)
@@ -132,22 +137,13 @@
],[
],[
have_opengles=yes
+CFLAGS="$CFLAGS -DHAVE_OPENGLES"
+GLES1LIBS="$XPATH -lGLESv1_CM"
])
AC_MSG_RESULT($have_opengles)

-GLLIB=""
-GLESLIB=""
-if test x$have_opengles = xyes; then

  • CFLAGS="$CFLAGS -DHAVE_OPENGLES"
  • GLESLIB="$XPATH -lGLESv1_CM"
    -fi
    -if test x$have_opengl = xyes; then
  • CFLAGS="$CFLAGS -DHAVE_OPENGL"
  • GLLIB="$XPATH $SYS_GL_LIBS"
    -fi

-AC_SUBST(GLLIB)
-AC_SUBST(GLESLIB)
+AC_SUBST(GLLIBS)
+AC_SUBST(GLES1LIBS)
AC_SUBST(XLIB)

dnl Check for SDL_ttf

Gabriel Jacobo wrote:

http://hg.libsdl.org/SDL/rev/7995e0920bf9

The added SDL_GL_SetAttribute to testgles does not have the desired
effect. This flag must be set before the window gets created or the
wrong library gets loaded. I think the state struct needs profile_mask
setting so it can push that properly before it creates the windows.

2013/10/10 Norfanin

Gabriel Jacobo wrote:

http://hg.libsdl.org/SDL/rev/7995e0920bf9

The added SDL_GL_SetAttribute to testgles does not have the desired
effect. This flag must be set before the window gets created or the
wrong library gets loaded. I think the state struct needs profile_mask
setting so it can push that properly before it creates the windows.

There you go: http://hg.libsdl.org/SDL/rev/75c80f36038e

Still, for it to work on Linux/nVidia you have to use the compile line I
gave before :(–
Gabriel.