From 2cfb92f5c6bc64998e9a830b931252c1ba500b49 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Wed, 28 Jan 2004 14:23:55 +0000 Subject: [PATCH] Check for opengl support Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1610 --- configure.in | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 12a1512d..ad483f7b 100644 --- a/configure.in +++ b/configure.in @@ -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