1
0
Fork 0

Check for opengl support

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1610
This commit is contained in:
Sjoerd van der Berg 2004-01-28 14:23:55 +00:00
parent 670928f590
commit 2cfb92f5c6

View file

@ -132,7 +132,6 @@ else
AC_MSG_RESULT(no)
fi
AH_TEMPLATE(C_SSHOT,[Define to 1 to enable screenshots, requires libpng])
AC_CHECK_HEADER(png.h,have_png_h=yes,)
AC_CHECK_LIB(png, png_check_sig, have_png_lib=yes, ,-lz)
@ -153,6 +152,24 @@ else
AC_MSG_WARN([Can't find SDL_net, internal modem disabled])
fi
AH_TEMPLATE(C_OPENGL,[Define to 1 to use opengl display output support])
AC_ARG_ENABLE(opengl,AC_HELP_STRING([--disable-opengl],[Disable opengl support]),,enable_opengl=yes)
AC_CHECK_LIB(GL, main, have_gl_lib=yes, have_gl_lib=no , )
AC_CHECK_LIB(opengl32, main, have_opengl32_lib=yes,have_opengl32_lib=no , )
AC_CHECK_HEADER(GL/gl.h, have_gl_h=yes , have_gl_h=no , )
AC_MSG_CHECKING(whether opengl display output will be enabled)
if test x$enable_opengl = xyes -a x$have_gl_h = xyes -a x$have_gl_lib = xyes ; then
AC_MSG_RESULT(yes)
LIBS="$LIBS -lGL"
AC_DEFINE(C_OPENGL,1)
elif test x$enable_opengl = xyes -a x$have_gl_h = xyes -a x$have_opengl32_lib = xyes ; then
AC_MSG_RESULT(yes)
LIBS="$LIBS -lopengl32"
AC_DEFINE(C_OPENGL,1)
else
AC_MSG_RESULT(no)
fi
dnl Some host detection and actions for them
case "$target" in
*-*-cygwin* | *-*-mingw32*)
@ -171,6 +188,7 @@ case "$target" in
;;
esac
AC_OUTPUT([
Makefile
src/Makefile