Browse Source

Enabled headless build in autotools

Bart van Strien 14 years ago
parent
commit
3460bf918c
3 changed files with 10 additions and 0 deletions
  1. 3 0
      configure.in
  2. 6 0
      src/common/config.h
  3. 1 0
      src/modules/thread/Thread.h

+ 3 - 0
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_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([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_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([
 AC_CONFIG_FILES([
 	Makefile
 	Makefile
 	src/Makefile
 	src/Makefile

+ 6 - 0
src/common/config.h

@@ -68,4 +68,10 @@
 #	define NOMINMAX
 #	define NOMINMAX
 #endif
 #endif
 
 
+// Autotools config.h
+#ifdef HAVE_CONFIG_H
+#	include <../config.h>
+#	undef VERSION
+#endif
+
 #endif // LOVE_CONFIG_H
 #endif // LOVE_CONFIG_H

+ 1 - 0
src/modules/thread/Thread.h

@@ -24,6 +24,7 @@
 // STL
 // STL
 #include <map>
 #include <map>
 #include <string>
 #include <string>
+#include <string.h>
 
 
 // LOVE
 // LOVE
 #include <filesystem/File.h>
 #include <filesystem/File.h>