Skip to content

Commit

Permalink
Final touches to OSMesa OpenGL support on Atari, using loadable libra…
Browse files Browse the repository at this point in the history
…ries. Hope SDL 1.2.8 is out soon.
  • Loading branch information
pmandin committed Nov 26, 2004
1 parent 165d005 commit c532a58
Show file tree
Hide file tree
Showing 6 changed files with 536 additions and 130 deletions.
20 changes: 17 additions & 3 deletions configure.in
Expand Up @@ -1133,20 +1133,34 @@ dnl Check for Mesa offscreen rendering
CheckAtariOSMesa()
{
if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)

# Static linking to -lOSMesa
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
# -lOSMesa is really the static library
if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
CFLAGS="$CFLAGS -DHAVE_OPENGL"
SYSTEM_LIBS="$SYSTEM_LIBS -lOSMesa"
fi
else
# -lOSMesa is a loader for OSMesa.ldg
OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
OSMESA_LIBS=`$OSMESA_CONFIG --libs`
CFLAGS="$CFLAGS -DHAVE_OPENGL $OSMESA_CFLAGS"
CFLAGS="$CFLAGS -DHAVE_OPENGL $OSMESA_CFLAGS"
SYSTEM_LIBS="$SYSTEM_LIBS $OSMESA_LIBS"
fi

AC_ARG_ENABLE(osmesa-shared,
[ --enable-osmesa-shared dynamically load OSMesa OpenGL support [default=yes]],
, enable_osmesa_shared=yes)
if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
# Dynamic linking
if test "x$have_osmesa_hdr" = "xyes"; then
CFLAGS="$CFLAGS -DENABLE_OSMESA_SHARED"
fi
fi
fi
}

Expand Down

0 comments on commit c532a58

Please sign in to comment.