Compare commits
7 Commits
RELEASE_0_
...
RELEASE_0_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1818102ffe | ||
|
|
406d6dd6fc | ||
|
|
c8ef854f01 | ||
|
|
87dcaf5a00 | ||
|
|
c3bdd0e537 | ||
|
|
c23fd6e66f | ||
|
|
e809eee896 |
13
NEWS
13
NEWS
@@ -1,14 +1,7 @@
|
||||
New in 0.0.19pre2
|
||||
* September 1, 2002
|
||||
New in 0.2.0
|
||||
* September 6, 2002
|
||||
|
||||
* Fixed various build problems (one show stopper with the interpreters
|
||||
subdir)
|
||||
|
||||
|
||||
New in 0.0.19pre1
|
||||
* August 31, 2002
|
||||
|
||||
* Modernized the autoconf/make scripts.
|
||||
* Modernized the autoconf/make scripts, plus lots of tweaks and enhancements.
|
||||
* Removed efence support (in favor of valgrind.)
|
||||
|
||||
* Added a javascript interpreter.
|
||||
|
||||
16
README.plib
Normal file
16
README.plib
Normal file
@@ -0,0 +1,16 @@
|
||||
[This file is mirrored in both the FlightGear and SimGear packages.]
|
||||
|
||||
You *must* have plib version 1.6.0 or later installed on your system
|
||||
to build FlightGear!" Flight Gear is no longer compatible with the
|
||||
earlier versions of the library.
|
||||
|
||||
You can get the latest version of plib from:
|
||||
|
||||
http://plib.sourceforge.net
|
||||
|
||||
Build notes:
|
||||
|
||||
You should be able to just run "./configure" to configure the package
|
||||
and use all of plib's defaults. Then run "make" followed by "make
|
||||
install". By default, plib installs itself into /usr so if you don't
|
||||
like this, be sure to specify an alternate prefix such as --prefix=/usr/local
|
||||
@@ -102,7 +102,7 @@ for exdir in $exdirs ; do
|
||||
mylibdir="${exdir}/lib${subexdir}"
|
||||
wi_EXTRA_LDIR($mylibdir)
|
||||
|
||||
progdir="${exdir}/bin${subexdirr}"
|
||||
progdir="${exdir}/bin${subexdir}"
|
||||
wi_EXTRA_PDIR($progdir)
|
||||
fi
|
||||
done
|
||||
|
||||
40
autogen.sh
40
autogen.sh
@@ -2,21 +2,23 @@
|
||||
|
||||
OSTYPE=`uname -s`
|
||||
MACHINE=`uname -m`
|
||||
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[0-9]$//' | sed -e 's/\.//'`
|
||||
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\.\([0-9]*\).*/\1/'`
|
||||
if test $AUTO_MAKE_VERSION -lt 15; then
|
||||
echo ""
|
||||
echo "You need to upgrade to automake version 1.5 or greater."
|
||||
echo "Most distributions have packages available to install or you can"
|
||||
echo "find the source for the most recent version at"
|
||||
echo "ftp://ftp.gnu.org/gnu/automake"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Host info: $OSTYPE $MACHINE"
|
||||
echo -n " automake: `automake --version | head -1 | awk '{print $4}'`"
|
||||
echo " ($AUTO_MAKE_VERSION)"
|
||||
echo ""
|
||||
|
||||
ACLOCAL_OPTS=""
|
||||
if [ $AUTO_MAKE_VERSION -ge 14 ]; then
|
||||
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then echo " -I ."
|
||||
ACLOCAL_OPTS="-I ."
|
||||
fi
|
||||
fi
|
||||
echo "Running aclocal $ACLOCAL_OPTS"
|
||||
aclocal $ACLOCAL_OPTS
|
||||
echo "Running aclocal"
|
||||
aclocal
|
||||
|
||||
echo "Running autoheader"
|
||||
autoheader
|
||||
@@ -25,14 +27,8 @@ if [ ! -e simgear/simgear_config.h.in ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n "Running automake"
|
||||
if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then
|
||||
echo " --add-missing --include-deps"
|
||||
automake --add-missing --include-deps
|
||||
else
|
||||
echo " --add-missing"
|
||||
automake --add-missing
|
||||
fi
|
||||
echo "Running automake --add-missing"
|
||||
automake --add-missing
|
||||
|
||||
echo "Running autoconf"
|
||||
autoconf
|
||||
@@ -42,16 +38,6 @@ if [ ! -e configure ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# fixup Makefiles for Irix
|
||||
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
|
||||
echo "Fixing Makefiles for Irix"
|
||||
for n in `find . -name Makefile.in`; do \
|
||||
mv -f $n $n.ar-new; \
|
||||
sed 's/$(AR) cru /$(AR) -o /g' $n.ar-new > $n; \
|
||||
rm -f $n.ar-new; \
|
||||
done;
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "======================================"
|
||||
|
||||
|
||||
50
configure.ac
50
configure.ac
@@ -10,7 +10,7 @@ AC_CONFIG_SRCDIR([simgear/bucket/newbucket.cxx])
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
dnl Initialize the automake stuff
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.0.19pre2)
|
||||
AM_INIT_AUTOMAKE(SimGear, 0.2.0)
|
||||
|
||||
dnl Specify KAI C++ compiler and flags.
|
||||
dnl Borrowed with slight modification from blitz distribution.
|
||||
@@ -38,14 +38,20 @@ AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
|
||||
# Used on the Irix platform
|
||||
AR="ar"
|
||||
ARFLAGS="cru"
|
||||
OS=`uname -s`
|
||||
if test "$OS" = "IRIX" -o "$OS" = "IRIX64"; then
|
||||
if test "$CXX" = "CC"; then
|
||||
AR="CC -ar"
|
||||
AC_SUBST(AR)
|
||||
ARFLAGS="-o"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(AR)
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
|
||||
if echo $includedir | egrep "simgear$" > /dev/null; then
|
||||
echo "includedir is" $includedir "libdir is" $libdir
|
||||
@@ -54,12 +60,6 @@ else
|
||||
echo "includedir changed to" $includedir "libdir is" $libdir
|
||||
fi
|
||||
|
||||
# Determine version of automake ... important because of
|
||||
# incompatibilities between versions
|
||||
AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[[0-9]]$//' | sed -e 's/\.//'`
|
||||
AM_CONDITIONAL(ANCIENT_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 14)
|
||||
AM_CONDITIONAL(OLD_AUTOMAKE, test $AUTO_MAKE_VERSION -lt 15)
|
||||
|
||||
# set logging default value
|
||||
# with_logging=yes
|
||||
AC_ARG_WITH(logging, [ --with-logging Include logging output (default)])
|
||||
@@ -113,7 +113,7 @@ AM_CONDITIONAL(IS_CYGWIN, test "x$is_cygwin" = "xyes")
|
||||
|
||||
if test "x$HOSTTYPE" != "xmacintosh" -a "x$is_mingw" != "xyes"; then
|
||||
dnl extra library and include directories
|
||||
EXTRA_DIRS="/usr/local /usr/local/plib /usr/X11R6"
|
||||
EXTRA_DIRS="/usr/local /usr/X11R6"
|
||||
|
||||
if test -d /opt/X11R6 ; then
|
||||
EXTRA_DIRS="$EXTRA_DIRS /opt/X11R6"
|
||||
@@ -271,11 +271,11 @@ AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
dnl Check for "plib" without which we cannot go on
|
||||
AC_CHECK_HEADER(plib/pu.h)
|
||||
if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
|
||||
AC_CHECK_HEADER(plib/ul.h)
|
||||
if test "x$ac_cv_header_plib_ul_h" != "xyes"; then
|
||||
echo
|
||||
echo "You *must* have the plib library installed on your system to build"
|
||||
echo "the FGFS simulator!"
|
||||
echo "SimGear!"
|
||||
echo
|
||||
echo "Please see README.plib for more details."
|
||||
echo
|
||||
@@ -283,10 +283,28 @@ if test "x$ac_cv_header_plib_pu_h" != "xyes"; then
|
||||
exit
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(plib/ssgaLensFlare.h)
|
||||
if test "x$ac_cv_header_plib_ssgaLensFlare_h" = "xyes"; then
|
||||
AC_DEFINE([FG_CHEESY_LENS_FLARE], 1, [Define for cheesy lens flare effect])
|
||||
fi
|
||||
AC_MSG_CHECKING([for plib 1.6.0 or newer])
|
||||
AC_TRY_RUN([
|
||||
#include <plib/ul.h>
|
||||
|
||||
#define MIN_PLIB_VERSION 160
|
||||
|
||||
int main() {
|
||||
int major, minor, micro;
|
||||
|
||||
if ( PLIB_VERSION < MIN_PLIB_VERSION ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
],
|
||||
AC_MSG_RESULT(yes),
|
||||
[AC_MSG_RESULT(wrong version);
|
||||
AC_MSG_ERROR([Install plib 1.6.0 or later first...])],
|
||||
AC_MSG_RESULT(yes)
|
||||
)
|
||||
|
||||
dnl Check for system installed metakit
|
||||
AC_CHECK_HEADER(mk4.h)
|
||||
|
||||
@@ -38,7 +38,7 @@ tcp_server_LDADD = \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lz
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
|
||||
tcp_client_SOURCES = tcp_client.cxx
|
||||
|
||||
@@ -48,7 +48,7 @@ tcp_client_LDADD = \
|
||||
$(top_builddir)/simgear/bucket/libsgbucket.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lz
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
|
||||
socktest_SOURCES = socktest.cxx
|
||||
|
||||
@@ -58,7 +58,7 @@ socktest_LDADD = \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
-lplibnet -lz
|
||||
-lplibnet -lplibul -lz $(NETWORK_LIB)
|
||||
|
||||
lowtest_SOURCES = lowtest.cxx
|
||||
|
||||
@@ -73,4 +73,4 @@ decode_binobj_LDADD = \
|
||||
$(top_builddir)/simgear/misc/libsgmisc.a \
|
||||
$(top_builddir)/simgear/debug/libsgdebug.a \
|
||||
$(top_builddir)/simgear/xml/libsgxml.a \
|
||||
$(NETWORK_LIB) -lz
|
||||
-lz
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#include <simgear/compiler.h>
|
||||
#include STL_IOSTREAM
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
|
||||
@@ -72,7 +77,11 @@ main()
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
client.process();
|
||||
#ifdef _WIN32
|
||||
Sleep(1000);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
//client.close();
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
includedir = @includedir@/serial
|
||||
|
||||
noinst_PROGRAMS = testserial
|
||||
|
||||
lib_LIBRARIES = libsgserial.a
|
||||
|
||||
include_HEADERS = serial.hxx
|
||||
|
||||
libsgserial_a_SOURCES = serial.cxx
|
||||
|
||||
noinst_PROGRAMS = testserial
|
||||
|
||||
testserial_SOURCES = testserial.cxx
|
||||
|
||||
testserial_LDADD = \
|
||||
|
||||
@@ -37,7 +37,10 @@
|
||||
#include <plib/sg.h>
|
||||
#include <plib/ssg.h>
|
||||
|
||||
#ifdef FG_PLIB_SUPPORTS_LENS_FLARE
|
||||
// define the following to enable a cheesy lens flare effect for the sun
|
||||
// #define FG_TEST_CHEESY_LENS_FLARE
|
||||
|
||||
#ifdef FG_TEST_CHEESY_LENS_FLARE
|
||||
# include <plib/ssgaLensFlare.h>
|
||||
#endif
|
||||
|
||||
@@ -314,14 +317,9 @@ ssgBranch * SGSun::build( SGPath path, double sun_size ) {
|
||||
sun_transform->addKid( halo );
|
||||
sun_transform->addKid( orb );
|
||||
|
||||
#if 0
|
||||
// enable this code to add a super cheesy lens flare effect to the sun.
|
||||
|
||||
# ifdef FG_PLIB_SUPPORTS_LENS_FLARE
|
||||
#ifdef FG_TEST_CHEESY_LENS_FLARE
|
||||
// cheesy lens flair
|
||||
sun_transform->addKid( new ssgaLensFlare );
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
return sun_transform;
|
||||
|
||||
@@ -49,6 +49,31 @@ SGMutex::trylock()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
int gettimeofday(struct timeval* tp, void* tzp) {
|
||||
LARGE_INTEGER t;
|
||||
|
||||
if(QueryPerformanceCounter(&t)) {
|
||||
/* hardware supports a performance counter */
|
||||
LARGE_INTEGER f;
|
||||
QueryPerformanceFrequency(&f);
|
||||
tp->tv_sec = t.QuadPart/f.QuadPart;
|
||||
tp->tv_usec = ((float)t.QuadPart/f.QuadPart*1000*1000)
|
||||
- (tp->tv_sec*1000*1000);
|
||||
} else {
|
||||
/* hardware doesn't support a performance counter, so get the
|
||||
time in a more traditional way. */
|
||||
DWORD t;
|
||||
t = timeGetTime();
|
||||
tp->tv_sec = t / 1000;
|
||||
tp->tv_usec = t % 1000;
|
||||
}
|
||||
|
||||
/* 0 indicates that the call succeeded. */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
SGCondition::wait( SGMutex& mutex, unsigned long ms )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user