From: Dana Jansens Date: Fri, 1 Feb 2008 05:09:56 +0000 (-0500) Subject: check for compositing manager support requested. require all the appropriate etension... X-Git-Tag: compgl~21 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=f4066983971e1a3c4df83798e9ce033984b7b138;p=dana%2Fopenbox.git check for compositing manager support requested. require all the appropriate etensions if so, and set USE_COMPOSITING --- diff --git a/configure.ac b/configure.ac index 5d080401..3cdfea13 100644 --- a/configure.ac +++ b/configure.ac @@ -184,66 +184,75 @@ else xcursor_found=no fi -AC_ARG_ENABLE(xcomposite, +AC_ARG_ENABLE(compositing, AC_HELP_STRING( - [--disable-xcomposite], - [disable use of the X Composite library. [[default=enabled]]] + [--disable-compositing], + [disable the built-in compositing manager [[default=enabled]]] ), - [enable_xcomposite=$enableval], - [enable_xcomposite=yes] + [enable_compositing=$enableval], + [enable_compositing=yes] ) -if test "$enable_xcomposite" = yes; then -PKG_CHECK_MODULES(XRENDER, [xrender], - [ - AC_DEFINE(USE_XRENDER, [1], [Use X Render library]) - AC_SUBST(XRENDER_CFLAGS) - AC_SUBST(XRENDER_LIBS) - PKG_CHECK_MODULES(XDAMAGE, [xdamage], - [ - AC_DEFINE(USE_XDAMAGE, [1], [Use X Damage library]) - AC_SUBST(XDAMAGE_CFLAGS) - AC_SUBST(XDAMAGE_LIBS) - PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite], - [ - AC_DEFINE(USE_XCOMPOSITE, [1], [Use X Composite library]) - AC_SUBST(XCOMPOSITE_CFLAGS) - AC_SUBST(XCOMPOSITE_LIBS) - xcomposite_found=yes - ], - [ - xcomposite_found=no - ] - ) - ], - [ - xcomposite_found=no - ] - ) - ], - [ - xcomposite_found=no - ] -) +AC_MSG_CHECKING(if compositing manager support should be enabled) +AC_MSG_RESULT($enable_compositing) + +if test "$enable_compositing" = yes; then + PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite]) + AC_SUBST(XCOMPOSITE_CFLAGS) + AC_SUBST(XCOMPOSITE_LIBS) + + PKG_CHECK_MODULES([XRENDER], [xrender]) + AC_SUBST(XRENDER_CFLAGS) + AC_SUBST(XRENDER_LIBS) + + PKG_CHECK_MODULES(XDAMAGE, [xdamage]) + AC_SUBST(XDAMAGE_CFLAGS) + AC_SUBST(XDAMAGE_LIBS) + + PKG_CHECK_MODULES(XFIXES, [xfixes]) + AC_SUBST(XDAMAGE_CFLAGS) + AC_SUBST(XDAMAGE_LIBS) + + AC_MSG_CHECKING(for GL_CFLAGS) + AC_ARG_WITH(gl-cflags, [ --with-gl-cflags=CFLAGS ], + [GL_CFLAGS="$withval"], + [GL_CFLAGS=""]) + + AC_MSG_RESULT($GL_CFLAGS) + AC_MSG_CHECKING(for GL_LIBS) + AC_ARG_WITH(gl-libs, [ --with-gl-libs=LIBS ], + [GL_LIBS="$withval"], + [GL_LIBS="-lGL"]) + AC_MSG_RESULT($GL_LIBS) + + AC_CHECK_LIB([GL], [glPopMatrix], , + AC_MSG_ERROR([Could not find glPopMatrix in -lGL.])) + + AC_MSG_CHECKING([for GL/gl.h]) + AC_TRY_COMPILE( + [#include ], + [GLenum e = GL_INVALID_ENUM;], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Could not compile with GL/gl.h])]) + + AC_MSG_CHECKING([for GL/glx.h]) + AC_TRY_COMPILE( + [#include ], + [int i = GLX_USE_GL;], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Could not compile with GL/glx.h])]) + + AC_SUBST(GL_CFLAGS) + AC_SUBST(GL_LIBS) + + AC_DEFINE(USE_COMPOSITING, [1], [Support being a compositing manager]) + do_compositing="yes" else - xcomposite_found=no + do_compositing="no" fi -AC_MSG_CHECKING(for GL_CFLAGS) -AC_ARG_WITH(gl-cflags, [ --with-gl-cflags=CFLAGS ], - [GL_CFLAGS="$withval"], - [GL_CFLAGS=""]) - -AC_MSG_RESULT($GL_CFLAGS) -AC_MSG_CHECKING(for GL_LIBS) -AC_ARG_WITH(gl-libs, [ --with-gl-libs=LIBS ], - [GL_LIBS="$withval"], - [GL_LIBS="-lGL"]) -AC_MSG_RESULT($GL_LIBS) - -AC_SUBST(GL_CFLAGS) -AC_SUBST(GL_LIBS) - dnl Check for session management X11_SM @@ -280,7 +289,7 @@ AC_MSG_RESULT AC_MSG_RESULT([Compiling with these options: Startup Notification... $sn_found X Cursor Library... $xcursor_found - X Composite Library... $xcomposite_found Session Management... $SM + Compositing manager... $do_compositing ]) AC_MSG_RESULT([configure complete, now type "make"])