rpms/SimGear/devel SimGear-1.0.0-more-archs.patch, NONE, 1.1 SimGear-1.0.0-shared-auto.patch, NONE, 1.1 SimGear-1.0.0-shared.patch, NONE, 1.1 SimGear-1.0.0-untangle.patch, NONE, 1.1
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Sun Jan 6 17:49:51 UTC 2008
Author: jwrdegoede
Update of /cvs/extras/rpms/SimGear/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26448
Added Files:
SimGear-1.0.0-more-archs.patch SimGear-1.0.0-shared-auto.patch
SimGear-1.0.0-shared.patch SimGear-1.0.0-untangle.patch
Log Message:
* Sun Jan 6 2008 Hans de Goede <j.w.r.degoede at hhs.nl> 1.0.0-1
- Update to new upstream release 1.0.0
- Port various patches to 1.0.0
SimGear-1.0.0-more-archs.patch:
--- NEW FILE SimGear-1.0.0-more-archs.patch ---
--- SimGear-1.0.0/simgear/nasal/naref.h.orig 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/nasal/naref.h 2008-01-05 10:10:21.000000000 +0100
@@ -14,7 +14,7 @@
defined(__ia64__) || defined(_M_IA64) || defined(__ARMEL__)
# define NASAL_LE
#elif defined(__sparc) || defined(__ppc__) ||defined(__PPC) || \
- defined(__mips) || defined(__ARMEB__)
+ defined(__mips) || defined(__ARMEB__) || defined (__powerpc__) || defined (__powerpc64__) || defined (__alpha__)
# define NASAL_BE
#else
# error Unrecognized CPU architecture
SimGear-1.0.0-shared-auto.patch:
--- NEW FILE SimGear-1.0.0-shared-auto.patch ---
diff -urN SimGear-1.0.0.orig/INSTALL SimGear-1.0.0/INSTALL
--- SimGear-1.0.0.orig/INSTALL 2006-11-25 13:03:38.000000000 +0100
+++ SimGear-1.0.0/INSTALL 2008-01-06 17:25:56.000000000 +0100
@@ -1,8 +1,8 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
@@ -10,7 +10,10 @@
Basic Installation
==================
-These are generic installation instructions.
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -23,9 +26,9 @@
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. (Caching is
+the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
-cache files.)
+cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
@@ -35,20 +38,17 @@
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You only need
-`configure.ac' if you want to change it or regenerate `configure' using
-a newer version of `autoconf'.
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system. If you're
- using `csh' on an old version of System V, you might need to type
- `sh ./configure' instead to prevent `csh' from trying to execute
- `configure' itself.
+ `./configure' to configure the package for your system.
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
2. Type `make' to compile the package.
@@ -78,7 +78,7 @@
by setting variables in the command line or in the environment. Here
is an example:
- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
@@ -87,17 +87,15 @@
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'. `cd' to the
+own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
- If you have to use a `make' that does not support the `VPATH'
-variable, you have to compile the package for one architecture at a
-time in the source code directory. After you have installed the
-package for one architecture, use `make distclean' before reconfiguring
-for another architecture.
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
Installation Names
==================
@@ -190,12 +188,12 @@
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script). Here is a another example:
+overridden in the site shell script).
- /bin/bash ./configure CONFIG_SHELL=/bin/bash
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
-Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
-configuration-related scripts to be executed by `/bin/bash'.
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
diff -urN SimGear-1.0.0.orig/Makefile.in SimGear-1.0.0/Makefile.in
--- SimGear-1.0.0.orig/Makefile.in 2007-12-11 06:37:25.000000000 +0100
+++ SimGear-1.0.0/Makefile.in 2008-01-06 17:25:56.000000000 +0100
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -35,18 +31,19 @@
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/SimGear.spec.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- TODO config.guess config.sub depcomp install-sh missing
-subdir = .
+ TODO config.guess config.sub depcomp install-sh ltmain.sh \
+ missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/simgear/simgear_config.h
CONFIG_CLEAN_FILES = SimGear.spec
@@ -54,10 +51,13 @@
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -73,8 +73,6 @@
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARFLAGS = @ARFLAGS@
@@ -94,20 +92,16 @@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+ECHO = @ECHO@
[...118977 lines suppressed...]
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmlparse.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmlrole.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmltok.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/easyxml.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hashtable.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmlparse.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmlrole.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xmltok.Plo at am__quote@
.c.o:
- at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
- at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+.c.lo:
+ at am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
.cxx.o:
- at am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
- at am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cxx.obj:
- at am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
- at am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-uninstall-info-am:
+
+.cxx.lo:
+ at am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -390,22 +419,21 @@
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -418,10 +446,10 @@
done
check-am: all-am
check: check-am
-all-am: Makefile $(LIBRARIES) $(HEADERS)
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -449,7 +477,8 @@
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -469,12 +498,20 @@
install-data-am: install-includeHEADERS
-install-exec-am: install-libLIBRARIES
+install-dvi: install-dvi-am
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -484,7 +521,8 @@
mostlyclean: mostlyclean-am
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
pdf: pdf-am
@@ -494,21 +532,24 @@
ps-am:
-uninstall-am: uninstall-includeHEADERS uninstall-info-am \
- uninstall-libLIBRARIES
+uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLIBRARIES ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am \
- install-includeHEADERS install-info install-info-am \
- install-libLIBRARIES install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-includeHEADERS install-info \
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-includeHEADERS uninstall-info-am \
- uninstall-libLIBRARIES
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-includeHEADERS \
+ uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
SimGear-1.0.0-shared.patch:
--- NEW FILE SimGear-1.0.0-shared.patch ---
diff -up SimGear-1.0.0/configure.ac.share SimGear-1.0.0/configure.ac
--- SimGear-1.0.0/configure.ac.share 2007-12-11 06:36:08.000000000 +0100
+++ SimGear-1.0.0/configure.ac 2008-01-05 10:03:09.000000000 +0100
@@ -3,6 +3,7 @@ dnl script.
AC_INIT
AC_CONFIG_SRCDIR([simgear/bucket/newbucket.cxx])
+AC_PROG_LIBTOOL
dnl Require at least automake 2.52
AC_PREREQ(2.52)
diff -up SimGear-1.0.0/simgear/scene/material/Makefile.am.share SimGear-1.0.0/simgear/scene/material/Makefile.am
--- SimGear-1.0.0/simgear/scene/material/Makefile.am.share 2003-05-15 18:19:56.000000000 +0200
+++ SimGear-1.0.0/simgear/scene/material/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/scene/material
-lib_LIBRARIES = libsgmaterial.a
+lib_LTLIBRARIES = libsgmaterial.la
noinst_HEADERS =
@@ -9,9 +9,17 @@ include_HEADERS = \
matlib.hxx \
matmodel.hxx
-libsgmaterial_a_SOURCES = \
+libsgmaterial_la_SOURCES = \
mat.cxx \
matlib.cxx \
matmodel.cxx
+libsgmaterial_la_LDFLAGS = -release @VERSION@ -module -lplibssg -lGL
+
+libsgmaterial_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/math/libsgmath.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/scene/sky/Makefile.am.share SimGear-1.0.0/simgear/scene/sky/Makefile.am
--- SimGear-1.0.0/simgear/scene/sky/Makefile.am.share 2005-06-25 13:22:06.000000000 +0200
+++ SimGear-1.0.0/simgear/scene/sky/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/scene/sky
-lib_LIBRARIES = libsgsky.a
+lib_LTLIBRARIES = libsgsky.la
include_HEADERS = \
cloud.hxx \
@@ -14,7 +14,7 @@ include_HEADERS = \
cloudfield.hxx \
newcloud.hxx
-libsgsky_a_SOURCES = \
+libsgsky_la_SOURCES = \
cloud.cxx \
dome.cxx \
moon.cxx \
@@ -26,4 +26,14 @@ libsgsky_a_SOURCES = \
cloudfield.cxx \
newcloud.cxx
+libsgsky_la_LDFLAGS = -release @VERSION@ -module -lplibssg -lplibul -lplibsg \
+ -lGL -lGLU
+
+libsgsky_la_LIBADD = \
+ $(top_builddir)/simgear/screen/libsgscreen.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/math/libsgmath.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/scene/tgdb/Makefile.am.share SimGear-1.0.0/simgear/scene/tgdb/Makefile.am
--- SimGear-1.0.0/simgear/scene/tgdb/Makefile.am.share 2007-11-17 08:35:45.000000000 +0100
+++ SimGear-1.0.0/simgear/scene/tgdb/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/scene/tgdb
-lib_LIBRARIES = libsgtgdb.a
+lib_LTLIBRARIES = libsgtgdb.la
noinst_HEADERS =
@@ -12,11 +12,21 @@ include_HEADERS = \
userdata.hxx \
vasi.hxx
-libsgtgdb_a_SOURCES = \
+libsgtgdb_la_SOURCES = \
apt_signs.cxx \
leaf.cxx \
obj.cxx \
pt_lights.cxx \
userdata.cxx
+libsgtgdb_la_LDFLAGS = -release @VERSION@ -module -lplibssg -lplibul -lGL
+
+libsgtgdb_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/scene/material/libsgmaterial.la \
+ $(top_builddir)/simgear/scene/screen/libsgscreen.la \
+ $(top_builddir)/simgear/math/libsgmath.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/scene/model/Makefile.am.share SimGear-1.0.0/simgear/scene/model/Makefile.am
--- SimGear-1.0.0/simgear/scene/model/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/scene/model/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/scene/model
-lib_LIBRARIES = libsgmodel.a
+lib_LTLIBRARIES = libsgmodel.la
noinst_HEADERS =
@@ -16,7 +16,7 @@ include_HEADERS = \
placementtrans.hxx \
shadowvolume.hxx
-libsgmodel_a_SOURCES = \
+libsgmodel_la_SOURCES = \
animation.cxx \
custtrans.cxx \
location.cxx \
@@ -29,4 +29,14 @@ libsgmodel_a_SOURCES = \
shadowvolume.cxx \
shadanim.cxx
+libsgmodel_la_LDFLAGS = -release @VERSION@ -module -lplibssg -lplibsg -lGL
+
+libsgmodel_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/screen/libsgscreen.la \
+ $(top_builddir)/simgear/environment/libsgenvironment.la \
+ $(top_builddir)/simgear/math/libsgmath.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/serial/Makefile.am.share SimGear-1.0.0/simgear/serial/Makefile.am
--- SimGear-1.0.0/simgear/serial/Makefile.am.share 2007-11-17 08:35:45.000000000 +0100
+++ SimGear-1.0.0/simgear/serial/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,17 +1,22 @@
includedir = @includedir@/serial
-lib_LIBRARIES = libsgserial.a
+lib_LTLIBRARIES = libsgserial.la
include_HEADERS = serial.hxx
-libsgserial_a_SOURCES = serial.cxx
+libsgserial_la_SOURCES = serial.cxx
+
+libsgserial_la_LDFLAGS = -release @VERSION@ -module
+libsgserial_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la
+
noinst_PROGRAMS = testserial
testserial_SOURCES = testserial.cxx
-testserial_LDADD = \
- $(top_builddir)/simgear/serial/libsgserial.a \
- $(top_builddir)/simgear/debug/libsgdebug.a
+testserial_LDFLAGS = \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/sound/Makefile.am.share SimGear-1.0.0/simgear/sound/Makefile.am
--- SimGear-1.0.0/simgear/sound/Makefile.am.share 2007-11-17 08:35:45.000000000 +0100
+++ SimGear-1.0.0/simgear/sound/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -2,7 +2,7 @@ includedir = @includedir@/sound
EXTRA_DIST = jet.wav
-lib_LIBRARIES = libsgsound.a
+lib_LTLIBRARIES = libsgsound.la
noinst_HEADERS =
@@ -11,25 +11,33 @@ include_HEADERS = \
soundmgr_openal.hxx \
xmlsound.hxx
-libsgsound_a_SOURCES = \
+libsgsound_la_SOURCES = \
sample_openal.cxx \
soundmgr_openal.cxx \
xmlsound.cxx
+libsgsound_la_LDFLAGS = -release @VERSION@ -module $(openal_LIBS)
+libsgsound_la_LIBADD = \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/props/libsgprops.la
+
noinst_PROGRAMS = openal_test1 openal_test2
openal_test1_SOURCES = openal_test1.cxx
openal_test2_SOURCES = openal_test2.cxx
-openal_test1_LDADD = \
- $(top_builddir)/simgear/debug/libsgdebug.a \
+openal_test1_LDFLAGS = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
$(openal_LIBS)
-openal_test2_LDADD = \
- $(top_builddir)/simgear/sound/libsgsound.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- $(top_builddir)/simgear/structure/libsgstructure.a \
- $(openal_LIBS)
+openal_test2_LDFLAGS = \
+ $(top_builddir)/simgear/sound/libsgsound.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(openal_LIBS) -lz
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/xml/Makefile.am.share SimGear-1.0.0/simgear/xml/Makefile.am
--- SimGear-1.0.0/simgear/xml/Makefile.am.share 2003-08-29 09:35:57.000000000 +0200
+++ SimGear-1.0.0/simgear/xml/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/xml
-lib_LIBRARIES = libsgxml.a
+lib_LTLIBRARIES = libsgxml.la
include_HEADERS = \
easyxml.hxx
@@ -8,7 +8,7 @@ include_HEADERS = \
noinst_HEADERS = \
xmltok_impl.c xmltok_ns.c
-libsgxml_a_SOURCES = \
+libsgxml_la_SOURCES = \
asciitab.h \
easyxml.cxx \
hashtable.h hashtable.c \
@@ -18,4 +18,9 @@ libsgxml_a_SOURCES = \
xmltok.h xmltok.c \
xmltok_impl.h
+libsgxml_la_LDFLAGS = -release @VERSION@ -module
+
+libsgxml_la_LIBADD = \
+ $(top_builddir)/simgear/structure/libsgstructure.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/math/Makefile.am.share SimGear-1.0.0/simgear/math/Makefile.am
--- SimGear-1.0.0/simgear/math/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/math/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -4,10 +4,18 @@ check_PROGRAMS = SGMathTest
TESTS = $(check_PROGRAMS)
SGMathTest_SOURCES = SGMathTest.cxx
-SGMathTest_LDADD = libsgmath.a $(base_LIBS)
+SGMathTest_LDFLAGS = $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ libsgmath.la $(base_LIBS) -lz -lplibnet -lplibul
-lib_LIBRARIES = libsgmath.a
+lib_LTLIBRARIES = libsgmath.la
include_HEADERS = \
interpolater.hxx \
@@ -33,7 +41,7 @@ include_HEADERS = \
SGVec3.hxx
-libsgmath_a_SOURCES = \
+libsgmath_la_SOURCES = \
interpolater.cxx \
leastsqs.cxx \
polar3d.cxx \
@@ -42,4 +50,11 @@ libsgmath_a_SOURCES = \
vector.cxx \
SGGeodesy.cxx
+libsgmath_la_LDFLAGS = -release @VERSION@ -module
+
+libsgmath_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/props/libsgprops.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/props/Makefile.am.share SimGear-1.0.0/simgear/props/Makefile.am
--- SimGear-1.0.0/simgear/props/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/props/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,25 +1,32 @@
includedir = @includedir@/props
-lib_LIBRARIES = libsgprops.a
+lib_LTLIBRARIES = libsgprops.la
include_HEADERS = \
condition.hxx \
props.hxx \
props_io.hxx
-libsgprops_a_SOURCES = \
+libsgprops_la_SOURCES = \
condition.cxx \
props.cxx \
props_io.cxx
+libsgprops_la_LDFLAGS = -release @VERSION@ -module
+
+libsgprops_la_LIBADD = \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la
+
noinst_PROGRAMS = props_test
props_test_SOURCES = props_test.cxx
-props_test_LDADD = \
- $(top_builddir)/simgear/props/libsgprops.a \
- $(top_builddir)/simgear/xml/libsgxml.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/structure/libsgstructure.a
+props_test_LDFLAGS = \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ -lz
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/bucket/Makefile.am.share SimGear-1.0.0/simgear/bucket/Makefile.am
--- SimGear-1.0.0/simgear/bucket/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/bucket/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,10 +1,11 @@
includedir = @includedir@/bucket
-lib_LIBRARIES = libsgbucket.a
+lib_LTLIBRARIES = libsgbucket.la
include_HEADERS = newbucket.hxx
-libsgbucket_a_SOURCES = newbucket.cxx
+libsgbucket_la_SOURCES = newbucket.cxx
+libsgbucket_la_LDFLAGS = -release @VERSION@ -module
# noinst_PROGRAMS = testbucket
diff -up SimGear-1.0.0/simgear/io/Makefile.am.share SimGear-1.0.0/simgear/io/Makefile.am
--- SimGear-1.0.0/simgear/io/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/io/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/io
-lib_LIBRARIES = libsgio.a
+lib_LTLIBRARIES = libsgio.la
include_HEADERS = \
iochannel.hxx \
@@ -11,7 +11,7 @@ include_HEADERS = \
sg_socket.hxx \
sg_socket_udp.hxx
-libsgio_a_SOURCES = \
+libsgio_la_SOURCES = \
iochannel.cxx \
lowlevel.cxx \
sg_binobj.cxx \
@@ -22,55 +22,82 @@ libsgio_a_SOURCES = \
INCLUDES = -I$(top_srcdir)
+libsgio_la_LDFLAGS = -release @VERSION@ -module -lplibnet -lz
+
+libsgio_la_LIBADD = \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la
+
noinst_PROGRAMS = decode_binobj socktest lowtest tcp_server tcp_client
tcp_server_SOURCES = tcp_server.cxx
-tcp_server_LDADD = \
- $(top_builddir)/simgear/io/libsgio.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/bucket/libsgbucket.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
+tcp_server_LDFLAGS = \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
-lplibnet -lplibul -lz \
$(network_LIBS) \
$(base_LIBS)
tcp_client_SOURCES = tcp_client.cxx
-tcp_client_LDADD = \
- $(top_builddir)/simgear/io/libsgio.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/bucket/libsgbucket.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
+tcp_client_LDFLAGS = \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
-lplibnet -lplibul -lz \
$(network_LIBS) \
$(base_LIBS)
socktest_SOURCES = socktest.cxx
-socktest_LDADD = \
- $(top_builddir)/simgear/io/libsgio.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/bucket/libsgbucket.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- -lplibnet -lplibul -lz \
+socktest_LDFLAGS = \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ -lplibnet -lz \
$(network_LIBS) \
$(base_LIBS)
lowtest_SOURCES = lowtest.cxx
-lowtest_LDADD = \
- $(top_builddir)/simgear/io/libsgio.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/bucket/libsgbucket.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- $(base_LIBS) -lz
+lowtest_LDFLAGS = \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(base_LIBS) -lz -lplibnet -lplibul
decode_binobj_SOURCES = decode_binobj.cxx
-decode_binobj_LDADD = \
- $(top_builddir)/simgear/io/libsgio.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/bucket/libsgbucket.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- $(base_LIBS) -lz
+decode_binobj_LDFLAGS = \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/bucket/libsgbucket.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/serial/libsgserial.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(base_LIBS) -lz -lplibnet -lplibul
diff -up SimGear-1.0.0/simgear/debug/Makefile.am.share SimGear-1.0.0/simgear/debug/Makefile.am
--- SimGear-1.0.0/simgear/debug/Makefile.am.share 2002-09-07 04:58:19.000000000 +0200
+++ SimGear-1.0.0/simgear/debug/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -2,10 +2,11 @@ includedir = @includedir@/debug
EXTRA_DIST = logtest.cxx
-lib_LIBRARIES = libsgdebug.a
+lib_LTLIBRARIES = libsgdebug.la
include_HEADERS = debug_types.h logstream.hxx
-libsgdebug_a_SOURCES = logstream.cxx
+libsgdebug_la_SOURCES = logstream.cxx
+libsgdebug_la_LDFLAGS = -release @VERSION@ -module
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/Makefile.am.share SimGear-1.0.0/simgear/Makefile.am
--- SimGear-1.0.0/simgear/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -14,23 +14,24 @@ include_HEADERS = \
SUBDIRS = \
$(compatibility_DIR) \
- xml \
debug \
- misc \
structure \
+ xml \
+ props \
+ misc \
bucket \
ephemeris \
+ serial \
io \
magvar \
math \
+ sound \
+ screen \
+ scene/sky \
$(METAR_DIRS) \
nasal \
- props \
route \
scene \
- screen \
- serial \
- sound \
$(SGTHREAD_DIR) \
timing
diff -up SimGear-1.0.0/simgear/structure/Makefile.am.share SimGear-1.0.0/simgear/structure/Makefile.am
--- SimGear-1.0.0/simgear/structure/Makefile.am.share 2007-11-17 09:16:02.000000000 +0100
+++ SimGear-1.0.0/simgear/structure/Makefile.am 2008-01-05 10:04:16.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/structure
-lib_LIBRARIES = libsgstructure.a
+lib_LTLIBRARIES = libsgstructure.la
include_HEADERS = \
callback.hxx \
@@ -14,7 +14,7 @@ include_HEADERS = \
SGSmplhist.hxx \
SGSmplstat.hxx
-libsgstructure_a_SOURCES = \
+libsgstructure_la_SOURCES = \
commands.cxx \
exception.cxx \
event_mgr.cxx \
@@ -22,6 +22,10 @@ libsgstructure_a_SOURCES = \
SGSmplhist.cxx \
SGSmplstat.cxx
+libsgstructure_la_LDFLAGS = -release @VERSION@ -module
+
+libsgstructure_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/ephemeris/Makefile.am.share SimGear-1.0.0/simgear/ephemeris/Makefile.am
--- SimGear-1.0.0/simgear/ephemeris/Makefile.am.share 2003-08-29 09:35:55.000000000 +0200
+++ SimGear-1.0.0/simgear/ephemeris/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/ephemeris
-lib_LIBRARIES = libsgephem.a
+lib_LTLIBRARIES = libsgephem.la
include_HEADERS = \
celestialBody.hxx \
@@ -16,7 +16,7 @@ include_HEADERS = \
uranus.hxx \
venus.hxx
-libsgephem_a_SOURCES = \
+libsgephem_la_SOURCES = \
celestialBody.cxx \
ephemeris.cxx \
jupiter.cxx \
@@ -31,4 +31,10 @@ libsgephem_a_SOURCES = \
uranus.cxx \
venus.cxx
+libsgephem_la_LDFLAGS = -release @VERSION@ -module
+
+libsgephem_la_LIBADD = \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/threads/Makefile.am.share SimGear-1.0.0/simgear/threads/Makefile.am
--- SimGear-1.0.0/simgear/threads/Makefile.am.share 2002-09-07 04:58:20.000000000 +0200
+++ SimGear-1.0.0/simgear/threads/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,13 +1,15 @@
includedir = @includedir@/threads
-lib_LIBRARIES = libsgthreads.a
+lib_LTLIBRARIES = libsgthreads.la
include_HEADERS = \
SGGuard.hxx \
SGQueue.hxx \
SGThread.hxx
-libsgthreads_a_SOURCES = \
+libsgthreads_la_SOURCES = \
SGThread.cxx
+libsgthreads_la_LDFLAGS = -release @VERSION@ -module
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/misc/Makefile.am.share SimGear-1.0.0/simgear/misc/Makefile.am
--- SimGear-1.0.0/simgear/misc/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/misc/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/misc
-lib_LIBRARIES = libsgmisc.a
+lib_LTLIBRARIES = libsgmisc.la
include_HEADERS = \
sg_path.hxx \
@@ -13,7 +13,7 @@ include_HEADERS = \
interpolator.hxx \
stdint.hxx
-libsgmisc_a_SOURCES = \
+libsgmisc_la_SOURCES = \
sg_path.cxx \
sgstream.cxx \
strutils.cxx \
@@ -22,13 +22,22 @@ libsgmisc_a_SOURCES = \
zfstream.cxx \
interpolator.cxx
+libsgmisc_la_LDFLAGS = -release @VERSION@ -module -lz
+
+libsgmisc_la_LIBADD = \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la
+
noinst_PROGRAMS = tabbed_value_test swap_test
tabbed_value_test_SOURCES = tabbed_values_test.cxx
-tabbed_value_test_LDADD = \
- $(top_builddir)/simgear/misc/libsgmisc.a \
- $(top_builddir)/simgear/xml/libsgxml.a \
- $(top_builddir)/simgear/debug/libsgdebug.a
+tabbed_value_test_LDFLAGS = \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ -lz
swap_test_SOURCES = swap_test.cpp
diff -up SimGear-1.0.0/simgear/screen/Makefile.am.share SimGear-1.0.0/simgear/screen/Makefile.am
--- SimGear-1.0.0/simgear/screen/Makefile.am.share 2007-11-17 08:35:45.000000000 +0100
+++ SimGear-1.0.0/simgear/screen/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/screen
-lib_LIBRARIES = libsgscreen.a
+lib_LTLIBRARIES = libsgscreen.la
EXTRA_DIST = jpgfactory.cxx jpgfactory.hxx
@@ -24,7 +24,7 @@ include_HEADERS = \
shader.h \
tr.h
-libsgscreen_a_SOURCES = \
+libsgscreen_la_SOURCES = \
texture.cxx \
GLBitmaps.cxx \
$(IMAGE_SERVER_SRCS) \
@@ -35,15 +35,21 @@ libsgscreen_a_SOURCES = \
shader.cpp \
win32-printer.h
+libsgscreen_la_LDFLAGS = -release @VERSION@ -module -lGL -lGLU -lX11 -lz \
+ -ldl -ljpeg -lplibssg
+
+libsgscreen_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la
+
if HAVE_GLUT
noinst_PROGRAMS = TestRenderTexture
TestRenderTexture_SOURCES = TestRenderTexture.cpp
-TestRenderTexture_LDADD = \
- $(top_builddir)/simgear/screen/libsgscreen.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(opengl_LIBS)
+TestRenderTexture_LDFLAGS = \
+ $(top_builddir)/simgear/screen/libsgscreen.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(opengl_LIBS) -lz -lplibssg -ljpeg
endif
INCLUDES = -I$(top_srcdir) -I$(top_builddir) -DGLX_GLXEXT_PROTOTYPES
diff -up SimGear-1.0.0/simgear/magvar/Makefile.am.share SimGear-1.0.0/simgear/magvar/Makefile.am
--- SimGear-1.0.0/simgear/magvar/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/magvar/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,19 +1,21 @@
includedir = @includedir@/magvar
-lib_LIBRARIES = libsgmagvar.a
+lib_LTLIBRARIES = libsgmagvar.la
include_HEADERS = magvar.hxx
-libsgmagvar_a_SOURCES = \
+libsgmagvar_la_SOURCES = \
coremag.hxx coremag.cxx \
magvar.cxx
+libsgmagvar_la_LDFLAGS = -release @VERSION@ -module
+
noinst_PROGRAMS = testmagvar
testmagvar_SOURCES = testmagvar.cxx
-testmagvar_LDADD = \
- $(top_builddir)/simgear/magvar/libsgmagvar.a \
+testmagvar_LDFLAGS = \
+ $(top_builddir)/simgear/magvar/libsgmagvar.la \
$(base_LIBS)
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/timing/Makefile.am.share SimGear-1.0.0/simgear/timing/Makefile.am
--- SimGear-1.0.0/simgear/timing/Makefile.am.share 2002-09-07 04:58:19.000000000 +0200
+++ SimGear-1.0.0/simgear/timing/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,6 +1,6 @@
includedir = @includedir@/timing
-lib_LIBRARIES = libsgtiming.a
+lib_LTLIBRARIES = libsgtiming.la
include_HEADERS = \
geocoord.h \
@@ -9,11 +9,17 @@ include_HEADERS = \
timestamp.hxx \
timezone.h
-libsgtiming_a_SOURCES = \
+libsgtiming_la_SOURCES = \
geocoord.cxx \
lowleveltime.cxx \
sg_time.cxx \
timestamp.cxx \
timezone.cxx
+libsgtiming_la_LDFLAGS = -release @VERSION@ -module
+
+libsgtiming_la_LIBADD = \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la
+
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/nasal/Makefile.am.share SimGear-1.0.0/simgear/nasal/Makefile.am
--- SimGear-1.0.0/simgear/nasal/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/nasal/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,13 +1,15 @@
includedir = @includedir@/nasal
-lib_LIBRARIES = libsgnasal.a
+lib_LTLIBRARIES = libsgnasal.la
include_HEADERS = nasal.h naref.h
-libsgnasal_a_SOURCES = bitslib.c code.c code.h codegen.c data.h gc.c \
- hash.c iolib.c iolib.h lex.c lib.c mathlib.c \
- misc.c naref.h nasal.h parse.c parse.h string.c \
- thread-posix.c thread-win32.c threadlib.c \
- utf8lib.c vector.c
+libsgnasal_la_SOURCES = bitslib.c code.c code.h codegen.c data.h gc.c \
+ hash.c iolib.c iolib.h lex.c lib.c mathlib.c \
+ misc.c naref.h nasal.h parse.c parse.h string.c \
+ thread-posix.c thread-win32.c threadlib.c \
+ utf8lib.c vector.c
+
+libsgnasal_la_LDFLAGS = -release @VERSION@ -module -lm -lpthread
INCLUDES = -I$(top_srcdir)
diff -up SimGear-1.0.0/simgear/route/Makefile.am.share SimGear-1.0.0/simgear/route/Makefile.am
--- SimGear-1.0.0/simgear/route/Makefile.am.share 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/route/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,31 +1,44 @@
includedir = @includedir@/route
-lib_LIBRARIES = libsgroute.a
+lib_LTLIBRARIES = libsgroute.la
include_HEADERS = route.hxx waypoint.hxx
-libsgroute_a_SOURCES = \
+libsgroute_la_SOURCES = \
route.cxx \
waypoint.cxx
+libsgroute_la_LDFLAGS = -release @VERSION@ -module
+
+libsgroute_la_LIBADD = \
+ $(top_builddir)/simgear/math/libsgmath.la
+
INCLUDES = -I$(top_srcdir)
noinst_PROGRAMS = waytest routetest
waytest_SOURCES = waytest.cxx
-waytest_LDADD = \
- $(top_builddir)/simgear/route/libsgroute.a \
- $(top_builddir)/simgear/math/libsgmath.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(top_builddir)/simgear/misc/libsgmisc.a \
+waytest_LDFLAGS = \
+ $(top_builddir)/simgear/route/libsgroute.la \
+ $(top_builddir)/simgear/math/libsgmath.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
$(base_LIBS) \
-lz
routetest_SOURCES = routetest.cxx
-routetest_LDADD = \
- $(top_builddir)/simgear/route/libsgroute.a \
- $(top_builddir)/simgear/math/libsgmath.a \
- $(top_builddir)/simgear/debug/libsgdebug.a \
- $(base_LIBS)
+routetest_LDFLAGS = \
+ $(top_builddir)/simgear/route/libsgroute.la \
+ $(top_builddir)/simgear/math/libsgmath.la \
+ $(top_builddir)/simgear/debug/libsgdebug.la \
+ $(top_builddir)/simgear/misc/libsgmisc.la \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/xml/libsgxml.la \
+ $(base_LIBS) -lz
+
diff -up SimGear-1.0.0/simgear/environment/Makefile.am.share SimGear-1.0.0/simgear/environment/Makefile.am
--- SimGear-1.0.0/simgear/environment/Makefile.am.share 2005-04-24 13:16:50.000000000 +0200
+++ SimGear-1.0.0/simgear/environment/Makefile.am 2008-01-05 10:03:09.000000000 +0100
@@ -1,9 +1,17 @@
includedir = @includedir@/environment
-lib_LIBRARIES = libsgenvironment.a
+lib_LTLIBRARIES = libsgenvironment.la
include_HEADERS = metar.hxx visual_enviro.hxx
-libsgenvironment_a_SOURCES = metar.cxx visual_enviro.cxx
+libsgenvironment_la_SOURCES = metar.cxx visual_enviro.cxx
+libsgenvironment_la_LDFLAGS = -release @VERSION@ -module -lGL -lplibssg
+libsgenvironment_la_LIBADD = \
+ $(top_builddir)/simgear/structure/libsgstructure.la \
+ $(top_builddir)/simgear/props/libsgprops.la \
+ $(top_builddir)/simgear/io/libsgio.la \
+ $(top_builddir)/simgear/sound/libsgsound.la \
+ $(top_builddir)/simgear/scene/sky/libsgsky.la
+ $(top_builddir)/simgear/math/libsgmath.la
INCLUDES = -I$(top_srcdir)
SimGear-1.0.0-untangle.patch:
--- NEW FILE SimGear-1.0.0-untangle.patch ---
diff -up SimGear-1.0.0/simgear/props/props.hxx.untangle SimGear-1.0.0/simgear/props/props.hxx
--- SimGear-1.0.0/simgear/props/props.hxx.untangle 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/props/props.hxx 2008-01-06 16:13:31.000000000 +0100
@@ -17,6 +17,7 @@
#endif
#include <vector>
+#include <cstdlib>
#if PROPS_STANDALONE
@@ -835,7 +836,40 @@ public:
/**
* Get a double value for this node.
*/
- double getDoubleValue () const;
+ double getDoubleValue () const
+ {
+ // Shortcut for common case
+ if (_attr == (READ|WRITE) && _type == DOUBLE)
+ return get_double();
+
+ /* Commented to make getDoubleValue() independend if props.obj as
+ getDoubleValue() gets used by structure */
+ /* if (getAttribute(TRACE_READ))
+ trace_read(); */
+ if (!getAttribute(READ))
+ return 0.0L; /* SGRawValue<double>::DefaultValue */
+
+ switch (_type) {
+ case ALIAS:
+ return _value.alias->getDoubleValue();
+ case BOOL:
+ return double(get_bool());
+ case INT:
+ return double(get_int());
+ case LONG:
+ return double(get_long());
+ case FLOAT:
+ return double(get_float());
+ case DOUBLE:
+ return get_double();
+ case STRING:
+ case UNSPECIFIED:
+ return strtod(get_string(), 0);
+ case NONE:
+ default:
+ return 0.0L; /* SGRawValue<double>::DefaultValue */
+ }
+ }
/**
@@ -1155,12 +1189,54 @@ protected:
private:
// Get the raw value
- bool get_bool () const;
- int get_int () const;
- long get_long () const;
- float get_float () const;
- double get_double () const;
- const char * get_string () const;
+ inline bool get_bool () const
+ {
+ if (_tied)
+ return _value.bool_val->getValue();
+ else
+ return _local_val.bool_val;
+ }
+
+ inline int get_int () const
+ {
+ if (_tied)
+ return _value.int_val->getValue();
+ else
+ return _local_val.int_val;
+ }
+
+ inline long get_long () const
+ {
+ if (_tied)
+ return _value.long_val->getValue();
+ else
+ return _local_val.long_val;
+ }
+
+ inline float get_float () const
+ {
+ if (_tied)
+ return _value.float_val->getValue();
+ else
+ return _local_val.float_val;
+ }
+
+ inline double get_double () const
+ {
+ if (_tied)
+ return _value.double_val->getValue();
+ else
+ return _local_val.double_val;
+ }
+
+ inline const char * get_string () const
+ {
+ if (_tied)
+ return _value.string_val->getValue();
+ else
+ return _local_val.string_val;
+ }
+
// Set the raw value
bool set_bool (bool value);
diff -up SimGear-1.0.0/simgear/props/props.cxx.untangle SimGear-1.0.0/simgear/props/props.cxx
--- SimGear-1.0.0/simgear/props/props.cxx.untangle 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/props/props.cxx 2008-01-06 16:13:31.000000000 +0100
@@ -317,60 +317,6 @@ find_node (SGPropertyNode * current,
////////////////////////////////////////////////////////////////////////
inline bool
-SGPropertyNode::get_bool () const
-{
- if (_tied)
- return _value.bool_val->getValue();
- else
- return _local_val.bool_val;
-}
-
-inline int
-SGPropertyNode::get_int () const
-{
- if (_tied)
- return _value.int_val->getValue();
- else
- return _local_val.int_val;
-}
-
-inline long
-SGPropertyNode::get_long () const
-{
- if (_tied)
- return _value.long_val->getValue();
- else
- return _local_val.long_val;
-}
-
-inline float
-SGPropertyNode::get_float () const
-{
- if (_tied)
- return _value.float_val->getValue();
- else
- return _local_val.float_val;
-}
-
-inline double
-SGPropertyNode::get_double () const
-{
- if (_tied)
- return _value.double_val->getValue();
- else
- return _local_val.double_val;
-}
-
-inline const char *
-SGPropertyNode::get_string () const
-{
- if (_tied)
- return _value.string_val->getValue();
- else
- return _local_val.string_val;
-}
-
-inline bool
SGPropertyNode::set_bool (bool val)
{
if (_tied) {
@@ -1173,40 +1119,6 @@ SGPropertyNode::getFloatValue () const
}
}
-double
-SGPropertyNode::getDoubleValue () const
-{
- // Shortcut for common case
- if (_attr == (READ|WRITE) && _type == DOUBLE)
- return get_double();
-
- if (getAttribute(TRACE_READ))
- trace_read();
- if (!getAttribute(READ))
- return SGRawValue<double>::DefaultValue;
-
- switch (_type) {
- case ALIAS:
- return _value.alias->getDoubleValue();
- case BOOL:
- return double(get_bool());
- case INT:
- return double(get_int());
- case LONG:
- return double(get_long());
- case FLOAT:
- return double(get_float());
- case DOUBLE:
- return get_double();
- case STRING:
- case UNSPECIFIED:
- return strtod(get_string(), 0);
- case NONE:
- default:
- return SGRawValue<double>::DefaultValue;
- }
-}
-
const char *
SGPropertyNode::getStringValue () const
{
diff -up SimGear-1.0.0/simgear/misc/sg_path.hxx.untangle SimGear-1.0.0/simgear/misc/sg_path.hxx
--- SimGear-1.0.0/simgear/misc/sg_path.hxx.untangle 2006-03-08 19:16:08.000000000 +0100
+++ SimGear-1.0.0/simgear/misc/sg_path.hxx 2008-01-06 16:17:14.000000000 +0100
@@ -34,6 +34,7 @@
#include STL_STRING
#include <simgear/math/sg_types.hxx>
+#include <simgear/debug/logstream.hxx>
SG_USING_STD(string);
@@ -42,6 +43,73 @@ SG_USING_STD(string);
#endif
/**
+ * define directory path and search separators
+ */
+
+#if defined( macintosh )
+#define SGPATH_sgDirPathSep ':'
+#define SGPATH_sgDirPathSepBad '/'
+#else
+#define SGPATH_sgDirPathSep '/'
+#define SGPATH_sgDirPathSepBad '\\'
+#endif
+
+#if defined( WIN32 ) && !defined(__CYGWIN__)
+#define SGPATH_sgSearchPathSep ';'
+#else
+#define SGPATH_sgSearchPathSep ':'
+#endif
+
+
+/**
+ * Split a directory string into a list of it's parent directories.
+ */
+static inline string_list sgPathBranchSplit( const string &dirpath ) {
+ string_list path_elements;
+ string element, path = dirpath;
+ while ( path.size() ) {
+ size_t p = path.find( SGPATH_sgDirPathSep );
+ if ( p != string::npos ) {
+ element = path.substr( 0, p );
+ path.erase( 0, p + 1 );
+ } else {
+ element = path;
+ path = "";
+ }
+ if ( element.size() )
+ path_elements.push_back( element );
+ }
+ return path_elements;
+}
+
+
+/**
+ * Split a directory search path into a vector of individual paths
+ */
+static inline string_list sgPathSplit( const string &search_path ) {
+ string tmp = search_path;
+ string_list result;
+ result.clear();
+
+ bool done = false;
+
+ while ( !done ) {
+ int index = tmp.find(SGPATH_sgSearchPathSep);
+ if (index >= 0) {
+ result.push_back( tmp.substr(0, index) );
+ tmp = tmp.substr( index + 1 );
+ } else {
+ if ( !tmp.empty() )
+ result.push_back( tmp );
+ done = true;
+ }
+ }
+
+ return result;
+}
+
+
+/**
* A class to hide path separator difference across platforms and assist
* in managing file system path names.
*
@@ -64,10 +132,13 @@ public:
* Construct a path based on the starting path provided.
* @param p initial path
*/
- SGPath( const string& p );
+ SGPath( const string& p ) : path(p)
+ {
+ fix();
+ }
/** Destructor */
- ~SGPath();
+ ~SGPath() {}
/**
* Set path to a new value
@@ -80,7 +151,17 @@ public:
* Append another piece to the existing path. Inserts a path
* separator between the existing component and the new component.
* @param p additional path component */
- void append( const string& p );
+ void append( const string& p ) {
+ if ( path.size() == 0 ) {
+ path = p;
+ } else {
+ if ( p[0] != SGPATH_sgDirPathSep ) {
+ path += SGPATH_sgDirPathSep;
+ }
+ path += p;
+ }
+ fix();
+ }
/**
* Append a new piece to the existing path. Inserts a search path
@@ -93,7 +174,14 @@ public:
* path separator.
* @param p addtional path suffix
*/
- void concat( const string& p );
+ void concat( const string& p ) {
+ if ( path.size() == 0 ) {
+ path = p;
+ } else {
+ path += p;
+ }
+ fix();
+ }
/**
* Get the file part of the path (everything after the last path sep)
@@ -105,7 +193,14 @@ public:
* Get the directory part of the path.
* @return directory string
*/
- string dir() const;
+ string dir() const {
+ int index = path.rfind(SGPATH_sgDirPathSep);
+ if (index >= 0) {
+ return path.substr(0, index);
+ } else {
+ return "";
+ }
+ }
/**
* Get the base part of the path (everything but the extension.)
@@ -140,26 +235,75 @@ public:
/**
* Create the designated directory.
*/
- void create_dir(mode_t mode);
+ void create_dir(mode_t mode)
+ {
+ string_list dirlist = sgPathSplit(dir());
+ if ( dirlist.empty() )
+ return;
+ string path = dirlist[0];
+ string_list path_elements = sgPathBranchSplit(path);
+ bool absolute = !path.empty() && path[0] == SGPATH_sgDirPathSep;
+
+ unsigned int i = 1;
+ SGPath dir = absolute ? string( 1, SGPATH_sgDirPathSep ) : "";
+ dir.concat( path_elements[0] );
+ #if defined( _MSC_VER) || defined(__MINGW32__)
+ if ( dir.str().find(':') != string::npos && path_elements.size() >= 2 ) {
+ dir.append( path_elements[1] );
+ i = 2;
+ }
+ #endif
+ struct stat info;
+ int r;
+ for(; ( r = stat( dir.c_str(), &info ) ) == 0 && i < path_elements.size(); i++) {
+ dir.append(path_elements[i]);
+ }
+ if ( r == 0 ) {
+ return; // Directory already exists
+ }
+ #if defined( _MSC_VER) || defined(__MINGW32__)
+ # define sgMkDir(d,m) _mkdir(d)
+ #else
+ # define sgMkDir(d,m) mkdir(d,m)
+ #endif
+ if ( sgMkDir( dir.c_str(), mode) ) {
+ SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
+ return;
+ }
+ for(;i < path_elements.size(); i++) {
+ dir.append(path_elements[i]);
+ if ( sgMkDir( dir.c_str(), mode) ) {
+ SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
+ break;
+ }
+ }
+ #undef sgMkDir
+ }
private:
- void fix();
+ // If Unix, replace all ":" with "/". If MacOS, replace all "/" with
+ // ":" it should go without saying that neither of these characters
+ // should be used in file or directory names. In windoze, allow the
+ // second character to be a ":" for things like c:\foo\bar
+
+ void fix()
+ {
+ for ( string::size_type i = 0; i < path.size(); ++i ) {
+ #if defined( WIN32 )
+ // for windoze, don't replace the ":" for the second character
+ if ( i == 1 ) {
+ continue;
+ }
+ #endif
+ if ( path[i] == SGPATH_sgDirPathSepBad ) {
+ path[i] = SGPATH_sgDirPathSep;
+ }
+ }
+ }
};
-
-/**
- * Split a directory string into a list of it's parent directories.
- */
-string_list sgPathBranchSplit( const string &path );
-
-/**
- * Split a directory search path into a vector of individual paths
- */
-string_list sgPathSplit( const string &search_path );
-
-
#endif // _SG_PATH_HXX
diff -up SimGear-1.0.0/simgear/misc/sg_path.cxx.untangle SimGear-1.0.0/simgear/misc/sg_path.cxx
--- SimGear-1.0.0/simgear/misc/sg_path.cxx.untangle 2007-11-17 08:35:44.000000000 +0100
+++ SimGear-1.0.0/simgear/misc/sg_path.cxx 2008-01-06 16:13:31.000000000 +0100
@@ -35,47 +35,6 @@
#include "sg_path.hxx"
-/**
- * define directory path separators
- */
-
-#if defined( macintosh )
-static const char sgDirPathSep = ':';
-static const char sgDirPathSepBad = '/';
-#else
-static const char sgDirPathSep = '/';
-static const char sgDirPathSepBad = '\\';
-#endif
-
-#if defined( WIN32 ) && !defined(__CYGWIN__)
-static const char sgSearchPathSep = ';';
-#else
-static const char sgSearchPathSep = ':';
-#endif
-
-
-// If Unix, replace all ":" with "/". If MacOS, replace all "/" with
-// ":" it should go without saying that neither of these characters
-// should be used in file or directory names. In windoze, allow the
-// second character to be a ":" for things like c:\foo\bar
-
-void
-SGPath::fix()
-{
- for ( string::size_type i = 0; i < path.size(); ++i ) {
-#if defined( WIN32 )
- // for windoze, don't replace the ":" for the second character
- if ( i == 1 ) {
- continue;
- }
-#endif
- if ( path[i] == sgDirPathSepBad ) {
- path[i] = sgDirPathSep;
- }
- }
-}
-
-
// default constructor
SGPath::SGPath()
: path("")
@@ -83,19 +42,6 @@ SGPath::SGPath()
}
-// create a path based on "path"
-SGPath::SGPath( const std::string& p )
- : path(p)
-{
- fix();
-}
-
-
-// destructor
-SGPath::~SGPath() {
-}
-
-
// set path
void SGPath::set( const string& p ) {
path = p;
@@ -103,40 +49,15 @@ void SGPath::set( const string& p ) {
}
-// append another piece to the existing path
-void SGPath::append( const string& p ) {
- if ( path.size() == 0 ) {
- path = p;
- } else {
- if ( p[0] != sgDirPathSep ) {
- path += sgDirPathSep;
- }
- path += p;
- }
- fix();
-}
-
//add a new path component to the existing path string
void SGPath::add( const string& p ) {
- append( sgSearchPathSep+p );
-}
-
-
-// concatenate a string to the end of the path without inserting a
-// path separator
-void SGPath::concat( const string& p ) {
- if ( path.size() == 0 ) {
- path = p;
- } else {
- path += p;
- }
- fix();
+ append( SGPATH_sgSearchPathSep+p );
}
// Get the file part of the path (everything after the last path sep)
string SGPath::file() const {
- int index = path.rfind(sgDirPathSep);
+ int index = path.rfind(SGPATH_sgDirPathSep);
if (index >= 0) {
return path.substr(index + 1);
} else {
@@ -145,16 +66,6 @@ string SGPath::file() const {
}
-// get the directory part of the path.
-string SGPath::dir() const {
- int index = path.rfind(sgDirPathSep);
- if (index >= 0) {
- return path.substr(0, index);
- } else {
- return "";
- }
-}
-
// get the base part of the path (everything but the extension.)
string SGPath::base() const {
int index = path.rfind(".");
@@ -185,89 +96,3 @@ bool SGPath::exists() const {
fclose(fp);
return true;
}
-
-#if defined( _MSC_VER) || defined(__MINGW32__)
-# define sgMkDir(d,m) _mkdir(d)
-#else
-# define sgMkDir(d,m) mkdir(d,m)
-#endif
-
-
-void SGPath::create_dir( mode_t mode ) {
- string_list dirlist = sgPathSplit(dir());
- if ( dirlist.empty() )
- return;
- string path = dirlist[0];
- string_list path_elements = sgPathBranchSplit(path);
- bool absolute = !path.empty() && path[0] == sgDirPathSep;
-
- unsigned int i = 1;
- SGPath dir = absolute ? string( 1, sgDirPathSep ) : "";
- dir.concat( path_elements[0] );
-#if defined( _MSC_VER) || defined(__MINGW32__)
- if ( dir.str().find(':') != string::npos && path_elements.size() >= 2 ) {
- dir.append( path_elements[1] );
- i = 2;
- }
-#endif
- struct stat info;
- int r;
- for(; ( r = stat( dir.c_str(), &info ) ) == 0 && i < path_elements.size(); i++) {
- dir.append(path_elements[i]);
- }
- if ( r == 0 ) {
- return; // Directory already exists
- }
- if ( sgMkDir( dir.c_str(), mode) ) {
- SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
- return;
- }
- for(;i < path_elements.size(); i++) {
- dir.append(path_elements[i]);
- if ( sgMkDir( dir.c_str(), mode) ) {
- SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
- break;
- }
- }
-}
-
-string_list sgPathBranchSplit( const string &dirpath ) {
- string_list path_elements;
- string element, path = dirpath;
- while ( path.size() ) {
- size_t p = path.find( sgDirPathSep );
- if ( p != string::npos ) {
- element = path.substr( 0, p );
- path.erase( 0, p + 1 );
- } else {
- element = path;
- path = "";
- }
- if ( element.size() )
- path_elements.push_back( element );
- }
- return path_elements;
-}
-
-
-string_list sgPathSplit( const string &search_path ) {
- string tmp = search_path;
- string_list result;
- result.clear();
-
- bool done = false;
-
- while ( !done ) {
- int index = tmp.find(sgSearchPathSep);
- if (index >= 0) {
- result.push_back( tmp.substr(0, index) );
- tmp = tmp.substr( index + 1 );
- } else {
- if ( !tmp.empty() )
- result.push_back( tmp );
- done = true;
- }
- }
-
- return result;
-}
diff -up SimGear-1.0.0/simgear/timing/timestamp.cxx.untangle SimGear-1.0.0/simgear/timing/timestamp.cxx
--- SimGear-1.0.0/simgear/timing/timestamp.cxx.untangle 2006-08-31 20:26:45.000000000 +0200
+++ SimGear-1.0.0/simgear/timing/timestamp.cxx 2008-01-06 16:13:31.000000000 +0100
@@ -23,94 +23,6 @@
//
// $Id: timestamp.cxx,v 1.6 2006-08-31 18:26:45 fredb Exp $
-
-#ifdef HAVE_CONFIG_H
-# include <simgear_config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-# include <windows.h>
-#endif
-
-#include <simgear/compiler.h>
-
-#ifdef SG_HAVE_STD_INCLUDES
-# include <ctime>
-#else
-# include <time.h>
-#endif
-
-#ifdef HAVE_SYS_TIMEB_H
-# include <sys/timeb.h> // for ftime() and struct timeb
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h> // for gettimeofday()
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h> // for get/setitimer, gettimeofday, struct timeval
-#endif
-
-// -dw- want to use metrowerks time.h
-#ifdef macintosh
-# include <time.h>
-# include <timer.h>
-#endif
-
-#ifdef WIN32
-# include <windows.h>
-# if defined( __CYGWIN__ ) || defined( __CYGWIN32__ )
-# define NEAR /* */
-# define FAR /* */
-# endif
-# include <mmsystem.h>
-#endif
+// empty, all inline class now.
#include "timestamp.hxx"
-
-
-void SGTimeStamp::stamp() {
-#if defined( WIN32 ) && !defined(__CYGWIN__)
- unsigned int t;
- t = timeGetTime();
- seconds = t / 1000;
- usec = ( t - ( seconds * 1000 ) ) * 1000;
-#elif defined( HAVE_GETTIMEOFDAY )
- struct timeval current;
- struct timezone tz;
- // sg_timestamp currtime;
- gettimeofday(¤t, &tz);
- seconds = current.tv_sec;
- usec = current.tv_usec;
-#elif defined( HAVE_GETLOCALTIME )
- SYSTEMTIME current;
- GetLocalTime(¤t);
- seconds = current.wSecond;
- usec = current.wMilliseconds * 1000;
-#elif defined( HAVE_FTIME )
- struct timeb current;
- ftime(¤t);
- seconds = current.time;
- usec = current.millitm * 1000;
-// -dw- uses time manager
-#elif defined( macintosh )
- UnsignedWide ms;
- Microseconds(&ms);
-
- seconds = ms.lo / 1000000;
- usec = ms.lo - ( seconds * 1000000 );
-#else
-# error Port me
-#endif
-}
-
-// increment the time stamp by the number of microseconds (usec)
-SGTimeStamp operator + (const SGTimeStamp& t, const long& m) {
- return SGTimeStamp( t.seconds + ( t.usec + m ) / 1000000,
- ( t.usec + m ) % 1000000 );
-}
-
-// difference between time stamps in microseconds (usec)
-long operator - (const SGTimeStamp& a, const SGTimeStamp& b)
-{
- return 1000000 * (a.seconds - b.seconds) + (a.usec - b.usec);
-}
diff -up SimGear-1.0.0/simgear/timing/timestamp.hxx.untangle SimGear-1.0.0/simgear/timing/timestamp.hxx
--- SimGear-1.0.0/simgear/timing/timestamp.hxx.untangle 2007-11-17 08:35:45.000000000 +0100
+++ SimGear-1.0.0/simgear/timing/timestamp.hxx 2008-01-06 16:13:31.000000000 +0100
@@ -32,9 +32,47 @@
# error This library requires C++
#endif
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
#include <simgear/compiler.h>
+#ifdef SG_HAVE_STD_INCLUDES
+# include <ctime>
+#else
+# include <time.h>
+#endif
+
+#ifdef HAVE_SYS_TIMEB_H
+# include <sys/timeb.h> // for ftime() and struct timeb
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h> // for gettimeofday()
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h> // for get/setitimer, gettimeofday, struct timeval
+#endif
+
+// -dw- want to use metrowerks time.h
+#ifdef macintosh
+# include <time.h>
+# include <timer.h>
+#endif
+
+#ifdef WIN32
+# include <windows.h>
+# if defined( __CYGWIN__ ) || defined( __CYGWIN32__ )
+# define NEAR /* */
+# define FAR /* */
+# endif
+# include <mmsystem.h>
+#endif
+
// MSVC++ 6.0 kuldge - Need forward declaration of friends.
class SGTimeStamp;
@@ -123,6 +161,52 @@ inline SGTimeStamp& SGTimeStamp::operato
return *this;
}
+inline void SGTimeStamp::stamp() {
+#if defined( WIN32 ) && !defined(__CYGWIN__)
+ unsigned int t;
+ t = timeGetTime();
+ seconds = t / 1000;
+ usec = ( t - ( seconds * 1000 ) ) * 1000;
+#elif defined( HAVE_GETTIMEOFDAY )
+ struct timeval current;
+ struct timezone tz;
+ // sg_timestamp currtime;
+ gettimeofday(¤t, &tz);
+ seconds = current.tv_sec;
+ usec = current.tv_usec;
+#elif defined( HAVE_GETLOCALTIME )
+ SYSTEMTIME current;
+ GetLocalTime(¤t);
+ seconds = current.wSecond;
+ usec = current.wMilliseconds * 1000;
+#elif defined( HAVE_FTIME )
+ struct timeb current;
+ ftime(¤t);
+ seconds = current.time;
+ usec = current.millitm * 1000;
+// -dw- uses time manager
+#elif defined( macintosh )
+ UnsignedWide ms;
+ Microseconds(&ms);
+
+ seconds = ms.lo / 1000000;
+ usec = ms.lo - ( seconds * 1000000 );
+#else
+# error Port me
+#endif
+}
+
+// increment the time stamp by the number of microseconds (usec)
+inline SGTimeStamp operator + (const SGTimeStamp& t, const long& m) {
+ return SGTimeStamp( t.seconds + ( t.usec + m ) / 1000000,
+ ( t.usec + m ) % 1000000 );
+}
+
+// difference between time stamps in microseconds (usec)
+inline long operator - (const SGTimeStamp& a, const SGTimeStamp& b)
+{
+ return 1000000 * (a.seconds - b.seconds) + (a.usec - b.usec);
+}
#endif // _TIMESTAMP_HXX
More information about the fedora-extras-commits
mailing list