]> git.mxchange.org Git - simgear.git/commitdiff
Ralf Gerlich: add headless mode to SimGear (merging simgear-cs)
authorJames Turner <zakalawe@mac.com>
Fri, 6 Aug 2010 18:16:29 +0000 (19:16 +0100)
committerJames Turner <zakalawe@mac.com>
Fri, 6 Aug 2010 18:17:14 +0000 (19:17 +0100)
configure.ac
simgear/Makefile.am
simgear/bucket/newbucket.hxx

index 41a7ada0377be9ec6421b5ff7a53bd30f52d7c25..910d35ae053acbdcef9eac34ba66c51fb66accaf 100644 (file)
@@ -24,6 +24,14 @@ AC_ARG_WITH(cxx,
   esac
 ])
 
+AC_ARG_ENABLE(headless,
+        AS_HELP_STRING([--enable-headless],[Enable only packages for headless build]))
+
+AC_MSG_CHECKING([for headless mode])
+AC_MSG_RESULT([$enable_headless])
+
+AM_CONDITIONAL(WANT_HEADLESS,[test "x$enable_headless" = "xyes"])
+
 AC_MSG_CHECKING([CXX])
 AC_MSG_RESULT([$CXX])
 AC_MSG_CHECKING([CC])
@@ -379,7 +387,7 @@ case "${host}" in
 
 esac
 
-if test "$OPENAL_OK" == "no"; then
+if test "$OPENAL_OK" == "no" -a "x$enable_headless" != "xyes"; then
     echo
     echo "You *must* have the openal library installed on your system to build"
     echo "SimGear!"
@@ -390,7 +398,7 @@ if test "$OPENAL_OK" == "no"; then
     exit
 fi
 
-if test "$ALUT_OK" == "no"; then
+if test "$ALUT_OK" == "no" -a "x$enable_headless" != "xyes"; then
     echo
     echo "You *must* have the alut library installed on your system to build"
     echo "SimGear!"
index 1f67b560ed78e115300cfd2fa0d307993165fa17..e198a54bd836d0e0f902ab81af4cffc6d35959da 100644 (file)
@@ -1,11 +1,22 @@
-# METAR_DIRS =
-METAR_DIRS = environment
-
 EXTRA_DIST = simgear_config.h.vc5 simgear_config.h-msvc71 version.h.in
 
 include_HEADERS = \
        compiler.h constants.h sg_inlines.h version.h
 
+if WANT_HEADLESS
+METAR_DIRS =
+SG_EXTRA_DIRS =
+else
+SG_EXTRA_DIRS = scene sound screen
+METAR_DIRS = environment
+endif
+
+if HAVE_THREADS
+SGTHREAD_DIR = threads
+else
+SGTHREAD_DIR = 
+endif
+
 SUBDIRS = \
        $(compatibility_DIR) \
        xml \
@@ -21,11 +32,9 @@ SUBDIRS = \
        nasal \
        props \
        route \
-       scene \
-       screen \
+       $(SG_EXTRA_DIRS) \
+       $(SGTHREAD_DIR) \
        serial \
-       threads \
        timing \
-       sound 
 
 DIST_SUBDIRS = $(SUBDIRS) compatibility
index d3e8783af3372c34830ed901c6ce17129a739fe8..58008e5c06ec21735b3dc3ec045df8709e2e9ab7 100644 (file)
@@ -329,7 +329,7 @@ void sgBucketDiff( const SGBucket& b1, const SGBucket& b2, int *dx, int *dy );
 inline std::ostream&
 operator<< ( std::ostream& out, const SGBucket& b )
 {
-    return out << b.lon << ":" << b.x << ", " << b.lat << ":" << b.y;
+    return out << b.lon << ":" << (int)b.x << ", " << b.lat << ":" << (int)b.y;
 }