diff options
author | panne <unknown> | 2003-12-17 08:38:14 +0000 |
---|---|---|
committer | panne <unknown> | 2003-12-17 08:38:14 +0000 |
commit | 69e27f1d9d475a94e61fa54af40ac7be06d872ca (patch) | |
tree | d6ff8bf76706c2444e25b2ebf74d3de5f4d0786b /aclocal.m4 | |
parent | cb2be98ac73ffcc2e2cd631de403e83569a12b4d (diff) | |
download | haskell-69e27f1d9d475a94e61fa54af40ac7be06d872ca.tar.gz |
[project @ 2003-12-17 08:38:14 by panne]
To get wglGetProcAddress on Windows, we have to link with
opengl32.dll, too, even when we are using Cygwin with X11.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index ea3c4b24f0..5e5d4c91e8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -997,7 +997,18 @@ else test -n "$x_libraries" && GL_LIBS="-L$x_libraries -lX11 $GL_LIBS" fi - FP_CHECK_GL_HELPER([GL], [-lopengl32 -lGL], [@%:@include <GL/gl.h>], [glEnd()]) + FP_CHECK_GL_HELPER([GL], [-lGL -lopengl32], [@%:@include <GL/gl.h>], [glEnd()]) + + # Ugly: To get wglGetProcAddress on Windows, we have to link with + # opengl32.dll, too, even when we are using Cygwin with X11. + case "$GL_LIBS" in + *-lopengl32*|*opengl32.lib*) ;; + *) fp_save_LIBS="$LIBS" + LIBS="$LIBS -lopengl32" + AC_TRY_LINK([@%:@include <GL/gl.h>], [glEnd()], [GL_LIBS="$GL_LIBS -lopengl32"]) + LIBS="$fp_save_LIBS" + ;; + esac fi fi |