diff --git a/configure.in b/configure.in index 5bf91e817..c6ec9fbb8 100644 --- a/configure.in +++ b/configure.in @@ -1444,9 +1444,12 @@ CheckMacGL() AC_DEFINE(SDL_VIDEO_OPENGL) case "$host" in *-*-darwin*) - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL" - # The following is probably not available in Darwin: - EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL" + if test x$enable_video_cocoa = xyes; then + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL" + fi + if test x$enable_video_carbon = xyes; then + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AGL" + fi esac fi }