X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=af7c8a9912cfada46b8e687390f82c8188752c6a;hb=182b16bccea2eab1a8af93a6246db3d391e436c7;hp=ea3c4b24f0f005ef474f1686100849fc3369b2d8;hpb=b38fc90a990ebdc9bb30525e1656f7fc80c3c170;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index ea3c4b2..af7c8a9 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -758,77 +758,23 @@ undefine([AC_CV_NAME])dnl undefine([AC_CV_NAME_supported])dnl ]) -dnl Based on AC_TRY_LINK - run iftrue if links cleanly with no warning -dnl FPTOOLS_TRY_LINK_NOWARN(flags,main?,iftrue,iffalse) - -AC_DEFUN(FPTOOLS_TRY_LINK_NOWARN, -[ -ac_save_LIBS="$LIBS" -LIBS=[$1]; -cat > conftest.$ac_ext <], [glEnd()]) + FP_CHECK_GL_HELPER([GL], [-lGL -lopengl32], [@%:@include ], [glEnd()]) + + if test x"$no_GL" != xyes; then + # 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"; GL_LIBS0="$GL_LIBS0 -lopengl32"]) + LIBS="$fp_save_LIBS" + ;; + esac + fi fi fi