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 <GL/gl.h>],
+ [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 <GL/glx.h>],
+ [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
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"])