From 3460bf918cb157f18d35d2c6d5ab7a5585ddb6c7 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Wed, 8 Jun 2011 17:14:41 +0200 Subject: [PATCH] Enabled headless build in autotools --- configure.in | 3 +++ src/common/config.h | 6 ++++++ src/modules/thread/Thread.h | 1 + 3 files changed, 10 insertions(+) diff --git a/configure.in b/configure.in index d2a393dca..e88aa3f95 100644 --- a/configure.in +++ b/configure.in @@ -39,6 +39,9 @@ AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123])) AC_SEARCH_LIBS([mpg123_seek_64], [mpg123], AC_SUBST([FILE_OFFSET],[-D_FILE_OFFSET_BITS=64]), AC_SUBST([FILE_OFFSET],[])) AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile])) +AC_ARG_ENABLE([headless], + [ --enable-headless Build with less SDL], + AC_DEFINE([LOVE_HEADLESS], [], [Build with less SDL]), []) AC_CONFIG_FILES([ Makefile src/Makefile diff --git a/src/common/config.h b/src/common/config.h index fec797d6a..bfd8f80c7 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -68,4 +68,10 @@ # define NOMINMAX #endif +// Autotools config.h +#ifdef HAVE_CONFIG_H +# include <../config.h> +# undef VERSION +#endif + #endif // LOVE_CONFIG_H diff --git a/src/modules/thread/Thread.h b/src/modules/thread/Thread.h index 2d1d5ace9..85ee791a8 100644 --- a/src/modules/thread/Thread.h +++ b/src/modules/thread/Thread.h @@ -24,6 +24,7 @@ // STL #include #include +#include // LOVE #include