diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-04-20 17:52:23 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2011-05-03 14:44:11 +0200 |
commit | c1b7ecac3f51a2818bf7abd00d27f0475b507ba1 (patch) | |
tree | cd02685384dc83a5daa42e95678ebb5048b0c38c /configure.ac | |
parent | 7e30572ab1d51d5b8a7f6f9b9a3472d59a0ea167 (diff) | |
download | spice-c1b7ecac3f51a2818bf7abd00d27f0475b507ba1.tar.gz spice-c1b7ecac3f51a2818bf7abd00d27f0475b507ba1.tar.xz spice-c1b7ecac3f51a2818bf7abd00d27f0475b507ba1.zip |
use AC_DEFINE instead of hardcoding preprocessor flags
Now that all source files include config.h, we can use AC_DEFINE
to enable/disable optional features (opengl, cegui). This is
cleaner than directly appending -Dxxx directives to the preprocessor
flags. This also guarantees that everything will be appropriately
rebuilt when using the same source tree to build first with opengl
support and then without (the config.h timestamp will change,
triggering a rebuild of the files including it)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 7e77672d..23c814f1 100644 --- a/configure.ac +++ b/configure.ac @@ -173,13 +173,13 @@ if test "x$enable_gui" = "xyes"; then [ AC_SUBST(CEGUI06_CFLAGS) AC_SUBST(CEGUI06_LIBS) - CEGUI06_CFLAGS+="-DUSE_GUI" + AC_DEFINE([USE_GUI], [1], [Define to build with CEGUI support]) ], [ PKG_CHECK_MODULES(CEGUI, CEGUI >= 0.6.0 CEGUI < 0.7.0) AC_SUBST(CEGUI_CFLAGS) AC_SUBST(CEGUI_LIBS) - CEGUI_CFLAGS+="-DUSE_GUI" + AC_DEFINE([USE_GUI], [1], [Define to build with CEGUI support]) ]) fi @@ -232,7 +232,8 @@ SPICE_REQUIRES+=" openssl" if test "x$enable_opengl" = "xyes"; then AC_CHECK_LIB(GL, glBlendFunc, GL_LIBS="$GL_LIBS -lGL", enable_opengl=no) AC_CHECK_LIB(GLU, gluSphere, GL_LIBS="$GL_LIBS -lGLU", enable_opengl=no) - GL_CFLAGS="-DGL_GLEXT_PROTOTYPES -DUSE_OGL" + AC_DEFINE([USE_OGL], [1], [Define to build with OpenGL support]) + AC_DEFINE([GL_GLEXT_PROTOTYPES], [], [Enable GLExt prototypes]) if test "x$enable_opengl" = "xno"; then AC_MSG_ERROR([GL libraries not available]) |