Fix libGL.a check on configure

Anderson Lizardo andersonlizardo at yahoo.com.br
Thu Jun 30 00:54:22 CDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ove Kaaven wrote:
> ons, 29,.06.2005 kl. 20.11 -0400, skrev Anderson Lizardo:
> 
>>Changelog: Check for common broken nVidia+Mesa OpenGL library setups.
>>http://cvs.winehq.org/cvsweb/wine/Attic/configure.in.diff?r1=1.247&r2=1.248&f=h
>>
>>The current "test" check definitely does not ensure the system doesn't
>>have this "broken" setup. As you said, it should be better to let
>>autoconf do the check properly with AC_CHECK_LIB.
> 
> 
> Certainly does. The broken setup is as follows:
> 
> /usr/lib/libGL.so <- belongs to nvidia
> /usr/lib/libGL.a <- no such thing
> /usr/X11R6/lib/libGL.so <- deleted by nvidia installer
> /usr/X11R6/lib/libGL.a <- still exists, belongs to Mesa
> 
> Linking will succeed whatever you do, but if you don't check for this
> setup, Wine will be statically linked to Mesa here, and users will
> complain about no hardware acceleration. The AC_MSG_ERROR just puts this
> in terms that users understand, even though it's not an accurate
> message, and probably why you didn't see the point of the check.

Hi,

Based on your broken setup description, I've made a simple test case
that (hopefully) correctly checks if the OpenGL setup is broken or not.

Can you run it and return the results? I've attached both the
configure.ac file and the already assembled configure script (gzipped).

I would expect "OpenGL setup is OK!" on a correct setup, "OpenGL setup
is broken!" on a broken one and "OpenGL support is not compilable" if
OpenGL dev files are not installed.

Based on your results, I'll send the (hopefully) final patch.

Thanks,
- --
Anderson Lizardo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFCw4kNtyCO/xz4QpMRAnQAAJ4yZaWvfV19t7nfm6/nqqZDKIk56ACeJHbs
PXMNRRSsdII19+rSes26LLo=
=RjjN
-----END PGP SIGNATURE-----
-------------- next part --------------
AC_PREREQ(2.53)
AC_INIT([TestCase],0.1,[none])
AC_PATH_XTRA

AC_CHECK_HEADERS(GL/gl.h GL/glx.h)
if test "$ac_cv_header_GL_gl_h" = "yes" -a "$ac_cv_header_GL_glx_h" = "yes"
then
    AC_CHECK_LIB(GL,glXCreateContext,OPENGL_LIBS="-lGL",,
         $X_LIBS -lXext -lX11 -lm $X_EXTRA_LIBS)
    if test "$ac_cv_lib_GL_glXCreateContext" = "yes"
    then
        AC_MSG_NOTICE([OpenGL setup is OK!])
    else
        AC_MSG_ERROR([OpenGL setup is broken!])
    fi
else
    AC_MSG_NOTICE([OpenGL support is not compilable])
fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.gz
Type: application/x-gzip
Size: 22637 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050630/8966957f/configure.bin


More information about the wine-devel mailing list