From 69e27f1d9d475a94e61fa54af40ac7be06d872ca Mon Sep 17 00:00:00 2001 From: panne Date: Wed, 17 Dec 2003 08:38:14 +0000 Subject: [PATCH] [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. --- aclocal.m4 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index ea3c4b2..5e5d4c9 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 ], [glEnd()]) + FP_CHECK_GL_HELPER([GL], [-lGL -lopengl32], [@%:@include ], [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 ], [glEnd()], [GL_LIBS="$GL_LIBS -lopengl32"]) + LIBS="$fp_save_LIBS" + ;; + esac fi fi -- 1.7.10.4