From cf7fe6007ee6008037e63c8d9fc7ad9af8bc8d23 Mon Sep 17 00:00:00 2001 From: Matt Messier Date: Sat, 12 May 2007 23:02:00 -0400 Subject: X11 and video output plugin configuration check cleanups -- Move x11.m4 back into configure.ac, because AC_PATH_XTRA was behaving oddly inside a macro. That code is now cleaned up enough so that it's not too painful having it there. -- Move opengl.m4 inline into video_out.m4 -- Fix x11 checks to work on Darwin, including XShm checks, Xv checks, OpenGL, and GLU checks. --- m4/opengl.m4 | 74 ------------------------------------------------------------ 1 file changed, 74 deletions(-) delete mode 100644 m4/opengl.m4 (limited to 'm4/opengl.m4') diff --git a/m4/opengl.m4 b/m4/opengl.m4 deleted file mode 100644 index 2c12949d9..000000000 --- a/m4/opengl.m4 +++ /dev/null @@ -1,74 +0,0 @@ -dnl -dnl Check for OpenGL & GLU -dnl -dnl AM_PATH_OPENGL([ACTION IF FOUND [, ACTION IF NOT FOUND]]) -dnl - -AC_DEFUN([AM_PATH_OPENGL], [ - - AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [do not build OpenGL plugin]), - [enableopengl=$enableval], - [enableopengl="yes"] - ) - AC_ARG_ENABLE(glu, AS_HELP_STRING([--disable-glu], [build OpenGL plugin without GLU (no verbose errors)]), - [enableglu=$enableval], - [enableglu="yes"] - ) - - if test x$enableopengl = "xyes"; then - AC_CHECK_LIB(GL, glBegin, - [AC_CHECK_LIB(m, tan, - [AC_CHECK_HEADER(GL/gl.h, - [ac_have_opengl="yes" - OPENGL_LIBS="-lGL -lm" - AC_DEFINE(HAVE_OPENGL,1,[Define this if you have OpenGL support available]) - dnl - dnl need to check with some test if this linking with -lGLU actually works... - dnl check for GLU - dnl - if test x$enableglu = "xyes"; then - AC_CHECK_LIB(GLU, gluPerspective, - [AC_CHECK_HEADER(GL/glu.h, - [AC_MSG_CHECKING([if GLU is sane]) - ac_save_LIBS="$LIBS" - LIBS="$X_LIBS $XPRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include ]], [[ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ]])], - [ ac_have_glu="yes" - GLU_LIBS="-lGLU" - AC_DEFINE(HAVE_GLU,1,[Define this if you have GLU support available]) - AC_MSG_RESULT(yes)], - [ AC_MSG_RESULT(no) - echo "*** GLU doesn't link with GL; GLU is disabled ***"]) - LIBS="$ac_save_LIBS"] - )], - [], - [$X_LIBS $X_PRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS] - ) - fi - ] - )], - [], - [$X_LIBS $X_PRE_LIBS -lGL -lm $X_EXTRA_LIBS] - )], - [], - [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS] - ) - if test x$ac_have_opengl = "xyes"; then - ac_use_opengl=yes - fi - fi - - AC_SUBST(OPENGL_CFLAGS) - AC_SUBST(OPENGL_LIBS) - AC_SUBST(GLU_LIBS) - AM_CONDITIONAL(HAVE_OPENGL, [test x$ac_use_opengl = "xyes"]) - - dnl result - if test x$ac_use_opengl = "xyes"; then - ifelse([$1], , :, [$1]) - else - ifelse([$2], , :, [$2]) - fi - -]) -- cgit v1.2.3