Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2707 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Nov 3, 2004, 12:29:03 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/buerli: merged back from trunk, with new configure makefile and so forth.

Location:
orxonox/branches/buerli
Files:
31 edited
9 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/buerli/Makefile.in

    r2685 r2707  
    1 # Makefile.in generated by automake 1.7.9 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    5 # Free Software Foundation, Inc.
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1414
    1515@SET_MAKE@
    16 
    1716srcdir = @srcdir@
    1817top_srcdir = @top_srcdir@
     
    2221pkgincludedir = $(includedir)/@PACKAGE@
    2322top_builddir = .
    24 
    2523am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    2624INSTALL = @INSTALL@
     
    3634PRE_UNINSTALL = :
    3735POST_UNINSTALL = :
     36subdir = .
     37DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
     38        $(srcdir)/Makefile.in $(srcdir)/config.h.in \
     39        $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
     40        depcomp install-sh missing mkinstalldirs
     41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     42am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     44        $(ACLOCAL_M4)
     45am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
     46 configure.lineno configure.status.lineno
     47mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
     48CONFIG_HEADER = config.h
     49CONFIG_CLEAN_FILES =
     50SOURCES =
     51DIST_SOURCES =
     52RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
     53        html-recursive info-recursive install-data-recursive \
     54        install-exec-recursive install-info-recursive \
     55        install-recursive installcheck-recursive installdirs-recursive \
     56        pdf-recursive ps-recursive uninstall-info-recursive \
     57        uninstall-recursive
     58ETAGS = etags
     59CTAGS = ctags
     60DIST_SUBDIRS = $(SUBDIRS)
     61DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
     62distdir = $(PACKAGE)-$(VERSION)
     63top_distdir = $(distdir)
     64am__remove_distdir = \
     65  { test ! -d $(distdir) \
     66    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
     67         && rm -fr $(distdir); }; }
     68DIST_ARCHIVES = $(distdir).tar.gz
     69GZIP_ENV = --best
     70distuninstallcheck_listfiles = find . -type f -print
     71distcleancheck_listfiles = find . -type f -print
    3872ACLOCAL = @ACLOCAL@
    3973AMDEP_FALSE = @AMDEP_FALSE@
     
    90124am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
    91125am__include = @am__include@
     126am__leading_dot = @am__leading_dot@
    92127am__quote = @am__quote@
    93128bindir = @bindir@
     
    103138localstatedir = @localstatedir@
    104139mandir = @mandir@
     140mkdir_p = @mkdir_p@
    105141oldincludedir = @oldincludedir@
    106142prefix = @prefix@
     
    111147target_alias = @target_alias@
    112148SUBDIRS = src console gui
    113 subdir = .
    114 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    115 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    116 CONFIG_HEADER = config.h
    117 CONFIG_CLEAN_FILES =
    118 DIST_SOURCES =
    119 
    120 RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
    121         ps-recursive install-info-recursive uninstall-info-recursive \
    122         all-recursive install-data-recursive install-exec-recursive \
    123         installdirs-recursive install-recursive uninstall-recursive \
    124         check-recursive installcheck-recursive
    125 DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \
    126         COPYING ChangeLog INSTALL Makefile.am NEWS aclocal.m4 \
    127         config.h.in configure configure.ac depcomp install-sh missing \
    128         mkinstalldirs
    129 DIST_SUBDIRS = $(SUBDIRS)
    130149all: config.h
    131150        $(MAKE) $(AM_MAKEFLAGS) all-recursive
    132151
    133152.SUFFIXES:
    134 
    135 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
    136  configure.lineno
    137 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
     153am--refresh:
     154        @:
     155$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     156        @for dep in $?; do \
     157          case '$(am__configure_deps)' in \
     158            *$$dep*) \
     159              echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
     160              cd $(srcdir) && $(AUTOMAKE) --gnu  \
     161                && exit 0; \
     162              exit 1;; \
     163          esac; \
     164        done; \
     165        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
    138166        cd $(top_srcdir) && \
    139167          $(AUTOMAKE) --gnu  Makefile
    140 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
    141         cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
    142 
    143 $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     168.PRECIOUS: Makefile
     169Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     170        @case '$?' in \
     171          *config.status*) \
     172            echo ' $(SHELL) ./config.status'; \
     173            $(SHELL) ./config.status;; \
     174          *) \
     175            echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
     176            cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
     177        esac;
     178
     179$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
    144180        $(SHELL) ./config.status --recheck
    145 $(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
     181
     182$(top_srcdir)/configure:  $(am__configure_deps)
    146183        cd $(srcdir) && $(AUTOCONF)
    147 
    148 $(ACLOCAL_M4):  configure.ac
     184$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
    149185        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
    150186
     
    158194        @rm -f stamp-h1
    159195        cd $(top_builddir) && $(SHELL) ./config.status config.h
    160 
    161 $(srcdir)/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
     196$(srcdir)/config.h.in:  $(am__configure_deps)
    162197        cd $(top_srcdir) && $(AUTOHEADER)
    163         touch $(srcdir)/config.h.in
     198        rm -f stamp-h1
     199        touch $@
    164200
    165201distclean-hdr:
     
    226262        done
    227263
    228 ETAGS = etags
    229 ETAGSFLAGS =
    230 
    231 CTAGS = ctags
    232 CTAGSFLAGS =
    233 
    234 tags: TAGS
    235 
    236264ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
    237265        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
     
    242270               END { for (i in files) print i; }'`; \
    243271        mkid -fID $$unique
     272tags: TAGS
    244273
    245274TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
     
    247276        tags=; \
    248277        here=`pwd`; \
    249         if (etags --etags-include --version) >/dev/null 2>&1; then \
     278        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
    250279          include_option=--etags-include; \
     280          empty_fix=.; \
    251281        else \
    252282          include_option=--include; \
     283          empty_fix=; \
    253284        fi; \
    254285        list='$(SUBDIRS)'; for subdir in $$list; do \
    255286          if test "$$subdir" = .; then :; else \
    256             test -f $$subdir/TAGS && \
     287            test ! -f $$subdir/TAGS || \
    257288              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
    258289          fi; \
     
    264295          $(AWK) '    { files[$$0] = 1; } \
    265296               END { for (i in files) print i; }'`; \
    266         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    267           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    268              $$tags $$unique
    269 
     297        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     298          test -n "$$unique" || unique=$$empty_fix; \
     299          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     300            $$tags $$unique; \
     301        fi
    270302ctags: CTAGS
    271303CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
     
    290322distclean-tags:
    291323        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
    292 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    293 
    294 top_distdir = .
    295 distdir = $(PACKAGE)-$(VERSION)
    296 
    297 am__remove_distdir = \
    298   { test ! -d $(distdir) \
    299     || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
    300          && rm -fr $(distdir); }; }
    301 
    302 GZIP_ENV = --best
    303 distuninstallcheck_listfiles = find . -type f -print
    304 distcleancheck_listfiles = find . -type f -print
    305324
    306325distdir: $(DISTFILES)
     
    318337          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
    319338            dir="/$$dir"; \
    320             $(mkinstalldirs) "$(distdir)$$dir"; \
     339            $(mkdir_p) "$(distdir)$$dir"; \
    321340          else \
    322341            dir=''; \
     
    335354        list='$(SUBDIRS)'; for subdir in $$list; do \
    336355          if test "$$subdir" = .; then :; else \
    337             test -d $(distdir)/$$subdir \
    338             || mkdir $(distdir)/$$subdir \
     356            test -d "$(distdir)/$$subdir" \
     357            || mkdir "$(distdir)/$$subdir" \
    339358            || exit 1; \
    340359            (cd $$subdir && \
    341360              $(MAKE) $(AM_MAKEFLAGS) \
    342                 top_distdir="$(top_distdir)" \
    343                 distdir=../$(distdir)/$$subdir \
     361                top_distdir="../$(top_distdir)" \
     362                distdir="../$(distdir)/$$subdir" \
    344363                distdir) \
    345364              || exit 1; \
     
    355374        $(am__remove_distdir)
    356375
     376dist-bzip2: distdir
     377        $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
     378        $(am__remove_distdir)
     379
     380dist-tarZ: distdir
     381        $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
     382        $(am__remove_distdir)
     383
     384dist-shar: distdir
     385        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
     386        $(am__remove_distdir)
     387
     388dist-zip: distdir
     389        -rm -f $(distdir).zip
     390        zip -rq $(distdir).zip $(distdir)
     391        $(am__remove_distdir)
     392
    357393dist dist-all: distdir
    358394        $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
     
    363399# tarfile.
    364400distcheck: dist
    365         $(am__remove_distdir)
    366         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
     401        case '$(DIST_ARCHIVES)' in \
     402        *.tar.gz*) \
     403          GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
     404        *.tar.bz2*) \
     405          bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
     406        *.tar.Z*) \
     407          uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
     408        *.shar.gz*) \
     409          GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
     410        *.zip*) \
     411          unzip $(distdir).zip ;;\
     412        esac
    367413        chmod -R a-w $(distdir); chmod a+w $(distdir)
    368414        mkdir $(distdir)/_build
     
    384430          && chmod -R a-w "$$dc_install_base" \
    385431          && ({ \
    386                (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
     432               (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
    387433               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
    388434               && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
     
    391437              } || { rm -rf "$$dc_destdir"; exit 1; }) \
    392438          && rm -rf "$$dc_destdir" \
    393           && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
    394           && rm -f $(distdir).tar.gz \
     439          && $(MAKE) $(AM_MAKEFLAGS) dist \
     440          && rm -rf $(DIST_ARCHIVES) \
    395441          && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
    396442        $(am__remove_distdir)
    397         @echo "$(distdir).tar.gz is ready for distribution" | \
    398           sed 'h;s/./=/g;p;x;p;x'
     443        @(echo "$(distdir) archives ready for distribution: "; \
     444          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
     445          sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
    399446distuninstallcheck:
    400447        @cd $(distuninstallcheck_dir) \
     
    420467installdirs: installdirs-recursive
    421468installdirs-am:
    422 
    423469install: install-recursive
    424470install-exec: install-exec-recursive
     
    458504dvi-am:
    459505
     506html: html-recursive
     507
    460508info: info-recursive
    461509
     
    494542uninstall-info: uninstall-info-recursive
    495543
    496 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
    497         clean-generic clean-recursive ctags ctags-recursive dist \
    498         dist-all dist-gzip distcheck distclean distclean-generic \
    499         distclean-hdr distclean-recursive distclean-tags distcleancheck \
    500         distdir distuninstallcheck dvi dvi-am dvi-recursive info \
    501         info-am info-recursive install install-am install-data \
    502         install-data-am install-data-recursive install-exec \
    503         install-exec-am install-exec-recursive install-info \
    504         install-info-am install-info-recursive install-man \
    505         install-recursive install-strip installcheck installcheck-am \
    506         installdirs installdirs-am installdirs-recursive \
    507         maintainer-clean maintainer-clean-generic \
    508         maintainer-clean-recursive mostlyclean mostlyclean-generic \
    509         mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
    510         ps-recursive tags tags-recursive uninstall uninstall-am \
    511         uninstall-info-am uninstall-info-recursive uninstall-recursive
     544.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
     545        check-am clean clean-generic clean-recursive ctags \
     546        ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
     547        dist-tarZ dist-zip distcheck distclean distclean-generic \
     548        distclean-hdr distclean-recursive distclean-tags \
     549        distcleancheck distdir distuninstallcheck dvi dvi-am html \
     550        html-am info info-am install install-am install-data \
     551        install-data-am install-exec install-exec-am install-info \
     552        install-info-am install-man install-strip installcheck \
     553        installcheck-am installdirs installdirs-am maintainer-clean \
     554        maintainer-clean-generic maintainer-clean-recursive \
     555        mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
     556        pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
     557        uninstall-info-am
    512558
    513559# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • orxonox/branches/buerli/aclocal.m4

    r2617 r2707  
    1 # generated automatically by aclocal 1.7.1 -*- Autoconf -*-
    2 
    3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
     1# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
     2
     3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    44# Free Software Foundation, Inc.
    55# This file is free software; the Free Software Foundation
     
    1212# PARTICULAR PURPOSE.
    1313
    14 # Do all the work for Automake.                            -*- Autoconf -*-
    15 
    16 # This macro actually does too much some checks are only needed if
    17 # your package does certain things.  But this isn't really a big deal.
    18 
    19 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
     14#                                                        -*- Autoconf -*-
     15# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
     16# Generated from amversion.in; do not edit by hand.
     17
     18# This program is free software; you can redistribute it and/or modify
     19# it under the terms of the GNU General Public License as published by
     20# the Free Software Foundation; either version 2, or (at your option)
     21# any later version.
     22
     23# This program is distributed in the hope that it will be useful,
     24# but WITHOUT ANY WARRANTY; without even the implied warranty of
     25# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     26# GNU General Public License for more details.
     27
     28# You should have received a copy of the GNU General Public License
     29# along with this program; if not, write to the Free Software
     30# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     31
     32# AM_AUTOMAKE_VERSION(VERSION)
     33# ----------------------------
     34# Automake X.Y traces this macro to ensure aclocal.m4 has been
     35# generated from the m4 files accompanying Automake X.Y.
     36AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
     37
     38# AM_SET_CURRENT_AUTOMAKE_VERSION
     39# -------------------------------
     40# Call AM_AUTOMAKE_VERSION so it can be traced.
     41# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
     42AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
     43         [AM_AUTOMAKE_VERSION([1.8.5])])
     44
     45# AM_AUX_DIR_EXPAND
     46
     47# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
     48
     49# This program is free software; you can redistribute it and/or modify
     50# it under the terms of the GNU General Public License as published by
     51# the Free Software Foundation; either version 2, or (at your option)
     52# any later version.
     53
     54# This program is distributed in the hope that it will be useful,
     55# but WITHOUT ANY WARRANTY; without even the implied warranty of
     56# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     57# GNU General Public License for more details.
     58
     59# You should have received a copy of the GNU General Public License
     60# along with this program; if not, write to the Free Software
     61# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     62# 02111-1307, USA.
     63
     64# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
     65# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
     66# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
     67#
     68# Of course, Automake must honor this variable whenever it calls a
     69# tool from the auxiliary directory.  The problem is that $srcdir (and
     70# therefore $ac_aux_dir as well) can be either absolute or relative,
     71# depending on how configure is run.  This is pretty annoying, since
     72# it makes $ac_aux_dir quite unusable in subdirectories: in the top
     73# source directory, any form will work fine, but in subdirectories a
     74# relative path needs to be adjusted first.
     75#
     76# $ac_aux_dir/missing
     77#    fails when called from a subdirectory if $ac_aux_dir is relative
     78# $top_srcdir/$ac_aux_dir/missing
     79#    fails if $ac_aux_dir is absolute,
     80#    fails when called from a subdirectory in a VPATH build with
     81#          a relative $ac_aux_dir
     82#
     83# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
     84# are both prefixed by $srcdir.  In an in-source build this is usually
     85# harmless because $srcdir is `.', but things will broke when you
     86# start a VPATH build or use an absolute $srcdir.
     87#
     88# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
     89# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
     90#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
     91# and then we would define $MISSING as
     92#   MISSING="\${SHELL} $am_aux_dir/missing"
     93# This will work as long as MISSING is not called from configure, because
     94# unfortunately $(top_srcdir) has no meaning in configure.
     95# However there are other variables, like CC, which are often used in
     96# configure, and could therefore not use this "fixed" $ac_aux_dir.
     97#
     98# Another solution, used here, is to always expand $ac_aux_dir to an
     99# absolute PATH.  The drawback is that using absolute paths prevent a
     100# configured tree to be moved without reconfiguration.
     101
     102AC_DEFUN([AM_AUX_DIR_EXPAND],
     103[dnl Rely on autoconf to set up CDPATH properly.
     104AC_PREREQ([2.50])dnl
     105# expand $ac_aux_dir to an absolute path
     106am_aux_dir=`cd $ac_aux_dir && pwd`
     107])
     108
     109# AM_CONDITIONAL                                              -*- Autoconf -*-
     110
     111# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
     112
     113# This program is free software; you can redistribute it and/or modify
     114# it under the terms of the GNU General Public License as published by
     115# the Free Software Foundation; either version 2, or (at your option)
     116# any later version.
     117
     118# This program is distributed in the hope that it will be useful,
     119# but WITHOUT ANY WARRANTY; without even the implied warranty of
     120# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     121# GNU General Public License for more details.
     122
     123# You should have received a copy of the GNU General Public License
     124# along with this program; if not, write to the Free Software
     125# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     126# 02111-1307, USA.
     127
     128# serial 6
     129
     130# AM_CONDITIONAL(NAME, SHELL-CONDITION)
     131# -------------------------------------
     132# Define a conditional.
     133AC_DEFUN([AM_CONDITIONAL],
     134[AC_PREREQ(2.52)dnl
     135 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
     136        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
     137AC_SUBST([$1_TRUE])
     138AC_SUBST([$1_FALSE])
     139if $2; then
     140  $1_TRUE=
     141  $1_FALSE='#'
     142else
     143  $1_TRUE='#'
     144  $1_FALSE=
     145fi
     146AC_CONFIG_COMMANDS_PRE(
     147[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
     148  AC_MSG_ERROR([conditional "$1" was never defined.
     149Usually this means the macro was only invoked conditionally.])
     150fi])])
     151
     152# serial 7                                              -*- Autoconf -*-
     153
     154# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
    20155# Free Software Foundation, Inc.
    21156
     
    35170# 02111-1307, USA.
    36171
    37 # serial 8
    38172
    39173# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
     
    44178
    45179
    46 AC_PREREQ([2.54])
    47 
    48 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
    49 # the ones we care about.
    50 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
     180
     181# _AM_DEPENDENCIES(NAME)
     182# ----------------------
     183# See how the compiler implements dependency checking.
     184# NAME is "CC", "CXX", "GCJ", or "OBJC".
     185# We try a few techniques and use that to set a single cache variable.
     186#
     187# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
     188# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
     189# dependency, and given that the user is not expected to run this macro,
     190# just rely on AC_PROG_CC.
     191AC_DEFUN([_AM_DEPENDENCIES],
     192[AC_REQUIRE([AM_SET_DEPDIR])dnl
     193AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
     194AC_REQUIRE([AM_MAKE_INCLUDE])dnl
     195AC_REQUIRE([AM_DEP_TRACK])dnl
     196
     197ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
     198       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
     199       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
     200       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
     201                   [depcc="$$1"   am_compiler_list=])
     202
     203AC_CACHE_CHECK([dependency style of $depcc],
     204               [am_cv_$1_dependencies_compiler_type],
     205[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
     206  # We make a subdir and do the tests there.  Otherwise we can end up
     207  # making bogus files that we don't know about and never remove.  For
     208  # instance it was reported that on HP-UX the gcc test will end up
     209  # making a dummy file named `D' -- because `-MD' means `put the output
     210  # in D'.
     211  mkdir conftest.dir
     212  # Copy depcomp to subdir because otherwise we won't find it if we're
     213  # using a relative directory.
     214  cp "$am_depcomp" conftest.dir
     215  cd conftest.dir
     216  # We will build objects and dependencies in a subdirectory because
     217  # it helps to detect inapplicable dependency modes.  For instance
     218  # both Tru64's cc and ICC support -MD to output dependencies as a
     219  # side effect of compilation, but ICC will put the dependencies in
     220  # the current directory while Tru64 will put them in the object
     221  # directory.
     222  mkdir sub
     223
     224  am_cv_$1_dependencies_compiler_type=none
     225  if test "$am_compiler_list" = ""; then
     226     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
     227  fi
     228  for depmode in $am_compiler_list; do
     229    # Setup a source with many dependencies, because some compilers
     230    # like to wrap large dependency lists on column 80 (with \), and
     231    # we should not choose a depcomp mode which is confused by this.
     232    #
     233    # We need to recreate these files for each test, as the compiler may
     234    # overwrite some of them when testing with obscure command lines.
     235    # This happens at least with the AIX C compiler.
     236    : > sub/conftest.c
     237    for i in 1 2 3 4 5 6; do
     238      echo '#include "conftst'$i'.h"' >> sub/conftest.c
     239      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     240      # Solaris 8's {/usr,}/bin/sh.
     241      touch sub/conftst$i.h
     242    done
     243    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     244
     245    case $depmode in
     246    nosideeffect)
     247      # after this tag, mechanisms are not by side-effect, so they'll
     248      # only be used when explicitly requested
     249      if test "x$enable_dependency_tracking" = xyes; then
     250        continue
     251      else
     252        break
     253      fi
     254      ;;
     255    none) break ;;
     256    esac
     257    # We check with `-c' and `-o' for the sake of the "dashmstdout"
     258    # mode.  It turns out that the SunPro C++ compiler does not properly
     259    # handle `-M -o', and we need to detect this.
     260    if depmode=$depmode \
     261       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
     262       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
     263       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
     264         >/dev/null 2>conftest.err &&
     265       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
     266       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
     267       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
     268      # icc doesn't choke on unknown options, it will just issue warnings
     269      # or remarks (even with -Werror).  So we grep stderr for any message
     270      # that says an option was ignored or not supported.
     271      # When given -MP, icc 7.0 and 7.1 complain thusly:
     272      #   icc: Command line warning: ignoring option '-M'; no argument required
     273      # The diagnosis changed in icc 8.0:
     274      #   icc: Command line remark: option '-MP' not supported
     275      if (grep 'ignoring option' conftest.err ||
     276          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
     277        am_cv_$1_dependencies_compiler_type=$depmode
     278        break
     279      fi
     280    fi
     281  done
     282
     283  cd ..
     284  rm -rf conftest.dir
     285else
     286  am_cv_$1_dependencies_compiler_type=none
     287fi
     288])
     289AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
     290AM_CONDITIONAL([am__fastdep$1], [
     291  test "x$enable_dependency_tracking" != xno \
     292  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
     293])
     294
     295
     296# AM_SET_DEPDIR
     297# -------------
     298# Choose a directory name for dependency files.
     299# This macro is AC_REQUIREd in _AM_DEPENDENCIES
     300AC_DEFUN([AM_SET_DEPDIR],
     301[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
     302AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
     303])
     304
     305
     306# AM_DEP_TRACK
     307# ------------
     308AC_DEFUN([AM_DEP_TRACK],
     309[AC_ARG_ENABLE(dependency-tracking,
     310[  --disable-dependency-tracking  speeds up one-time build
     311  --enable-dependency-tracking   do not reject slow dependency extractors])
     312if test "x$enable_dependency_tracking" != xno; then
     313  am_depcomp="$ac_aux_dir/depcomp"
     314  AMDEPBACKSLASH='\'
     315fi
     316AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
     317AC_SUBST([AMDEPBACKSLASH])
     318])
     319
     320# Generate code to set up dependency tracking.   -*- Autoconf -*-
     321
     322# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     323
     324# This program is free software; you can redistribute it and/or modify
     325# it under the terms of the GNU General Public License as published by
     326# the Free Software Foundation; either version 2, or (at your option)
     327# any later version.
     328
     329# This program is distributed in the hope that it will be useful,
     330# but WITHOUT ANY WARRANTY; without even the implied warranty of
     331# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     332# GNU General Public License for more details.
     333
     334# You should have received a copy of the GNU General Public License
     335# along with this program; if not, write to the Free Software
     336# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     337# 02111-1307, USA.
     338
     339#serial 2
     340
     341# _AM_OUTPUT_DEPENDENCY_COMMANDS
     342# ------------------------------
     343AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
     344[for mf in $CONFIG_FILES; do
     345  # Strip MF so we end up with the name of the file.
     346  mf=`echo "$mf" | sed -e 's/:.*$//'`
     347  # Check whether this is an Automake generated Makefile or not.
     348  # We used to match only the files named `Makefile.in', but
     349  # some people rename them; so instead we look at the file content.
     350  # Grep'ing the first line is not enough: some people post-process
     351  # each Makefile.in and add a new line on top of each file to say so.
     352  # So let's grep whole file.
     353  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
     354    dirpart=`AS_DIRNAME("$mf")`
     355  else
     356    continue
     357  fi
     358  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
     359  # Extract the definition of DEP_FILES from the Makefile without
     360  # running `make'.
     361  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     362  test -z "$DEPDIR" && continue
     363  # When using ansi2knr, U may be empty or an underscore; expand it
     364  U=`sed -n 's/^U = //p' < "$mf"`
     365  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
     366  # We invoke sed twice because it is the simplest approach to
     367  # changing $(DEPDIR) to its actual value in the expansion.
     368  for file in `sed -n '
     369    /^DEP_FILES = .*\\\\$/ {
     370      s/^DEP_FILES = //
     371      :loop
     372        s/\\\\$//
     373        p
     374        n
     375        /\\\\$/ b loop
     376      p
     377    }
     378    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
     379       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
     380    # Make sure the directory exists.
     381    test -f "$dirpart/$file" && continue
     382    fdir=`AS_DIRNAME(["$file"])`
     383    AS_MKDIR_P([$dirpart/$fdir])
     384    # echo "creating $dirpart/$file"
     385    echo '# dummy' > "$dirpart/$file"
     386  done
     387done
     388])# _AM_OUTPUT_DEPENDENCY_COMMANDS
     389
     390
     391# AM_OUTPUT_DEPENDENCY_COMMANDS
     392# -----------------------------
     393# This macro should only be invoked once -- use via AC_REQUIRE.
     394#
     395# This code is only required when automatic dependency tracking
     396# is enabled.  FIXME.  This creates each `.P' file that we will
     397# need in order to bootstrap the dependency handling code.
     398AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
     399[AC_CONFIG_COMMANDS([depfiles],
     400     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
     401     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
     402])
     403
     404# Do all the work for Automake.                            -*- Autoconf -*-
     405
     406# This macro actually does too much some checks are only needed if
     407# your package does certain things.  But this isn't really a big deal.
     408
     409# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
     410# Free Software Foundation, Inc.
     411
     412# This program is free software; you can redistribute it and/or modify
     413# it under the terms of the GNU General Public License as published by
     414# the Free Software Foundation; either version 2, or (at your option)
     415# any later version.
     416
     417# This program is distributed in the hope that it will be useful,
     418# but WITHOUT ANY WARRANTY; without even the implied warranty of
     419# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     420# GNU General Public License for more details.
     421
     422# You should have received a copy of the GNU General Public License
     423# along with this program; if not, write to the Free Software
     424# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     425# 02111-1307, USA.
     426
     427# serial 11
    51428
    52429# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
     
    62439# release and drop the old call support.
    63440AC_DEFUN([AM_INIT_AUTOMAKE],
    64 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
    65  AC_REQUIRE([AC_PROG_INSTALL])dnl
     441[AC_PREREQ([2.58])dnl
     442dnl Autoconf wants to disallow AM_ names.  We explicitly allow
     443dnl the ones we care about.
     444m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
     445AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
     446AC_REQUIRE([AC_PROG_INSTALL])dnl
    66447# test to see if srcdir already configured
    67448if test "`cd $srcdir && pwd`" != "`pwd`" &&
     
    87468 AC_SUBST([VERSION], [$2])],
    88469[_AM_SET_OPTIONS([$1])dnl
    89  AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
    90  AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
     470 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
     471 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
    91472
    92473_AM_IF_OPTION([no-define],,
     
    105486AM_PROG_INSTALL_SH
    106487AM_PROG_INSTALL_STRIP
     488AC_REQUIRE([AM_PROG_MKDIR_P])dnl
    107489# We need awk for the "check" target.  The system "awk" is bad on
    108490# some platforms.
    109491AC_REQUIRE([AC_PROG_AWK])dnl
    110492AC_REQUIRE([AC_PROG_MAKE_SET])dnl
     493AC_REQUIRE([AM_SET_LEADING_DOT])dnl
    111494
    112495_AM_IF_OPTION([no-dependencies],,
     
    131514# our stamp files there.
    132515AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
    133 [_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
     516[# Compute $1's index in $config_headers.
     517_am_stamp_count=1
     518for _am_header in $config_headers :; do
     519  case $_am_header in
     520    $1 | $1:* )
     521      break ;;
     522    * )
     523      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
     524  esac
     525done
    134526echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
    135527
    136 # Copyright 2002  Free Software Foundation, Inc.
    137 
    138 # This program is free software; you can redistribute it and/or modify
    139 # it under the terms of the GNU General Public License as published by
    140 # the Free Software Foundation; either version 2, or (at your option)
    141 # any later version.
    142 
    143 # This program is distributed in the hope that it will be useful,
    144 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    145 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    146 # GNU General Public License for more details.
    147 
    148 # You should have received a copy of the GNU General Public License
    149 # along with this program; if not, write to the Free Software
    150 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    151 
    152 # AM_AUTOMAKE_VERSION(VERSION)
    153 # ----------------------------
    154 # Automake X.Y traces this macro to ensure aclocal.m4 has been
    155 # generated from the m4 files accompanying Automake X.Y.
    156 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
    157 
    158 # AM_SET_CURRENT_AUTOMAKE_VERSION
    159 # -------------------------------
    160 # Call AM_AUTOMAKE_VERSION so it can be traced.
    161 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
    162 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
    163          [AM_AUTOMAKE_VERSION([1.7.1])])
     528# AM_PROG_INSTALL_SH
     529# ------------------
     530# Define $install_sh.
     531
     532# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
     533
     534# This program is free software; you can redistribute it and/or modify
     535# it under the terms of the GNU General Public License as published by
     536# the Free Software Foundation; either version 2, or (at your option)
     537# any later version.
     538
     539# This program is distributed in the hope that it will be useful,
     540# but WITHOUT ANY WARRANTY; without even the implied warranty of
     541# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     542# GNU General Public License for more details.
     543
     544# You should have received a copy of the GNU General Public License
     545# along with this program; if not, write to the Free Software
     546# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     547# 02111-1307, USA.
     548
     549AC_DEFUN([AM_PROG_INSTALL_SH],
     550[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
     551install_sh=${install_sh-"$am_aux_dir/install-sh"}
     552AC_SUBST(install_sh)])
     553
     554#                                                          -*- Autoconf -*-
     555# Copyright (C) 2003  Free Software Foundation, Inc.
     556
     557# This program is free software; you can redistribute it and/or modify
     558# it under the terms of the GNU General Public License as published by
     559# the Free Software Foundation; either version 2, or (at your option)
     560# any later version.
     561
     562# This program is distributed in the hope that it will be useful,
     563# but WITHOUT ANY WARRANTY; without even the implied warranty of
     564# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     565# GNU General Public License for more details.
     566
     567# You should have received a copy of the GNU General Public License
     568# along with this program; if not, write to the Free Software
     569# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     570# 02111-1307, USA.
     571
     572# serial 1
     573
     574# Check whether the underlying file-system supports filenames
     575# with a leading dot.  For instance MS-DOS doesn't.
     576AC_DEFUN([AM_SET_LEADING_DOT],
     577[rm -rf .tst 2>/dev/null
     578mkdir .tst 2>/dev/null
     579if test -d .tst; then
     580  am__leading_dot=.
     581else
     582  am__leading_dot=_
     583fi
     584rmdir .tst 2>/dev/null
     585AC_SUBST([am__leading_dot])])
     586
     587# Check to see how 'make' treats includes.      -*- Autoconf -*-
     588
     589# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
     590
     591# This program is free software; you can redistribute it and/or modify
     592# it under the terms of the GNU General Public License as published by
     593# the Free Software Foundation; either version 2, or (at your option)
     594# any later version.
     595
     596# This program is distributed in the hope that it will be useful,
     597# but WITHOUT ANY WARRANTY; without even the implied warranty of
     598# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     599# GNU General Public License for more details.
     600
     601# You should have received a copy of the GNU General Public License
     602# along with this program; if not, write to the Free Software
     603# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     604# 02111-1307, USA.
     605
     606# serial 2
     607
     608# AM_MAKE_INCLUDE()
     609# -----------------
     610# Check to see how make treats includes.
     611AC_DEFUN([AM_MAKE_INCLUDE],
     612[am_make=${MAKE-make}
     613cat > confinc << 'END'
     614am__doit:
     615        @echo done
     616.PHONY: am__doit
     617END
     618# If we don't find an include directive, just comment out the code.
     619AC_MSG_CHECKING([for style of include used by $am_make])
     620am__include="#"
     621am__quote=
     622_am_result=none
     623# First try GNU make style include.
     624echo "include confinc" > confmf
     625# We grep out `Entering directory' and `Leaving directory'
     626# messages which can occur if `w' ends up in MAKEFLAGS.
     627# In particular we don't look at `^make:' because GNU make might
     628# be invoked under some other name (usually "gmake"), in which
     629# case it prints its new name instead of `make'.
     630if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
     631   am__include=include
     632   am__quote=
     633   _am_result=GNU
     634fi
     635# Now try BSD make style include.
     636if test "$am__include" = "#"; then
     637   echo '.include "confinc"' > confmf
     638   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
     639      am__include=.include
     640      am__quote="\""
     641      _am_result=BSD
     642   fi
     643fi
     644AC_SUBST([am__include])
     645AC_SUBST([am__quote])
     646AC_MSG_RESULT([$_am_result])
     647rm -f confinc confmf
     648])
     649
     650#  -*- Autoconf -*-
     651
     652
     653# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
     654
     655# This program is free software; you can redistribute it and/or modify
     656# it under the terms of the GNU General Public License as published by
     657# the Free Software Foundation; either version 2, or (at your option)
     658# any later version.
     659
     660# This program is distributed in the hope that it will be useful,
     661# but WITHOUT ANY WARRANTY; without even the implied warranty of
     662# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     663# GNU General Public License for more details.
     664
     665# You should have received a copy of the GNU General Public License
     666# along with this program; if not, write to the Free Software
     667# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     668# 02111-1307, USA.
     669
     670# serial 3
     671
     672# AM_MISSING_PROG(NAME, PROGRAM)
     673# ------------------------------
     674AC_DEFUN([AM_MISSING_PROG],
     675[AC_REQUIRE([AM_MISSING_HAS_RUN])
     676$1=${$1-"${am_missing_run}$2"}
     677AC_SUBST($1)])
     678
     679
     680# AM_MISSING_HAS_RUN
     681# ------------------
     682# Define MISSING if not defined so far and test if it supports --run.
     683# If it does, set am_missing_run to use it, otherwise, to nothing.
     684AC_DEFUN([AM_MISSING_HAS_RUN],
     685[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
     686test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
     687# Use eval to expand $SHELL
     688if eval "$MISSING --run true"; then
     689  am_missing_run="$MISSING --run "
     690else
     691  am_missing_run=
     692  AC_MSG_WARN([`missing' script is too old or missing])
     693fi
     694])
     695
     696# AM_PROG_MKDIR_P
     697# ---------------
     698# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
     699
     700# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
     701
     702# This program is free software; you can redistribute it and/or modify
     703# it under the terms of the GNU General Public License as published by
     704# the Free Software Foundation; either version 2, or (at your option)
     705# any later version.
     706
     707# This program is distributed in the hope that it will be useful,
     708# but WITHOUT ANY WARRANTY; without even the implied warranty of
     709# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     710# GNU General Public License for more details.
     711
     712# You should have received a copy of the GNU General Public License
     713# along with this program; if not, write to the Free Software
     714# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
     715# 02111-1307, USA.
     716
     717# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
     718# created by `make install' are always world readable, even if the
     719# installer happens to have an overly restrictive umask (e.g. 077).
     720# This was a mistake.  There are at least two reasons why we must not
     721# use `-m 0755':
     722#   - it causes special bits like SGID to be ignored,
     723#   - it may be too restrictive (some setups expect 775 directories).
     724#
     725# Do not use -m 0755 and let people choose whatever they expect by
     726# setting umask.
     727#
     728# We cannot accept any implementation of `mkdir' that recognizes `-p'.
     729# Some implementations (such as Solaris 8's) are not thread-safe: if a
     730# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
     731# concurrently, both version can detect that a/ is missing, but only
     732# one can create it and the other will error out.  Consequently we
     733# restrict ourselves to GNU make (using the --version option ensures
     734# this.)
     735AC_DEFUN([AM_PROG_MKDIR_P],
     736[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
     737  # Keeping the `.' argument allows $(mkdir_p) to be used without
     738  # argument.  Indeed, we sometimes output rules like
     739  #   $(mkdir_p) $(somedir)
     740  # where $(somedir) is conditionally defined.
     741  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
     742  # expensive solution, as it forces Make to start a sub-shell.)
     743  mkdir_p='mkdir -p -- .'
     744else
     745  # On NextStep and OpenStep, the `mkdir' command does not
     746  # recognize any option.  It will interpret all options as
     747  # directories to create, and then abort because `.' already
     748  # exists.
     749  for d in ./-p ./--version;
     750  do
     751    test -d $d && rmdir $d
     752  done
     753  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
     754  if test -f "$ac_aux_dir/mkinstalldirs"; then
     755    mkdir_p='$(mkinstalldirs)'
     756  else
     757    mkdir_p='$(install_sh) -d'
     758  fi
     759fi
     760AC_SUBST([mkdir_p])])
    164761
    165762# Helper functions for option handling.                    -*- Autoconf -*-
    166763
    167 # Copyright 2001, 2002  Free Software Foundation, Inc.
     764# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
    168765
    169766# This program is free software; you can redistribute it and/or modify
     
    211808#
    212809
    213 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
     810# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
    214811
    215812# This program is free software; you can redistribute it and/or modify
     
    271868AC_MSG_RESULT(yes)])
    272869
    273 #  -*- Autoconf -*-
    274 
    275 
    276 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
    277 
    278 # This program is free software; you can redistribute it and/or modify
    279 # it under the terms of the GNU General Public License as published by
    280 # the Free Software Foundation; either version 2, or (at your option)
    281 # any later version.
    282 
    283 # This program is distributed in the hope that it will be useful,
    284 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    285 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    286 # GNU General Public License for more details.
    287 
    288 # You should have received a copy of the GNU General Public License
    289 # along with this program; if not, write to the Free Software
    290 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    291 # 02111-1307, USA.
    292 
    293 # serial 3
    294 
    295 # AM_MISSING_PROG(NAME, PROGRAM)
    296 # ------------------------------
    297 AC_DEFUN([AM_MISSING_PROG],
    298 [AC_REQUIRE([AM_MISSING_HAS_RUN])
    299 $1=${$1-"${am_missing_run}$2"}
    300 AC_SUBST($1)])
    301 
    302 
    303 # AM_MISSING_HAS_RUN
    304 # ------------------
    305 # Define MISSING if not defined so far and test if it supports --run.
    306 # If it does, set am_missing_run to use it, otherwise, to nothing.
    307 AC_DEFUN([AM_MISSING_HAS_RUN],
    308 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    309 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
    310 # Use eval to expand $SHELL
    311 if eval "$MISSING --run true"; then
    312   am_missing_run="$MISSING --run "
    313 else
    314   am_missing_run=
    315   AC_MSG_WARN([`missing' script is too old or missing])
    316 fi
    317 ])
    318 
    319 # AM_AUX_DIR_EXPAND
    320 
    321 # Copyright 2001 Free Software Foundation, Inc.
    322 
    323 # This program is free software; you can redistribute it and/or modify
    324 # it under the terms of the GNU General Public License as published by
    325 # the Free Software Foundation; either version 2, or (at your option)
    326 # any later version.
    327 
    328 # This program is distributed in the hope that it will be useful,
    329 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    331 # GNU General Public License for more details.
    332 
    333 # You should have received a copy of the GNU General Public License
    334 # along with this program; if not, write to the Free Software
    335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    336 # 02111-1307, USA.
    337 
    338 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
    339 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
    340 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
    341 #
    342 # Of course, Automake must honor this variable whenever it calls a
    343 # tool from the auxiliary directory.  The problem is that $srcdir (and
    344 # therefore $ac_aux_dir as well) can be either absolute or relative,
    345 # depending on how configure is run.  This is pretty annoying, since
    346 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
    347 # source directory, any form will work fine, but in subdirectories a
    348 # relative path needs to be adjusted first.
    349 #
    350 # $ac_aux_dir/missing
    351 #    fails when called from a subdirectory if $ac_aux_dir is relative
    352 # $top_srcdir/$ac_aux_dir/missing
    353 #    fails if $ac_aux_dir is absolute,
    354 #    fails when called from a subdirectory in a VPATH build with
    355 #          a relative $ac_aux_dir
    356 #
    357 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
    358 # are both prefixed by $srcdir.  In an in-source build this is usually
    359 # harmless because $srcdir is `.', but things will broke when you
    360 # start a VPATH build or use an absolute $srcdir.
    361 #
    362 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
    363 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
    364 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
    365 # and then we would define $MISSING as
    366 #   MISSING="\${SHELL} $am_aux_dir/missing"
    367 # This will work as long as MISSING is not called from configure, because
    368 # unfortunately $(top_srcdir) has no meaning in configure.
    369 # However there are other variables, like CC, which are often used in
    370 # configure, and could therefore not use this "fixed" $ac_aux_dir.
    371 #
    372 # Another solution, used here, is to always expand $ac_aux_dir to an
    373 # absolute PATH.  The drawback is that using absolute paths prevent a
    374 # configured tree to be moved without reconfiguration.
    375 
    376 # Rely on autoconf to set up CDPATH properly.
    377 AC_PREREQ([2.50])
    378 
    379 AC_DEFUN([AM_AUX_DIR_EXPAND], [
    380 # expand $ac_aux_dir to an absolute path
    381 am_aux_dir=`cd $ac_aux_dir && pwd`
    382 ])
    383 
    384 # AM_PROG_INSTALL_SH
    385 # ------------------
    386 # Define $install_sh.
    387 
    388 # Copyright 2001 Free Software Foundation, Inc.
    389 
    390 # This program is free software; you can redistribute it and/or modify
    391 # it under the terms of the GNU General Public License as published by
    392 # the Free Software Foundation; either version 2, or (at your option)
    393 # any later version.
    394 
    395 # This program is distributed in the hope that it will be useful,
    396 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    397 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    398 # GNU General Public License for more details.
    399 
    400 # You should have received a copy of the GNU General Public License
    401 # along with this program; if not, write to the Free Software
    402 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    403 # 02111-1307, USA.
    404 
    405 AC_DEFUN([AM_PROG_INSTALL_SH],
    406 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
    407 install_sh=${install_sh-"$am_aux_dir/install-sh"}
    408 AC_SUBST(install_sh)])
    409 
    410870# AM_PROG_INSTALL_STRIP
    411871
    412 # Copyright 2001 Free Software Foundation, Inc.
     872# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
    413873
    414874# This program is free software; you can redistribute it and/or modify
     
    447907AC_SUBST([INSTALL_STRIP_PROGRAM])])
    448908
    449 # serial 4                                              -*- Autoconf -*-
    450 
    451 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
    452 
    453 # This program is free software; you can redistribute it and/or modify
    454 # it under the terms of the GNU General Public License as published by
    455 # the Free Software Foundation; either version 2, or (at your option)
    456 # any later version.
    457 
    458 # This program is distributed in the hope that it will be useful,
    459 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    460 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    461 # GNU General Public License for more details.
    462 
    463 # You should have received a copy of the GNU General Public License
    464 # along with this program; if not, write to the Free Software
    465 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    466 # 02111-1307, USA.
    467 
    468 
    469 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
    470 # written in clear, in which case automake, when reading aclocal.m4,
    471 # will think it sees a *use*, and therefore will trigger all it's
    472 # C support machinery.  Also note that it means that autoscan, seeing
    473 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
    474 
    475 
    476 
    477 # _AM_DEPENDENCIES(NAME)
    478 # ----------------------
    479 # See how the compiler implements dependency checking.
    480 # NAME is "CC", "CXX", "GCJ", or "OBJC".
    481 # We try a few techniques and use that to set a single cache variable.
    482 #
    483 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
    484 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
    485 # dependency, and given that the user is not expected to run this macro,
    486 # just rely on AC_PROG_CC.
    487 AC_DEFUN([_AM_DEPENDENCIES],
    488 [AC_REQUIRE([AM_SET_DEPDIR])dnl
    489 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
    490 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
    491 AC_REQUIRE([AM_DEP_TRACK])dnl
    492 
    493 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
    494        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
    495        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
    496        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
    497                    [depcc="$$1"   am_compiler_list=])
    498 
    499 AC_CACHE_CHECK([dependency style of $depcc],
    500                [am_cv_$1_dependencies_compiler_type],
    501 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
    502   # We make a subdir and do the tests there.  Otherwise we can end up
    503   # making bogus files that we don't know about and never remove.  For
    504   # instance it was reported that on HP-UX the gcc test will end up
    505   # making a dummy file named `D' -- because `-MD' means `put the output
    506   # in D'.
    507   mkdir conftest.dir
    508   # Copy depcomp to subdir because otherwise we won't find it if we're
    509   # using a relative directory.
    510   cp "$am_depcomp" conftest.dir
    511   cd conftest.dir
    512 
    513   am_cv_$1_dependencies_compiler_type=none
    514   if test "$am_compiler_list" = ""; then
    515      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
    516   fi
    517   for depmode in $am_compiler_list; do
    518     # We need to recreate these files for each test, as the compiler may
    519     # overwrite some of them when testing with obscure command lines.
    520     # This happens at least with the AIX C compiler.
    521     echo '#include "conftest.h"' > conftest.c
    522     echo 'int i;' > conftest.h
    523     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
    524 
    525     case $depmode in
    526     nosideeffect)
    527       # after this tag, mechanisms are not by side-effect, so they'll
    528       # only be used when explicitly requested
    529       if test "x$enable_dependency_tracking" = xyes; then
    530         continue
    531       else
    532         break
    533       fi
    534       ;;
    535     none) break ;;
    536     esac
    537     # We check with `-c' and `-o' for the sake of the "dashmstdout"
    538     # mode.  It turns out that the SunPro C++ compiler does not properly
    539     # handle `-M -o', and we need to detect this.
    540     if depmode=$depmode \
    541        source=conftest.c object=conftest.o \
    542        depfile=conftest.Po tmpdepfile=conftest.TPo \
    543        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
    544        grep conftest.h conftest.Po > /dev/null 2>&1 &&
    545        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    546       am_cv_$1_dependencies_compiler_type=$depmode
    547       break
    548     fi
    549   done
    550 
    551   cd ..
    552   rm -rf conftest.dir
    553 else
    554   am_cv_$1_dependencies_compiler_type=none
    555 fi
    556 ])
    557 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
    558 AM_CONDITIONAL([am__fastdep$1], [
    559   test "x$enable_dependency_tracking" != xno \
    560   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
    561 ])
    562 
    563 
    564 # AM_SET_DEPDIR
    565 # -------------
    566 # Choose a directory name for dependency files.
    567 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
    568 AC_DEFUN([AM_SET_DEPDIR],
    569 [rm -f .deps 2>/dev/null
    570 mkdir .deps 2>/dev/null
    571 if test -d .deps; then
    572   DEPDIR=.deps
    573 else
    574   # MS-DOS does not allow filenames that begin with a dot.
    575   DEPDIR=_deps
    576 fi
    577 rmdir .deps 2>/dev/null
    578 AC_SUBST([DEPDIR])
    579 ])
    580 
    581 
    582 # AM_DEP_TRACK
    583 # ------------
    584 AC_DEFUN([AM_DEP_TRACK],
    585 [AC_ARG_ENABLE(dependency-tracking,
    586 [  --disable-dependency-tracking Speeds up one-time builds
    587   --enable-dependency-tracking  Do not reject slow dependency extractors])
    588 if test "x$enable_dependency_tracking" != xno; then
    589   am_depcomp="$ac_aux_dir/depcomp"
    590   AMDEPBACKSLASH='\'
    591 fi
    592 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
    593 AC_SUBST([AMDEPBACKSLASH])
    594 ])
    595 
    596 # Generate code to set up dependency tracking.   -*- Autoconf -*-
    597 
    598 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    599 
    600 # This program is free software; you can redistribute it and/or modify
    601 # it under the terms of the GNU General Public License as published by
    602 # the Free Software Foundation; either version 2, or (at your option)
    603 # any later version.
    604 
    605 # This program is distributed in the hope that it will be useful,
    606 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    607 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    608 # GNU General Public License for more details.
    609 
    610 # You should have received a copy of the GNU General Public License
    611 # along with this program; if not, write to the Free Software
    612 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    613 # 02111-1307, USA.
    614 
    615 #serial 2
    616 
    617 # _AM_OUTPUT_DEPENDENCY_COMMANDS
    618 # ------------------------------
    619 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
    620 [for mf in $CONFIG_FILES; do
    621   # Strip MF so we end up with the name of the file.
    622   mf=`echo "$mf" | sed -e 's/:.*$//'`
    623   # Check whether this is an Automake generated Makefile or not.
    624   # We used to match only the files named `Makefile.in', but
    625   # some people rename them; so instead we look at the file content.
    626   # Grep'ing the first line is not enough: some people post-process
    627   # each Makefile.in and add a new line on top of each file to say so.
    628   # So let's grep whole file.
    629   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
    630     dirpart=`AS_DIRNAME("$mf")`
    631   else
    632     continue
    633   fi
    634   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
    635   # Extract the definition of DEP_FILES from the Makefile without
    636   # running `make'.
    637   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
    638   test -z "$DEPDIR" && continue
    639   # When using ansi2knr, U may be empty or an underscore; expand it
    640   U=`sed -n -e '/^U = / s///p' < "$mf"`
    641   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
    642   # We invoke sed twice because it is the simplest approach to
    643   # changing $(DEPDIR) to its actual value in the expansion.
    644   for file in `sed -n -e '
    645     /^DEP_FILES = .*\\\\$/ {
    646       s/^DEP_FILES = //
    647       :loop
    648         s/\\\\$//
    649         p
    650         n
    651         /\\\\$/ b loop
    652       p
    653     }
    654     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
    655        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
    656     # Make sure the directory exists.
    657     test -f "$dirpart/$file" && continue
    658     fdir=`AS_DIRNAME(["$file"])`
    659     AS_MKDIR_P([$dirpart/$fdir])
    660     # echo "creating $dirpart/$file"
    661     echo '# dummy' > "$dirpart/$file"
    662   done
    663 done
    664 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
    665 
    666 
    667 # AM_OUTPUT_DEPENDENCY_COMMANDS
    668 # -----------------------------
    669 # This macro should only be invoked once -- use via AC_REQUIRE.
    670 #
    671 # This code is only required when automatic dependency tracking
    672 # is enabled.  FIXME.  This creates each `.P' file that we will
    673 # need in order to bootstrap the dependency handling code.
    674 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
    675 [AC_CONFIG_COMMANDS([depfiles],
    676      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
    677      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
    678 ])
    679 
    680 # Check to see how 'make' treats includes.      -*- Autoconf -*-
    681 
    682 # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
    683 
    684 # This program is free software; you can redistribute it and/or modify
    685 # it under the terms of the GNU General Public License as published by
    686 # the Free Software Foundation; either version 2, or (at your option)
    687 # any later version.
    688 
    689 # This program is distributed in the hope that it will be useful,
    690 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    691 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    692 # GNU General Public License for more details.
    693 
    694 # You should have received a copy of the GNU General Public License
    695 # along with this program; if not, write to the Free Software
    696 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    697 # 02111-1307, USA.
    698 
    699 # serial 2
    700 
    701 # AM_MAKE_INCLUDE()
    702 # -----------------
    703 # Check to see how make treats includes.
    704 AC_DEFUN([AM_MAKE_INCLUDE],
    705 [am_make=${MAKE-make}
    706 cat > confinc << 'END'
    707 doit:
    708         @echo done
    709 END
    710 # If we don't find an include directive, just comment out the code.
    711 AC_MSG_CHECKING([for style of include used by $am_make])
    712 am__include="#"
    713 am__quote=
    714 _am_result=none
    715 # First try GNU make style include.
    716 echo "include confinc" > confmf
    717 # We grep out `Entering directory' and `Leaving directory'
    718 # messages which can occur if `w' ends up in MAKEFLAGS.
    719 # In particular we don't look at `^make:' because GNU make might
    720 # be invoked under some other name (usually "gmake"), in which
    721 # case it prints its new name instead of `make'.
    722 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
    723    am__include=include
    724    am__quote=
    725    _am_result=GNU
    726 fi
    727 # Now try BSD make style include.
    728 if test "$am__include" = "#"; then
    729    echo '.include "confinc"' > confmf
    730    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
    731       am__include=.include
    732       am__quote="\""
    733       _am_result=BSD
    734    fi
    735 fi
    736 AC_SUBST(am__include)
    737 AC_SUBST(am__quote)
    738 AC_MSG_RESULT($_am_result)
    739 rm -f confinc confmf
    740 ])
    741 
    742 # AM_CONDITIONAL                                              -*- Autoconf -*-
    743 
    744 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
    745 
    746 # This program is free software; you can redistribute it and/or modify
    747 # it under the terms of the GNU General Public License as published by
    748 # the Free Software Foundation; either version 2, or (at your option)
    749 # any later version.
    750 
    751 # This program is distributed in the hope that it will be useful,
    752 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    753 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    754 # GNU General Public License for more details.
    755 
    756 # You should have received a copy of the GNU General Public License
    757 # along with this program; if not, write to the Free Software
    758 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    759 # 02111-1307, USA.
    760 
    761 # serial 5
    762 
    763 AC_PREREQ(2.52)
    764 
    765 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
    766 # -------------------------------------
    767 # Define a conditional.
    768 AC_DEFUN([AM_CONDITIONAL],
    769 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
    770         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
    771 AC_SUBST([$1_TRUE])
    772 AC_SUBST([$1_FALSE])
    773 if $2; then
    774   $1_TRUE=
    775   $1_FALSE='#'
    776 else
    777   $1_TRUE='#'
    778   $1_FALSE=
    779 fi
    780 AC_CONFIG_COMMANDS_PRE(
    781 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
    782   AC_MSG_ERROR([conditional "$1" was never defined.
    783 Usually this means the macro was only invoked conditionally.])
    784 fi])])
    785 
  • orxonox/branches/buerli/config.h.in

    r2190 r2707  
    33/* Define to 1 if you have the `bzero' function. */
    44#undef HAVE_BZERO
    5 
    6 /* Define to 1 if you have the <GL/glut.h> header file. */
    7 #undef HAVE_GL_GLUT_H
    85
    96/* Define to 1 if you have the <GL/glu.h> header file. */
  • orxonox/branches/buerli/configure

    r2190 r2707  
    312312#endif"
    313313
    314 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MSBITFIELDS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS'
     314ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP MSBITFIELDS LIBOBJS LTLIBOBJS'
    315315ac_subst_files=''
    316316
     
    858858  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
    859859  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
    860   --disable-dependency-tracking Speeds up one-time builds
    861   --enable-dependency-tracking  Do not reject slow dependency extractors
     860  --disable-dependency-tracking  speeds up one-time build
     861  --enable-dependency-tracking   do not reject slow dependency extractors
    862862
    863863Some influential environment variables:
     
    13211321
    13221322
    1323 am__api_version="1.7"
     1323am__api_version="1.8"
    13241324ac_aux_dir=
    13251325for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
     
    14841484rm conftest.sed
    14851485
    1486 
    14871486# expand $ac_aux_dir to an absolute path
    14881487am_aux_dir=`cd $ac_aux_dir && pwd`
     
    14961495  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
    14971496echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
     1497fi
     1498
     1499if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
     1500  # Keeping the `.' argument allows $(mkdir_p) to be used without
     1501  # argument.  Indeed, we sometimes output rules like
     1502  #   $(mkdir_p) $(somedir)
     1503  # where $(somedir) is conditionally defined.
     1504  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
     1505  # expensive solution, as it forces Make to start a sub-shell.)
     1506  mkdir_p='mkdir -p -- .'
     1507else
     1508  # On NextStep and OpenStep, the `mkdir' command does not
     1509  # recognize any option.  It will interpret all options as
     1510  # directories to create, and then abort because `.' already
     1511  # exists.
     1512  for d in ./-p ./--version;
     1513  do
     1514    test -d $d && rmdir $d
     1515  done
     1516  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
     1517  if test -f "$ac_aux_dir/mkinstalldirs"; then
     1518    mkdir_p='$(mkinstalldirs)'
     1519  else
     1520    mkdir_p='$(install_sh) -d'
     1521  fi
    14981522fi
    14991523
     
    15761600rmdir .tst 2>/dev/null
    15771601
    1578  # test to see if srcdir already configured
     1602# test to see if srcdir already configured
    15791603if test "`cd $srcdir && pwd`" != "`pwd`" &&
    15801604   test -f $srcdir/config.status; then
     
    17231747
    17241748
     1749
    17251750          ac_config_headers="$ac_config_headers config.h"
    1726 
    1727 
    1728 echo "$as_me:$LINENO: checking for mingw" >&5
    1729 echo $ECHO_N "checking for mingw... $ECHO_C" >&6
    1730 case `uname` in
    1731   *MINGW*)
    1732     mingw="yes"
    1733     MSBITFIELDS="-mms-bitfields"
    1734     MWINDOWS="-mwindows"
    1735     ;;
    1736   *)
    1737     mingw="no"
    1738     ;;
    1739 esac
    1740 echo "$as_me:$LINENO: result: $mingw" >&5
    1741 echo "${ECHO_T}$mingw" >&6
    17421751
    17431752
     
    24062415    for i in 1 2 3 4 5 6; do
    24072416      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    2408       : > sub/conftst$i.h
     2417      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     2418      # Solaris 8's {/usr,}/bin/sh.
     2419      touch sub/conftst$i.h
    24092420    done
    24102421    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    24342445       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    24352446      # icc doesn't choke on unknown options, it will just issue warnings
    2436       # (even with -Werror).  So we grep stderr for any message
    2437       # that says an option was ignored.
    2438       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
     2447      # or remarks (even with -Werror).  So we grep stderr for any message
     2448      # that says an option was ignored or not supported.
     2449      # When given -MP, icc 7.0 and 7.1 complain thusly:
     2450      #   icc: Command line warning: ignoring option '-M'; no argument required
     2451      # The diagnosis changed in icc 8.0:
     2452      #   icc: Command line remark: option '-MP' not supported
     2453      if (grep 'ignoring option' conftest.err ||
     2454          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    24392455        am_cv_CXX_dependencies_compiler_type=$depmode
    24402456        break
     
    32373253    for i in 1 2 3 4 5 6; do
    32383254      echo '#include "conftst'$i'.h"' >> sub/conftest.c
    3239       : > sub/conftst$i.h
     3255      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
     3256      # Solaris 8's {/usr,}/bin/sh.
     3257      touch sub/conftst$i.h
    32403258    done
    32413259    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
     
    32653283       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
    32663284      # icc doesn't choke on unknown options, it will just issue warnings
    3267       # (even with -Werror).  So we grep stderr for any message
    3268       # that says an option was ignored.
    3269       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
     3285      # or remarks (even with -Werror).  So we grep stderr for any message
     3286      # that says an option was ignored or not supported.
     3287      # When given -MP, icc 7.0 and 7.1 complain thusly:
     3288      #   icc: Command line warning: ignoring option '-M'; no argument required
     3289      # The diagnosis changed in icc 8.0:
     3290      #   icc: Command line remark: option '-MP' not supported
     3291      if (grep 'ignoring option' conftest.err ||
     3292          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
    32703293        am_cv_CC_dependencies_compiler_type=$depmode
    32713294        break
     
    32993322
    33003323
    3301 # Checks for libraries.
    3302 
    3303 #  cheking for libGL
     3324
     3325# checking gl header (has to be here because of a Linux error)
    33043326
    33053327ac_ext=c
     
    39463968
    39473969
    3948 #   checking for Unix GL
    3949 echo "$as_me:$LINENO: checking for main in -lGL" >&5
    3950 echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
    3951 if test "${ac_cv_lib_GL_main+set}" = set; then
     3970
     3971
     3972### CHECKING FOR SYSTEM ###
     3973
     3974echo "$as_me:$LINENO: checking for System" >&5
     3975echo $ECHO_N "checking for System... $ECHO_C" >&6
     3976case `uname` in
     3977### WINDOWS ###
     3978  *MINGW*)
     3979echo "mingw-WINDOWS detected"
     3980
     3981    mingw="yes"
     3982    MSBITFIELDS="-mms-bitfields"
     3983    MWINDOWS="-mwindows"
     3984
     3985# checking gl header
     3986        #done before loop
     3987
     3988#   checking for Windows openGl library
     3989    echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
     3990echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
     3991if test "${ac_cv_lib_opengl32_main+set}" = set; then
    39523992  echo $ECHO_N "(cached) $ECHO_C" >&6
    39533993else
    39543994  ac_check_lib_save_LIBS=$LIBS
    3955 LIBS="-lGL  $LIBS"
     3995LIBS="-lopengl32  $LIBS"
    39563996cat >conftest.$ac_ext <<_ACEOF
    39573997/* confdefs.h.  */
     
    39924032  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    39934033  (exit $ac_status); }; }; then
    3994   ac_cv_lib_GL_main=yes
    3995 else
    3996   echo "$as_me: failed program was:" >&5
    3997 sed 's/^/| /' conftest.$ac_ext >&5
    3998 
    3999 ac_cv_lib_GL_main=no
    4000 fi
    4001 rm -f conftest.err conftest.$ac_objext \
    4002       conftest$ac_exeext conftest.$ac_ext
    4003 LIBS=$ac_check_lib_save_LIBS
    4004 fi
    4005 echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
    4006 echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
    4007 if test $ac_cv_lib_GL_main = yes; then
    4008   FOUND_GL=yes
    4009 fi
    4010 
    4011 if test "$FOUND_GL" = "yes" ; then
    4012     LIBS="$LIBS -lGL"
    4013     #   checking for Windows openGl library
    4014 else
    4015     echo "We did not find the Linux opengl Library. Checking for Windows Library"
    4016     echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
    4017 echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6
    4018 if test "${ac_cv_lib_opengl32_main+set}" = set; then
    4019   echo $ECHO_N "(cached) $ECHO_C" >&6
    4020 else
    4021   ac_check_lib_save_LIBS=$LIBS
    4022 LIBS="-lopengl32  $LIBS"
    4023 cat >conftest.$ac_ext <<_ACEOF
    4024 /* confdefs.h.  */
    4025 _ACEOF
    4026 cat confdefs.h >>conftest.$ac_ext
    4027 cat >>conftest.$ac_ext <<_ACEOF
    4028 /* end confdefs.h.  */
    4029 
    4030 
    4031 int
    4032 main ()
    4033 {
    4034 main ();
    4035   ;
    4036   return 0;
    4037 }
    4038 _ACEOF
    4039 rm -f conftest.$ac_objext conftest$ac_exeext
    4040 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4041   (eval $ac_link) 2>conftest.er1
    4042   ac_status=$?
    4043   grep -v '^ *+' conftest.er1 >conftest.err
    4044   rm -f conftest.er1
    4045   cat conftest.err >&5
    4046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4047   (exit $ac_status); } &&
    4048          { ac_try='test -z "$ac_c_werror_flag"
    4049                          || test ! -s conftest.err'
    4050   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4051   (eval $ac_try) 2>&5
    4052   ac_status=$?
    4053   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4054   (exit $ac_status); }; } &&
    4055          { ac_try='test -s conftest$ac_exeext'
    4056   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4057   (eval $ac_try) 2>&5
    4058   ac_status=$?
    4059   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4060   (exit $ac_status); }; }; then
    40614034  ac_cv_lib_opengl32_main=yes
    40624035else
     
    40804053    if test "$FOUND_opengl32" = "yes" ; then
    40814054        LIBS="$LIBS -lopengl32"
    4082 
    40834055    else
    40844056         echo "------------------"
     
    40884060         exit -1
    40894061    fi
    4090 fi
    4091 
    4092 #  cheking for libGLU
     4062
     4063# cheking for GLU-header
    40934064
    40944065for ac_header in GL/glu.h
     
    42464217
    42474218
    4248 echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
    4249 echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
    4250 if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
    4251   echo $ECHO_N "(cached) $ECHO_C" >&6
    4252 else
    4253   ac_check_lib_save_LIBS=$LIBS
    4254 LIBS="-lGLU  $LIBS"
    4255 cat >conftest.$ac_ext <<_ACEOF
    4256 /* confdefs.h.  */
    4257 _ACEOF
    4258 cat confdefs.h >>conftest.$ac_ext
    4259 cat >>conftest.$ac_ext <<_ACEOF
    4260 /* end confdefs.h.  */
    4261 
    4262 /* Override any gcc2 internal prototype to avoid an error.  */
    4263 #ifdef __cplusplus
    4264 extern "C"
    4265 #endif
    4266 /* We use char because int might match the return type of a gcc2
    4267    builtin and then its argument prototype would still apply.  */
    4268 char gluProject ();
    4269 int
    4270 main ()
    4271 {
    4272 gluProject ();
    4273   ;
    4274   return 0;
    4275 }
    4276 _ACEOF
    4277 rm -f conftest.$ac_objext conftest$ac_exeext
    4278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4279   (eval $ac_link) 2>conftest.er1
    4280   ac_status=$?
    4281   grep -v '^ *+' conftest.er1 >conftest.err
    4282   rm -f conftest.er1
    4283   cat conftest.err >&5
    4284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4285   (exit $ac_status); } &&
    4286          { ac_try='test -z "$ac_c_werror_flag"
    4287                          || test ! -s conftest.err'
    4288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4289   (eval $ac_try) 2>&5
    4290   ac_status=$?
    4291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4292   (exit $ac_status); }; } &&
    4293          { ac_try='test -s conftest$ac_exeext'
    4294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4295   (eval $ac_try) 2>&5
    4296   ac_status=$?
    4297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4298   (exit $ac_status); }; }; then
    4299   ac_cv_lib_GLU_gluProject=yes
    4300 else
    4301   echo "$as_me: failed program was:" >&5
    4302 sed 's/^/| /' conftest.$ac_ext >&5
    4303 
    4304 ac_cv_lib_GLU_gluProject=no
    4305 fi
    4306 rm -f conftest.err conftest.$ac_objext \
    4307       conftest$ac_exeext conftest.$ac_ext
    4308 LIBS=$ac_check_lib_save_LIBS
    4309 fi
    4310 echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
    4311 echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
    4312 if test $ac_cv_lib_GLU_gluProject = yes; then
    4313   FOUND_GLU=yes
    4314 fi
    4315 
    4316 if test "$FOUND_GLU" = "yes" ; then
    4317     LIBS="$LIBS -lGLU"
    4318     #   checking for Windows GLU32 library
    4319 else
    4320     echo "We did not find the Linux GLU Library. Checking for Windows Library"
     4219# checking for libGLU
    43214220    echo "$as_me:$LINENO: checking for main in -lglu32" >&5
    43224221echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6
     
    43834282    if test "$FOUND_glu32" = "yes" ; then
    43844283        LIBS="$LIBS -lGLU32"
    4385 
    4386         else
     4284    else
    43874285         echo "------------------"
    43884286         echo "GLU library not found."
     
    43914289         exit -1
    43924290    fi
    4393 fi
    4394 
    4395 # FIXME: Replace `main' with a function in `-lOSMesa':
    4396 
    4397 echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
    4398 echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
    4399 if test "${ac_cv_lib_OSMesa_main+set}" = set; then
     4291
     4292
     4293# checking for mingw32
     4294    echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
     4295echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
     4296if test "${ac_cv_lib_mingw32_main+set}" = set; then
    44004297  echo $ECHO_N "(cached) $ECHO_C" >&6
    44014298else
    44024299  ac_check_lib_save_LIBS=$LIBS
    4403 LIBS="-lOSMesa  $LIBS"
     4300LIBS="-lmingw32  $LIBS"
    44044301cat >conftest.$ac_ext <<_ACEOF
    44054302/* confdefs.h.  */
     
    44404337  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    44414338  (exit $ac_status); }; }; then
    4442   ac_cv_lib_OSMesa_main=yes
     4339  ac_cv_lib_mingw32_main=yes
    44434340else
    44444341  echo "$as_me: failed program was:" >&5
    44454342sed 's/^/| /' conftest.$ac_ext >&5
    44464343
    4447 ac_cv_lib_OSMesa_main=no
     4344ac_cv_lib_mingw32_main=no
    44484345fi
    44494346rm -f conftest.err conftest.$ac_objext \
     
    44514348LIBS=$ac_check_lib_save_LIBS
    44524349fi
    4453 echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
    4454 echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
    4455 if test $ac_cv_lib_OSMesa_main = yes; then
    4456   cat >>confdefs.h <<_ACEOF
    4457 #define HAVE_LIBOSMESA 1
    4458 _ACEOF
    4459 
    4460   LIBS="-lOSMesa $LIBS"
    4461 
    4462 fi
    4463 
    4464 # FIXME: Replace `main' with a function in `-lX11':
    4465 
    4466 echo "$as_me:$LINENO: checking for main in -lX11" >&5
    4467 echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
    4468 if test "${ac_cv_lib_X11_main+set}" = set; then
    4469   echo $ECHO_N "(cached) $ECHO_C" >&6
    4470 else
    4471   ac_check_lib_save_LIBS=$LIBS
    4472 LIBS="-lX11  $LIBS"
    4473 cat >conftest.$ac_ext <<_ACEOF
    4474 /* confdefs.h.  */
    4475 _ACEOF
    4476 cat confdefs.h >>conftest.$ac_ext
    4477 cat >>conftest.$ac_ext <<_ACEOF
    4478 /* end confdefs.h.  */
    4479 
    4480 
    4481 int
    4482 main ()
    4483 {
    4484 main ();
    4485   ;
    4486   return 0;
    4487 }
    4488 _ACEOF
    4489 rm -f conftest.$ac_objext conftest$ac_exeext
    4490 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4491   (eval $ac_link) 2>conftest.er1
    4492   ac_status=$?
    4493   grep -v '^ *+' conftest.er1 >conftest.err
    4494   rm -f conftest.er1
    4495   cat conftest.err >&5
    4496   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4497   (exit $ac_status); } &&
    4498          { ac_try='test -z "$ac_c_werror_flag"
    4499                          || test ! -s conftest.err'
    4500   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4501   (eval $ac_try) 2>&5
    4502   ac_status=$?
    4503   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4504   (exit $ac_status); }; } &&
    4505          { ac_try='test -s conftest$ac_exeext'
    4506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4507   (eval $ac_try) 2>&5
    4508   ac_status=$?
    4509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4510   (exit $ac_status); }; }; then
    4511   ac_cv_lib_X11_main=yes
    4512 else
    4513   echo "$as_me: failed program was:" >&5
    4514 sed 's/^/| /' conftest.$ac_ext >&5
    4515 
    4516 ac_cv_lib_X11_main=no
    4517 fi
    4518 rm -f conftest.err conftest.$ac_objext \
    4519       conftest$ac_exeext conftest.$ac_ext
    4520 LIBS=$ac_check_lib_save_LIBS
    4521 fi
    4522 echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
    4523 echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
    4524 if test $ac_cv_lib_X11_main = yes; then
    4525   cat >>confdefs.h <<_ACEOF
    4526 #define HAVE_LIBX11 1
    4527 _ACEOF
    4528 
    4529   LIBS="-lX11 $LIBS"
    4530 
    4531 fi
    4532 
    4533 # FIXME: Replace `main' with a function in `-lXt':
    4534 
    4535 echo "$as_me:$LINENO: checking for main in -lXt" >&5
    4536 echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
    4537 if test "${ac_cv_lib_Xt_main+set}" = set; then
    4538   echo $ECHO_N "(cached) $ECHO_C" >&6
    4539 else
    4540   ac_check_lib_save_LIBS=$LIBS
    4541 LIBS="-lXt  $LIBS"
    4542 cat >conftest.$ac_ext <<_ACEOF
    4543 /* confdefs.h.  */
    4544 _ACEOF
    4545 cat confdefs.h >>conftest.$ac_ext
    4546 cat >>conftest.$ac_ext <<_ACEOF
    4547 /* end confdefs.h.  */
    4548 
    4549 
    4550 int
    4551 main ()
    4552 {
    4553 main ();
    4554   ;
    4555   return 0;
    4556 }
    4557 _ACEOF
    4558 rm -f conftest.$ac_objext conftest$ac_exeext
    4559 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4560   (eval $ac_link) 2>conftest.er1
    4561   ac_status=$?
    4562   grep -v '^ *+' conftest.er1 >conftest.err
    4563   rm -f conftest.er1
    4564   cat conftest.err >&5
    4565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4566   (exit $ac_status); } &&
    4567          { ac_try='test -z "$ac_c_werror_flag"
    4568                          || test ! -s conftest.err'
    4569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4570   (eval $ac_try) 2>&5
    4571   ac_status=$?
    4572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4573   (exit $ac_status); }; } &&
    4574          { ac_try='test -s conftest$ac_exeext'
    4575   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4576   (eval $ac_try) 2>&5
    4577   ac_status=$?
    4578   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4579   (exit $ac_status); }; }; then
    4580   ac_cv_lib_Xt_main=yes
    4581 else
    4582   echo "$as_me: failed program was:" >&5
    4583 sed 's/^/| /' conftest.$ac_ext >&5
    4584 
    4585 ac_cv_lib_Xt_main=no
    4586 fi
    4587 rm -f conftest.err conftest.$ac_objext \
    4588       conftest$ac_exeext conftest.$ac_ext
    4589 LIBS=$ac_check_lib_save_LIBS
    4590 fi
    4591 echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
    4592 echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
    4593 if test $ac_cv_lib_Xt_main = yes; then
    4594   cat >>confdefs.h <<_ACEOF
    4595 #define HAVE_LIBXT 1
    4596 _ACEOF
    4597 
    4598   LIBS="-lXt $LIBS"
    4599 
    4600 fi
    4601 
    4602 
    4603 #  cheking for libglut32
    4604 
    4605 for ac_header in GL/glut.h
     4350echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
     4351echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
     4352if test $ac_cv_lib_mingw32_main = yes; then
     4353  FOUND_mingw32=yes
     4354fi
     4355
     4356    if test $FOUND_mingw32 = "yes"; then
     4357        LIBS="$LIBS -lmingw32"
     4358    fi
     4359# checking for SDL-headers
     4360
     4361for ac_header in SDL/SDL.h
    46064362do
    46074363as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    47494505
    47504506else
    4751   { { echo "$as_me:$LINENO: error: cannot find glut headers" >&5
    4752 echo "$as_me: error: cannot find glut headers" >&2;}
     4507  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
     4508echo "$as_me: error: cannot find SDL headers" >&2;}
    47534509   { (exit 1); exit 1; }; }
    47544510fi
     
    47564512done
    47574513
    4758 echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
    4759 echo $ECHO_N "checking for glutInit in -lglut... $ECHO_C" >&6
    4760 if test "${ac_cv_lib_glut_glutInit+set}" = set; then
     4514
     4515#checking for libSDL
     4516    echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
     4517echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
     4518if test "${ac_cv_lib_sdlmain_main+set}" = set; then
    47614519  echo $ECHO_N "(cached) $ECHO_C" >&6
    47624520else
    47634521  ac_check_lib_save_LIBS=$LIBS
    4764 LIBS="-lglut  $LIBS"
    4765 cat >conftest.$ac_ext <<_ACEOF
    4766 /* confdefs.h.  */
    4767 _ACEOF
    4768 cat confdefs.h >>conftest.$ac_ext
    4769 cat >>conftest.$ac_ext <<_ACEOF
    4770 /* end confdefs.h.  */
    4771 
    4772 /* Override any gcc2 internal prototype to avoid an error.  */
    4773 #ifdef __cplusplus
    4774 extern "C"
    4775 #endif
    4776 /* We use char because int might match the return type of a gcc2
    4777    builtin and then its argument prototype would still apply.  */
    4778 char glutInit ();
    4779 int
    4780 main ()
    4781 {
    4782 glutInit ();
    4783   ;
    4784   return 0;
    4785 }
    4786 _ACEOF
    4787 rm -f conftest.$ac_objext conftest$ac_exeext
    4788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
    4789   (eval $ac_link) 2>conftest.er1
    4790   ac_status=$?
    4791   grep -v '^ *+' conftest.er1 >conftest.err
    4792   rm -f conftest.er1
    4793   cat conftest.err >&5
    4794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4795   (exit $ac_status); } &&
    4796          { ac_try='test -z "$ac_c_werror_flag"
    4797                          || test ! -s conftest.err'
    4798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4799   (eval $ac_try) 2>&5
    4800   ac_status=$?
    4801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4802   (exit $ac_status); }; } &&
    4803          { ac_try='test -s conftest$ac_exeext'
    4804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    4805   (eval $ac_try) 2>&5
    4806   ac_status=$?
    4807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    4808   (exit $ac_status); }; }; then
    4809   ac_cv_lib_glut_glutInit=yes
    4810 else
    4811   echo "$as_me: failed program was:" >&5
    4812 sed 's/^/| /' conftest.$ac_ext >&5
    4813 
    4814 ac_cv_lib_glut_glutInit=no
    4815 fi
    4816 rm -f conftest.err conftest.$ac_objext \
    4817       conftest$ac_exeext conftest.$ac_ext
    4818 LIBS=$ac_check_lib_save_LIBS
    4819 fi
    4820 echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5
    4821 echo "${ECHO_T}$ac_cv_lib_glut_glutInit" >&6
    4822 if test $ac_cv_lib_glut_glutInit = yes; then
    4823   FOUND_glut=yes
    4824 fi
    4825 
    4826 if test "$FOUND_glut" = "yes" ; then
    4827     LIBS="$LIBS -lglut"
    4828     #   checking for Windows glut32 library
    4829 else
    4830     echo "We did not find the Linux glut Library. Checking for Windows Library"
    4831     echo "$as_me:$LINENO: checking for main in -lglut32" >&5
    4832 echo $ECHO_N "checking for main in -lglut32... $ECHO_C" >&6
    4833 if test "${ac_cv_lib_glut32_main+set}" = set; then
    4834   echo $ECHO_N "(cached) $ECHO_C" >&6
    4835 else
    4836   ac_check_lib_save_LIBS=$LIBS
    4837 LIBS="-lglut32  $LIBS"
     4522LIBS="-lsdlmain  $LIBS"
    48384523cat >conftest.$ac_ext <<_ACEOF
    48394524/* confdefs.h.  */
     
    48744559  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    48754560  (exit $ac_status); }; }; then
    4876   ac_cv_lib_glut32_main=yes
     4561  ac_cv_lib_sdlmain_main=yes
    48774562else
    48784563  echo "$as_me: failed program was:" >&5
    48794564sed 's/^/| /' conftest.$ac_ext >&5
    48804565
    4881 ac_cv_lib_glut32_main=no
     4566ac_cv_lib_sdlmain_main=no
    48824567fi
    48834568rm -f conftest.err conftest.$ac_objext \
     
    48854570LIBS=$ac_check_lib_save_LIBS
    48864571fi
    4887 echo "$as_me:$LINENO: result: $ac_cv_lib_glut32_main" >&5
    4888 echo "${ECHO_T}$ac_cv_lib_glut32_main" >&6
    4889 if test $ac_cv_lib_glut32_main = yes; then
    4890   FOUND_glut32=yes
    4891 fi
    4892 
    4893     if test "$FOUND_glut32" = "yes" ; then
    4894         LIBS="$LIBS -lglut32"
     4572echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
     4573echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
     4574if test $ac_cv_lib_sdlmain_main = yes; then
     4575  FOUND_sdlmain=yes
     4576fi
     4577
     4578    if test "$FOUND_sdlmain" = "yes" ; then
     4579        LIBS="$LIBS -lsdlmain"
    48954580    else
    48964581         echo "------------------"
    4897          echo "glut library not found."
    4898          echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
     4582         echo "SDL library not found."
     4583         echo "please install the SDL library, which can be found at http://www.libsdl.org"
    48994584         echo "------------------"
    4900          exit -1
     4585         exit 1
    49014586    fi
    4902 fi
    4903 
    4904 ## mingw CHECK
    4905 if test $mingw = yes ; then
    4906         echo "$as_me:$LINENO: checking for main in -lmingw32" >&5
    4907 echo $ECHO_N "checking for main in -lmingw32... $ECHO_C" >&6
    4908 if test "${ac_cv_lib_mingw32_main+set}" = set; then
     4587    echo "$as_me:$LINENO: checking for main in -lsdl" >&5
     4588echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
     4589if test "${ac_cv_lib_sdl_main+set}" = set; then
    49094590  echo $ECHO_N "(cached) $ECHO_C" >&6
    49104591else
    49114592  ac_check_lib_save_LIBS=$LIBS
    4912 LIBS="-lmingw32  $LIBS"
     4593LIBS="-lsdl  $LIBS"
    49134594cat >conftest.$ac_ext <<_ACEOF
    49144595/* confdefs.h.  */
     
    49494630  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    49504631  (exit $ac_status); }; }; then
    4951   ac_cv_lib_mingw32_main=yes
     4632  ac_cv_lib_sdl_main=yes
    49524633else
    49534634  echo "$as_me: failed program was:" >&5
    49544635sed 's/^/| /' conftest.$ac_ext >&5
    49554636
    4956 ac_cv_lib_mingw32_main=no
     4637ac_cv_lib_sdl_main=no
    49574638fi
    49584639rm -f conftest.err conftest.$ac_objext \
     
    49604641LIBS=$ac_check_lib_save_LIBS
    49614642fi
    4962 echo "$as_me:$LINENO: result: $ac_cv_lib_mingw32_main" >&5
    4963 echo "${ECHO_T}$ac_cv_lib_mingw32_main" >&6
    4964 if test $ac_cv_lib_mingw32_main = yes; then
    4965   FOUND_mingw32=yes
    4966 fi
    4967 
    4968         if test $FOUND_mingw32 = "yes"; then
    4969                 LIBS="$LIBS -lmingw32"
    4970         fi
    4971 fi
    4972 
    4973 ## SDL CHECK
    4974 
    4975 #checking for SDL libs
    4976 
    4977 for ac_header in SDL/SDL.h
     4643echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
     4644echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
     4645if test $ac_cv_lib_sdl_main = yes; then
     4646  FOUND_sdl=yes
     4647fi
     4648
     4649    if test "$FOUND_sdl" = "yes" ; then
     4650        LIBS="$LIBS -lsdl"
     4651    else
     4652         echo "------------------"
     4653         echo "SDL library not found."
     4654         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     4655         echo "------------------"
     4656         exit -1
     4657    fi
     4658
     4659    ;;
     4660
     4661### LINUX ###
     4662 *Linux*)
     4663echo "Linux detected"
     4664
     4665 Linux="yes"
     4666
     4667# checking gl header
     4668        #has been done befor linux-check
     4669
     4670#  checking for Unix GL
     4671   echo "$as_me:$LINENO: checking for main in -lGL" >&5
     4672echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6
     4673if test "${ac_cv_lib_GL_main+set}" = set; then
     4674  echo $ECHO_N "(cached) $ECHO_C" >&6
     4675else
     4676  ac_check_lib_save_LIBS=$LIBS
     4677LIBS="-lGL  $LIBS"
     4678cat >conftest.$ac_ext <<_ACEOF
     4679/* confdefs.h.  */
     4680_ACEOF
     4681cat confdefs.h >>conftest.$ac_ext
     4682cat >>conftest.$ac_ext <<_ACEOF
     4683/* end confdefs.h.  */
     4684
     4685
     4686int
     4687main ()
     4688{
     4689main ();
     4690  ;
     4691  return 0;
     4692}
     4693_ACEOF
     4694rm -f conftest.$ac_objext conftest$ac_exeext
     4695if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4696  (eval $ac_link) 2>conftest.er1
     4697  ac_status=$?
     4698  grep -v '^ *+' conftest.er1 >conftest.err
     4699  rm -f conftest.er1
     4700  cat conftest.err >&5
     4701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4702  (exit $ac_status); } &&
     4703         { ac_try='test -z "$ac_c_werror_flag"
     4704                         || test ! -s conftest.err'
     4705  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4706  (eval $ac_try) 2>&5
     4707  ac_status=$?
     4708  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4709  (exit $ac_status); }; } &&
     4710         { ac_try='test -s conftest$ac_exeext'
     4711  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4712  (eval $ac_try) 2>&5
     4713  ac_status=$?
     4714  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4715  (exit $ac_status); }; }; then
     4716  ac_cv_lib_GL_main=yes
     4717else
     4718  echo "$as_me: failed program was:" >&5
     4719sed 's/^/| /' conftest.$ac_ext >&5
     4720
     4721ac_cv_lib_GL_main=no
     4722fi
     4723rm -f conftest.err conftest.$ac_objext \
     4724      conftest$ac_exeext conftest.$ac_ext
     4725LIBS=$ac_check_lib_save_LIBS
     4726fi
     4727echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
     4728echo "${ECHO_T}$ac_cv_lib_GL_main" >&6
     4729if test $ac_cv_lib_GL_main = yes; then
     4730  FOUND_GL=yes
     4731fi
     4732
     4733   if test "$FOUND_GL" = "yes" ; then
     4734     LIBS="$LIBS -lGL"
     4735   else
     4736         echo "------------------"
     4737         echo "opengl not found."
     4738         echo "please install the opengl package which can be found at http://www.opengl.org"
     4739         echo "------------------"
     4740         exit -1
     4741   fi
     4742
     4743# cheking for GLU-header
     4744
     4745for ac_header in GL/glu.h
    49784746do
    49794747as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     
    51214889
    51224890else
     4891  { { echo "$as_me:$LINENO: error: cannot find opengl headers" >&5
     4892echo "$as_me: error: cannot find opengl headers" >&2;}
     4893   { (exit 1); exit 1; }; }
     4894fi
     4895
     4896done
     4897
     4898
     4899    echo "$as_me:$LINENO: checking for gluProject in -lGLU" >&5
     4900echo $ECHO_N "checking for gluProject in -lGLU... $ECHO_C" >&6
     4901if test "${ac_cv_lib_GLU_gluProject+set}" = set; then
     4902  echo $ECHO_N "(cached) $ECHO_C" >&6
     4903else
     4904  ac_check_lib_save_LIBS=$LIBS
     4905LIBS="-lGLU  $LIBS"
     4906cat >conftest.$ac_ext <<_ACEOF
     4907/* confdefs.h.  */
     4908_ACEOF
     4909cat confdefs.h >>conftest.$ac_ext
     4910cat >>conftest.$ac_ext <<_ACEOF
     4911/* end confdefs.h.  */
     4912
     4913/* Override any gcc2 internal prototype to avoid an error.  */
     4914#ifdef __cplusplus
     4915extern "C"
     4916#endif
     4917/* We use char because int might match the return type of a gcc2
     4918   builtin and then its argument prototype would still apply.  */
     4919char gluProject ();
     4920int
     4921main ()
     4922{
     4923gluProject ();
     4924  ;
     4925  return 0;
     4926}
     4927_ACEOF
     4928rm -f conftest.$ac_objext conftest$ac_exeext
     4929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     4930  (eval $ac_link) 2>conftest.er1
     4931  ac_status=$?
     4932  grep -v '^ *+' conftest.er1 >conftest.err
     4933  rm -f conftest.er1
     4934  cat conftest.err >&5
     4935  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4936  (exit $ac_status); } &&
     4937         { ac_try='test -z "$ac_c_werror_flag"
     4938                         || test ! -s conftest.err'
     4939  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4940  (eval $ac_try) 2>&5
     4941  ac_status=$?
     4942  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4943  (exit $ac_status); }; } &&
     4944         { ac_try='test -s conftest$ac_exeext'
     4945  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     4946  (eval $ac_try) 2>&5
     4947  ac_status=$?
     4948  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     4949  (exit $ac_status); }; }; then
     4950  ac_cv_lib_GLU_gluProject=yes
     4951else
     4952  echo "$as_me: failed program was:" >&5
     4953sed 's/^/| /' conftest.$ac_ext >&5
     4954
     4955ac_cv_lib_GLU_gluProject=no
     4956fi
     4957rm -f conftest.err conftest.$ac_objext \
     4958      conftest$ac_exeext conftest.$ac_ext
     4959LIBS=$ac_check_lib_save_LIBS
     4960fi
     4961echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluProject" >&5
     4962echo "${ECHO_T}$ac_cv_lib_GLU_gluProject" >&6
     4963if test $ac_cv_lib_GLU_gluProject = yes; then
     4964  FOUND_GLU=yes
     4965fi
     4966
     4967    if test "$FOUND_GLU" = "yes" ; then
     4968      LIBS="$LIBS -lGLU"
     4969    else
     4970         echo "------------------"
     4971         echo "GLU library not found."
     4972         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     4973         echo "------------------"
     4974         exit -1
     4975    fi
     4976
     4977# checking for SDL-headers
     4978
     4979for ac_header in SDL/SDL.h
     4980do
     4981as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
     4982if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4983  echo "$as_me:$LINENO: checking for $ac_header" >&5
     4984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     4985if eval "test \"\${$as_ac_Header+set}\" = set"; then
     4986  echo $ECHO_N "(cached) $ECHO_C" >&6
     4987fi
     4988echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     4989echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     4990else
     4991  # Is the header compilable?
     4992echo "$as_me:$LINENO: checking $ac_header usability" >&5
     4993echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
     4994cat >conftest.$ac_ext <<_ACEOF
     4995/* confdefs.h.  */
     4996_ACEOF
     4997cat confdefs.h >>conftest.$ac_ext
     4998cat >>conftest.$ac_ext <<_ACEOF
     4999/* end confdefs.h.  */
     5000$ac_includes_default
     5001#include <$ac_header>
     5002_ACEOF
     5003rm -f conftest.$ac_objext
     5004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     5005  (eval $ac_compile) 2>conftest.er1
     5006  ac_status=$?
     5007  grep -v '^ *+' conftest.er1 >conftest.err
     5008  rm -f conftest.er1
     5009  cat conftest.err >&5
     5010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5011  (exit $ac_status); } &&
     5012         { ac_try='test -z "$ac_c_werror_flag"
     5013                         || test ! -s conftest.err'
     5014  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5015  (eval $ac_try) 2>&5
     5016  ac_status=$?
     5017  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5018  (exit $ac_status); }; } &&
     5019         { ac_try='test -s conftest.$ac_objext'
     5020  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5021  (eval $ac_try) 2>&5
     5022  ac_status=$?
     5023  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5024  (exit $ac_status); }; }; then
     5025  ac_header_compiler=yes
     5026else
     5027  echo "$as_me: failed program was:" >&5
     5028sed 's/^/| /' conftest.$ac_ext >&5
     5029
     5030ac_header_compiler=no
     5031fi
     5032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     5033echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
     5034echo "${ECHO_T}$ac_header_compiler" >&6
     5035
     5036# Is the header present?
     5037echo "$as_me:$LINENO: checking $ac_header presence" >&5
     5038echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
     5039cat >conftest.$ac_ext <<_ACEOF
     5040/* confdefs.h.  */
     5041_ACEOF
     5042cat confdefs.h >>conftest.$ac_ext
     5043cat >>conftest.$ac_ext <<_ACEOF
     5044/* end confdefs.h.  */
     5045#include <$ac_header>
     5046_ACEOF
     5047if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
     5048  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
     5049  ac_status=$?
     5050  grep -v '^ *+' conftest.er1 >conftest.err
     5051  rm -f conftest.er1
     5052  cat conftest.err >&5
     5053  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5054  (exit $ac_status); } >/dev/null; then
     5055  if test -s conftest.err; then
     5056    ac_cpp_err=$ac_c_preproc_warn_flag
     5057    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
     5058  else
     5059    ac_cpp_err=
     5060  fi
     5061else
     5062  ac_cpp_err=yes
     5063fi
     5064if test -z "$ac_cpp_err"; then
     5065  ac_header_preproc=yes
     5066else
     5067  echo "$as_me: failed program was:" >&5
     5068sed 's/^/| /' conftest.$ac_ext >&5
     5069
     5070  ac_header_preproc=no
     5071fi
     5072rm -f conftest.err conftest.$ac_ext
     5073echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
     5074echo "${ECHO_T}$ac_header_preproc" >&6
     5075
     5076# So?  What about this header?
     5077case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
     5078  yes:no: )
     5079    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
     5080echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
     5081    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
     5082echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     5083    ac_header_preproc=yes
     5084    ;;
     5085  no:yes:* )
     5086    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
     5087echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
     5088    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
     5089echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
     5090    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
     5091echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
     5092    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
     5093echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
     5094    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
     5095echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
     5096    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
     5097echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     5098    (
     5099      cat <<\_ASBOX
     5100## ------------------------------------------- ##
     5101## Report this to orxonox-dev@mail.datacore.ch ##
     5102## ------------------------------------------- ##
     5103_ASBOX
     5104    ) |
     5105      sed "s/^/$as_me: WARNING:     /" >&2
     5106    ;;
     5107esac
     5108echo "$as_me:$LINENO: checking for $ac_header" >&5
     5109echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     5110if eval "test \"\${$as_ac_Header+set}\" = set"; then
     5111  echo $ECHO_N "(cached) $ECHO_C" >&6
     5112else
     5113  eval "$as_ac_Header=\$ac_header_preproc"
     5114fi
     5115echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
     5116echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     5117
     5118fi
     5119if test `eval echo '${'$as_ac_Header'}'` = yes; then
     5120  cat >>confdefs.h <<_ACEOF
     5121#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
     5122_ACEOF
     5123
     5124else
    51235125  { { echo "$as_me:$LINENO: error: cannot find SDL headers" >&5
    51245126echo "$as_me: error: cannot find SDL headers" >&2;}
     
    51285130done
    51295131
    5130 if test $mingw = no ; then
    5131         echo "$as_me:$LINENO: checking for main in -lSDL" >&5
     5132
     5133    echo "$as_me:$LINENO: checking for main in -lSDL" >&5
    51325134echo $ECHO_N "checking for main in -lSDL... $ECHO_C" >&6
    51335135if test "${ac_cv_lib_SDL_main+set}" = set; then
     
    51915193fi
    51925194
    5193         if test "$FOUND_SDL" = "yes" ; then
    5194                 LIBS="$LIBS -lSDL"
    5195         fi
    5196 #   checking for Windows sdl library
    5197 else
    5198     echo "$as_me:$LINENO: checking for main in -lsdlmain" >&5
    5199 echo $ECHO_N "checking for main in -lsdlmain... $ECHO_C" >&6
    5200 if test "${ac_cv_lib_sdlmain_main+set}" = set; then
     5195     if test "$FOUND_SDL" = "yes" ; then
     5196        LIBS="$LIBS -lSDL"
     5197     else
     5198         echo "------------------"
     5199         echo "SDL library not found."
     5200         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     5201         echo "------------------"
     5202         exit -1
     5203     fi
     5204
     5205    ;;
     5206  *)
     5207    mingw="no"
     5208    ;;
     5209esac
     5210echo "$as_me:$LINENO: result: $mingw" >&5
     5211echo "${ECHO_T}$mingw" >&6
     5212
     5213
     5214#### Checking for LIBraries.
     5215
     5216# FIXME: Replace `main' with a function in `-lOSMesa':
     5217
     5218echo "$as_me:$LINENO: checking for main in -lOSMesa" >&5
     5219echo $ECHO_N "checking for main in -lOSMesa... $ECHO_C" >&6
     5220if test "${ac_cv_lib_OSMesa_main+set}" = set; then
    52015221  echo $ECHO_N "(cached) $ECHO_C" >&6
    52025222else
    52035223  ac_check_lib_save_LIBS=$LIBS
    5204 LIBS="-lsdlmain  $LIBS"
     5224LIBS="-lOSMesa  $LIBS"
    52055225cat >conftest.$ac_ext <<_ACEOF
    52065226/* confdefs.h.  */
     
    52415261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    52425262  (exit $ac_status); }; }; then
    5243   ac_cv_lib_sdlmain_main=yes
     5263  ac_cv_lib_OSMesa_main=yes
    52445264else
    52455265  echo "$as_me: failed program was:" >&5
    52465266sed 's/^/| /' conftest.$ac_ext >&5
    52475267
    5248 ac_cv_lib_sdlmain_main=no
     5268ac_cv_lib_OSMesa_main=no
    52495269fi
    52505270rm -f conftest.err conftest.$ac_objext \
     
    52525272LIBS=$ac_check_lib_save_LIBS
    52535273fi
    5254 echo "$as_me:$LINENO: result: $ac_cv_lib_sdlmain_main" >&5
    5255 echo "${ECHO_T}$ac_cv_lib_sdlmain_main" >&6
    5256 if test $ac_cv_lib_sdlmain_main = yes; then
    5257   FOUND_sdlmain=yes
    5258 fi
    5259 
    5260     if test "$FOUND_sdlmain" = "yes" ; then
    5261         LIBS="$LIBS -lsdlmain"
    5262     fi
    5263         echo "$as_me:$LINENO: checking for main in -lsdl" >&5
    5264 echo $ECHO_N "checking for main in -lsdl... $ECHO_C" >&6
    5265 if test "${ac_cv_lib_sdl_main+set}" = set; then
     5274echo "$as_me:$LINENO: result: $ac_cv_lib_OSMesa_main" >&5
     5275echo "${ECHO_T}$ac_cv_lib_OSMesa_main" >&6
     5276if test $ac_cv_lib_OSMesa_main = yes; then
     5277  cat >>confdefs.h <<_ACEOF
     5278#define HAVE_LIBOSMESA 1
     5279_ACEOF
     5280
     5281  LIBS="-lOSMesa $LIBS"
     5282
     5283fi
     5284
     5285# FIXME: Replace `main' with a function in `-lX11':
     5286
     5287echo "$as_me:$LINENO: checking for main in -lX11" >&5
     5288echo $ECHO_N "checking for main in -lX11... $ECHO_C" >&6
     5289if test "${ac_cv_lib_X11_main+set}" = set; then
    52665290  echo $ECHO_N "(cached) $ECHO_C" >&6
    52675291else
    52685292  ac_check_lib_save_LIBS=$LIBS
    5269 LIBS="-lsdl  $LIBS"
     5293LIBS="-lX11  $LIBS"
    52705294cat >conftest.$ac_ext <<_ACEOF
    52715295/* confdefs.h.  */
     
    53065330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    53075331  (exit $ac_status); }; }; then
    5308   ac_cv_lib_sdl_main=yes
     5332  ac_cv_lib_X11_main=yes
    53095333else
    53105334  echo "$as_me: failed program was:" >&5
    53115335sed 's/^/| /' conftest.$ac_ext >&5
    53125336
    5313 ac_cv_lib_sdl_main=no
     5337ac_cv_lib_X11_main=no
    53145338fi
    53155339rm -f conftest.err conftest.$ac_objext \
     
    53175341LIBS=$ac_check_lib_save_LIBS
    53185342fi
    5319 echo "$as_me:$LINENO: result: $ac_cv_lib_sdl_main" >&5
    5320 echo "${ECHO_T}$ac_cv_lib_sdl_main" >&6
    5321 if test $ac_cv_lib_sdl_main = yes; then
    5322   FOUND_sdl=yes
    5323 fi
    5324 
    5325         if test "$FOUND_sdl" = "yes" ; then
    5326                 LIBS="$LIBS -lsdl"
    5327         fi
    5328 fi
     5343echo "$as_me:$LINENO: result: $ac_cv_lib_X11_main" >&5
     5344echo "${ECHO_T}$ac_cv_lib_X11_main" >&6
     5345if test $ac_cv_lib_X11_main = yes; then
     5346  cat >>confdefs.h <<_ACEOF
     5347#define HAVE_LIBX11 1
     5348_ACEOF
     5349
     5350  LIBS="-lX11 $LIBS"
     5351
     5352fi
     5353
     5354# FIXME: Replace `main' with a function in `-lXt':
     5355
     5356echo "$as_me:$LINENO: checking for main in -lXt" >&5
     5357echo $ECHO_N "checking for main in -lXt... $ECHO_C" >&6
     5358if test "${ac_cv_lib_Xt_main+set}" = set; then
     5359  echo $ECHO_N "(cached) $ECHO_C" >&6
     5360else
     5361  ac_check_lib_save_LIBS=$LIBS
     5362LIBS="-lXt  $LIBS"
     5363cat >conftest.$ac_ext <<_ACEOF
     5364/* confdefs.h.  */
     5365_ACEOF
     5366cat confdefs.h >>conftest.$ac_ext
     5367cat >>conftest.$ac_ext <<_ACEOF
     5368/* end confdefs.h.  */
     5369
     5370
     5371int
     5372main ()
     5373{
     5374main ();
     5375  ;
     5376  return 0;
     5377}
     5378_ACEOF
     5379rm -f conftest.$ac_objext conftest$ac_exeext
     5380if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
     5381  (eval $ac_link) 2>conftest.er1
     5382  ac_status=$?
     5383  grep -v '^ *+' conftest.er1 >conftest.err
     5384  rm -f conftest.er1
     5385  cat conftest.err >&5
     5386  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5387  (exit $ac_status); } &&
     5388         { ac_try='test -z "$ac_c_werror_flag"
     5389                         || test ! -s conftest.err'
     5390  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5391  (eval $ac_try) 2>&5
     5392  ac_status=$?
     5393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5394  (exit $ac_status); }; } &&
     5395         { ac_try='test -s conftest$ac_exeext'
     5396  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
     5397  (eval $ac_try) 2>&5
     5398  ac_status=$?
     5399  echo "$as_me:$LINENO: \$? = $ac_status" >&5
     5400  (exit $ac_status); }; }; then
     5401  ac_cv_lib_Xt_main=yes
     5402else
     5403  echo "$as_me: failed program was:" >&5
     5404sed 's/^/| /' conftest.$ac_ext >&5
     5405
     5406ac_cv_lib_Xt_main=no
     5407fi
     5408rm -f conftest.err conftest.$ac_objext \
     5409      conftest$ac_exeext conftest.$ac_ext
     5410LIBS=$ac_check_lib_save_LIBS
     5411fi
     5412echo "$as_me:$LINENO: result: $ac_cv_lib_Xt_main" >&5
     5413echo "${ECHO_T}$ac_cv_lib_Xt_main" >&6
     5414if test $ac_cv_lib_Xt_main = yes; then
     5415  cat >>confdefs.h <<_ACEOF
     5416#define HAVE_LIBXT 1
     5417_ACEOF
     5418
     5419  LIBS="-lXt $LIBS"
     5420
     5421fi
     5422
     5423
    53295424
    53305425#checking for pthread libs
     
    69517046s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
    69527047s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
     7048s,@mkdir_p@,$mkdir_p,;t t
    69537049s,@AWK@,$AWK,;t t
    69547050s,@SET_MAKE@,$SET_MAKE,;t t
    69557051s,@am__leading_dot@,$am__leading_dot,;t t
    6956 s,@MSBITFIELDS@,$MSBITFIELDS,;t t
    69577052s,@CXX@,$CXX,;t t
    69587053s,@CXXFLAGS@,$CXXFLAGS,;t t
     
    69797074s,@CPP@,$CPP,;t t
    69807075s,@EGREP@,$EGREP,;t t
     7076s,@MSBITFIELDS@,$MSBITFIELDS,;t t
    69817077s,@LIBOBJS@,$LIBOBJS,;t t
    69827078s,@LTLIBOBJS@,$LTLIBOBJS,;t t
     
    76067702  # Extract the definition of DEP_FILES from the Makefile without
    76077703  # running `make'.
    7608   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
     7704  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    76097705  test -z "$DEPDIR" && continue
    76107706  # When using ansi2knr, U may be empty or an underscore; expand it
    7611   U=`sed -n -e '/^U = / s///p' < "$mf"`
     7707  U=`sed -n 's/^U = //p' < "$mf"`
    76127708  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
    76137709  # We invoke sed twice because it is the simplest approach to
    76147710  # changing $(DEPDIR) to its actual value in the expansion.
    7615   for file in `sed -n -e '
     7711  for file in `sed -n '
    76167712    /^DEP_FILES = .*\\\\$/ {
    76177713      s/^DEP_FILES = //
  • orxonox/branches/buerli/configure.ac

    r2617 r2707  
    55AC_INIT(orxonox, 0.1-pre-alpha, orxonox-dev@mail.datacore.ch)
    66AM_INIT_AUTOMAKE
     7
    78AC_CONFIG_SRCDIR([.])
    89AC_CONFIG_HEADER([config.h])
    910
    10 AC_MSG_CHECKING([for mingw])
     11
     12# Checks for programs.
     13AC_PROG_CXX
     14AC_PROG_CC
     15
     16
     17# checking gl header (has to be here because of a Linux error)
     18   AC_CHECK_HEADERS(GL/gl.h ,,
     19      [AC_MSG_ERROR([cannot find opengl headers]) ])
     20
     21
     22
     23### CHECKING FOR SYSTEM ###
     24
     25AC_MSG_CHECKING([for System])
    1126case `uname` in
     27### WINDOWS ###
    1228  *MINGW*)
     29echo "mingw-WINDOWS detected"
     30
    1331    mingw="yes"
    1432    MSBITFIELDS="-mms-bitfields"
    1533    MWINDOWS="-mwindows"
     34
     35# checking gl header
     36        #done before loop
     37
     38#   checking for Windows openGl library
     39    AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
     40    if test "$FOUND_opengl32" = "yes" ; then
     41        LIBS="$LIBS -lopengl32"
     42    else
     43         echo "------------------"
     44         echo "opengl not found."
     45         echo "please install the opengl package which can be found at http://www.opengl.org"
     46         echo "------------------"
     47         exit -1
     48    fi
     49
     50# cheking for GLU-header
     51    AC_CHECK_HEADERS(GL/glu.h ,,
     52      [AC_MSG_ERROR([cannot find opengl headers]) ])
     53
     54# checking for libGLU
     55    AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
     56    if test "$FOUND_glu32" = "yes" ; then
     57        LIBS="$LIBS -lGLU32"
     58    else
     59         echo "------------------"
     60         echo "GLU library not found."
     61         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     62         echo "------------------"
     63         exit -1
     64    fi
     65
     66
     67# checking for mingw32
     68    AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
     69    if test $FOUND_mingw32 = "yes"; then
     70        LIBS="$LIBS -lmingw32"
     71    fi
     72# checking for SDL-headers
     73    AC_CHECK_HEADERS(SDL/SDL.h ,,
     74      [AC_MSG_ERROR([cannot find SDL headers]) ])
     75
     76#checking for libSDL
     77    AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
     78    if test "$FOUND_sdlmain" = "yes" ; then
     79        LIBS="$LIBS -lsdlmain"
     80    else
     81         echo "------------------"
     82         echo "SDL library not found."
     83         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     84         echo "------------------"
     85         exit 1
     86    fi
     87    AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
     88    if test "$FOUND_sdl" = "yes" ; then
     89        LIBS="$LIBS -lsdl"
     90    else
     91         echo "------------------"
     92         echo "SDL library not found."
     93         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     94         echo "------------------"
     95         exit -1
     96    fi
     97
     98    ;;
     99
     100### LINUX ###
     101 *Linux*)
     102echo "Linux detected"
     103
     104 Linux="yes"
     105
     106# checking gl header
     107        #has been done befor linux-check
     108
     109#  checking for Unix GL
     110   AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
     111   if test "$FOUND_GL" = "yes" ; then
     112     LIBS="$LIBS -lGL"
     113   else
     114         echo "------------------"
     115         echo "opengl not found."
     116         echo "please install the opengl package which can be found at http://www.opengl.org"
     117         echo "------------------"
     118         exit -1
     119   fi
     120
     121# cheking for GLU-header
     122    AC_CHECK_HEADERS(GL/glu.h ,,
     123      [AC_MSG_ERROR([cannot find opengl headers]) ])
     124
     125    AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
     126    if test "$FOUND_GLU" = "yes" ; then
     127      LIBS="$LIBS -lGLU"
     128    else
     129         echo "------------------"
     130         echo "GLU library not found."
     131         echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
     132         echo "------------------"
     133         exit -1
     134    fi   
     135
     136# checking for SDL-headers
     137    AC_CHECK_HEADERS(SDL/SDL.h ,,
     138      [AC_MSG_ERROR([cannot find SDL headers]) ])
     139
     140    AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
     141     if test "$FOUND_SDL" = "yes" ; then
     142        LIBS="$LIBS -lSDL"
     143     else
     144         echo "------------------"
     145         echo "SDL library not found."
     146         echo "please install the SDL library, which can be found at http://www.libsdl.org"
     147         echo "------------------"
     148         exit -1
     149     fi   
     150       
    16151    ;;
    17152  *)
     
    22157AC_SUBST(MSBITFIELDS)
    23158
    24 
    25 # Checks for programs.
    26 AC_PROG_CXX
    27 AC_PROG_CC
    28 
    29 # Checks for libraries.
    30 
    31 #  cheking for libGL
    32 AC_CHECK_HEADERS(GL/gl.h ,,
    33       [AC_MSG_ERROR([cannot find opengl headers]) ])
    34 
    35 #   checking for Unix GL
    36 AC_CHECK_LIB([GL], [main], FOUND_GL=yes)
    37 if test "$FOUND_GL" = "yes" ; then
    38     LIBS="$LIBS -lGL"
    39     #   checking for Windows openGl library
    40 else
    41     echo "We did not find the Linux opengl Library. Checking for Windows Library"
    42     AC_CHECK_LIB([opengl32], [main], FOUND_opengl32=yes, "gl/gl.h")
    43     if test "$FOUND_opengl32" = "yes" ; then
    44         LIBS="$LIBS -lopengl32"
    45        
    46     else
    47          echo "------------------"
    48          echo "opengl not found."
    49          echo "please install the opengl package which can be found at http://www.opengl.org"
    50          echo "------------------"
    51          exit -1
    52     fi
    53 fi
    54 
    55 #  cheking for libGLU
    56 AC_CHECK_HEADERS(GL/glu.h ,,
    57       [AC_MSG_ERROR([cannot find opengl headers]) ])
    58 
    59 AC_CHECK_LIB([GLU], [gluProject], FOUND_GLU=yes)
    60 if test "$FOUND_GLU" = "yes" ; then
    61     LIBS="$LIBS -lGLU"
    62     #   checking for Windows GLU32 library
    63 else
    64     echo "We did not find the Linux GLU Library. Checking for Windows Library"
    65     AC_CHECK_LIB([glu32], [main], FOUND_glu32=yes)
    66     if test "$FOUND_glu32" = "yes" ; then
    67         LIBS="$LIBS -lGLU32"
    68        
    69         else
    70          echo "------------------"
    71          echo "GLU library not found."
    72          echo "please install the GLU library, that should come with openGL, which can be found at http://www.opengl.org"
    73          echo "------------------"
    74          exit -1
    75     fi
    76 fi
     159#### Checking for LIBraries.
    77160
    78161# FIXME: Replace `main' with a function in `-lOSMesa':
     
    83166AC_CHECK_LIB([Xt], [main])
    84167
    85 #  cheking for libglut32
    86 AC_CHECK_HEADERS(GL/glut.h ,,
    87       [AC_MSG_ERROR([cannot find glut headers]) ])
    88 AC_CHECK_LIB([glut], [glutInit], FOUND_glut=yes)
    89 if test "$FOUND_glut" = "yes" ; then
    90     LIBS="$LIBS -lglut"
    91     #   checking for Windows glut32 library
    92 else
    93     echo "We did not find the Linux glut Library. Checking for Windows Library"
    94     AC_CHECK_LIB([glut32], [main], FOUND_glut32=yes)
    95     if test "$FOUND_glut32" = "yes" ; then
    96         LIBS="$LIBS -lglut32"
    97     else
    98          echo "------------------"
    99          echo "glut library not found."
    100          echo "please install the glut library, which can be found at http://www.xmission.com/~nate/glut.html"
    101          echo "------------------"
    102          exit -1
    103     fi
    104 fi
    105 
    106 ## mingw CHECK
    107 if test $mingw = yes ; then
    108         AC_CHECK_LIB([mingw32], [main], FOUND_mingw32=yes)
    109         if test $FOUND_mingw32 = "yes"; then
    110                 LIBS="$LIBS -lmingw32"
    111         fi
    112 fi
    113 
    114 ## SDL CHECK
    115 
    116 #checking for SDL libs
    117 AC_CHECK_HEADERS(SDL/SDL.h ,,
    118       [AC_MSG_ERROR([cannot find SDL headers]) ])
    119 if test $mingw = no ; then
    120         AC_CHECK_LIB([SDL], [main], FOUND_SDL=yes)
    121         if test "$FOUND_SDL" = "yes" ; then
    122                 LIBS="$LIBS -lSDL"
    123         fi
    124 #   checking for Windows sdl library
    125 else
    126     AC_CHECK_LIB([sdlmain], [main], FOUND_sdlmain=yes)
    127     if test "$FOUND_sdlmain" = "yes" ; then
    128         LIBS="$LIBS -lsdlmain"
    129     fi
    130         AC_CHECK_LIB([sdl], [main], FOUND_sdl=yes)
    131         if test "$FOUND_sdl" = "yes" ; then
    132                 LIBS="$LIBS -lsdl"
    133         fi
    134 fi
    135168
    136169#checking for pthread libs
  • orxonox/branches/buerli/console/Makefile.in

    r2617 r2707  
    1 # Makefile.in generated by automake 1.7.1 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    5 # Free Software Foundation, Inc.
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1414
    1515@SET_MAKE@
     16
     17
     18SOURCES = $(console_SOURCES)
    1619
    1720srcdir = @srcdir@
     
    2225pkgincludedir = $(includedir)/@PACKAGE@
    2326top_builddir = ..
    24 
    2527am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    2628INSTALL = @INSTALL@
     
    3638PRE_UNINSTALL = :
    3739POST_UNINSTALL = :
     40bin_PROGRAMS = console$(EXEEXT)
     41subdir = console
     42DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     43        $(srcdir)/Makefile.in
     44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     45am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     46am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     47        $(ACLOCAL_M4)
     48mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
     49CONFIG_HEADER = $(top_builddir)/config.h
     50CONFIG_CLEAN_FILES =
     51am__installdirs = "$(DESTDIR)$(bindir)"
     52binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     53PROGRAMS = $(bin_PROGRAMS)
     54am_console_OBJECTS = orxonox_console.$(OBJEXT) \
     55        orxonox_console_entry.$(OBJEXT) orxonox_console_log.$(OBJEXT)
     56console_OBJECTS = $(am_console_OBJECTS)
     57console_LDADD = $(LDADD)
     58DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
     59depcomp = $(SHELL) $(top_srcdir)/depcomp
     60am__depfiles_maybe = depfiles
     61@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_console.Po \
     62@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_console_entry.Po \
     63@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_console_log.Po
     64CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     65        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     66CXXLD = $(CXX)
     67CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     68        -o $@
     69SOURCES = $(console_SOURCES)
     70DIST_SOURCES = $(console_SOURCES)
     71HEADERS = $(noinst_HEADERS)
     72ETAGS = etags
     73CTAGS = ctags
     74DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    3875ACLOCAL = @ACLOCAL@
    3976AMDEP_FALSE = @AMDEP_FALSE@
     
    90127am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
    91128am__include = @am__include@
     129am__leading_dot = @am__leading_dot@
    92130am__quote = @am__quote@
    93131bindir = @bindir@
     
    103141localstatedir = @localstatedir@
    104142mandir = @mandir@
     143mkdir_p = @mkdir_p@
    105144oldincludedir = @oldincludedir@
    106145prefix = @prefix@
     
    111150target_alias = @target_alias@
    112151AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
    113 
    114 #AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    115 bin_PROGRAMS = console
    116152console_SOURCES = orxonox_console.cc orxonox_console_entry.cc orxonox_console_log.cc
    117153noinst_HEADERS = orxonox_console.h orxonox_console_entry.h orxonox_console_log.h
    118 subdir = console
    119 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    120 CONFIG_HEADER = $(top_builddir)/config.h
    121 CONFIG_CLEAN_FILES =
    122 bin_PROGRAMS = console$(EXEEXT)
    123 PROGRAMS = $(bin_PROGRAMS)
    124 
    125 am_console_OBJECTS = orxonox_console.$(OBJEXT) \
    126         orxonox_console_entry.$(OBJEXT) orxonox_console_log.$(OBJEXT)
    127 console_OBJECTS = $(am_console_OBJECTS)
    128 console_LDADD = $(LDADD)
    129 console_DEPENDENCIES =
    130 console_LDFLAGS =
    131 
    132 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
    133 depcomp = $(SHELL) $(top_srcdir)/depcomp
    134 am__depfiles_maybe = depfiles
    135 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_console.Po \
    136 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_console_entry.Po \
    137 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_console_log.Po
    138 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    139         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
    140 CXXLD = $(CXX)
    141 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
    142         -o $@
    143 DIST_SOURCES = $(console_SOURCES)
    144 HEADERS = $(noinst_HEADERS)
    145 
    146 DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
    147 SOURCES = $(console_SOURCES)
    148 
    149154all: all-am
    150155
    151156.SUFFIXES:
    152157.SUFFIXES: .cc .o .obj
    153 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
     158$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     159        @for dep in $?; do \
     160          case '$(am__configure_deps)' in \
     161            *$$dep*) \
     162              cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
     163                && exit 0; \
     164              exit 1;; \
     165          esac; \
     166        done; \
     167        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  console/Makefile'; \
    154168        cd $(top_srcdir) && \
    155169          $(AUTOMAKE) --gnu  console/Makefile
    156 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
    157         cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
    158 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     170.PRECIOUS: Makefile
     171Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     172        @case '$?' in \
     173          *config.status*) \
     174            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     175          *) \
     176            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     177            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     178        esac;
     179
     180$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     181        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     182
     183$(top_srcdir)/configure:  $(am__configure_deps)
     184        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     185$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     186        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    159187install-binPROGRAMS: $(bin_PROGRAMS)
    160188        @$(NORMAL_INSTALL)
    161         $(mkinstalldirs) $(DESTDIR)$(bindir)
     189        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    162190        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    163191          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    165193          ; then \
    166194            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    167            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    168            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     195           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     196           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    169197          else :; fi; \
    170198        done
     
    174202        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    175203          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    176           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    177           rm -f $(DESTDIR)$(bindir)/$$f; \
     204          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     205          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    178206        done
    179207
     
    185213
    186214mostlyclean-compile:
    187         -rm -f *.$(OBJEXT) core *.core
     215        -rm -f *.$(OBJEXT)
    188216
    189217distclean-compile:
     
    194222@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_console_log.Po@am__quote@
    195223
    196 distclean-depend:
    197         -rm -rf ./$(DEPDIR)
    198 
    199224.cc.o:
    200 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    201 @am__fastdepCXX_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
    202 @am__fastdepCXX_TRUE@   then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    203 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    204 @am__fastdepCXX_TRUE@   fi
     225@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
     226@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    205227@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    206228@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    207229@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    208 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
     230@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ $<
    209231
    210232.cc.obj:
    211 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    212 @am__fastdepCXX_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
    213 @am__fastdepCXX_TRUE@   then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    214 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    215 @am__fastdepCXX_TRUE@   fi
     233@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
     234@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    216235@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    217236@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    218237@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    219 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
     238@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    220239uninstall-info-am:
    221 
    222 ETAGS = etags
    223 ETAGSFLAGS =
    224 
    225 CTAGS = ctags
    226 CTAGSFLAGS =
    227 
    228 tags: TAGS
    229240
    230241ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    236247               END { for (i in files) print i; }'`; \
    237248        mkid -fID $$unique
     249tags: TAGS
    238250
    239251TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    247259          $(AWK) '    { files[$$0] = 1; } \
    248260               END { for (i in files) print i; }'`; \
    249         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    250           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    251              $$tags $$unique
    252 
     261        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     262          test -n "$$unique" || unique=$$empty_fix; \
     263          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     264            $$tags $$unique; \
     265        fi
    253266ctags: CTAGS
    254267CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    273286distclean-tags:
    274287        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
    275 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    276 
    277 top_distdir = ..
    278 distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
    279288
    280289distdir: $(DISTFILES)
     
    290299          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
    291300            dir="/$$dir"; \
    292             $(mkinstalldirs) "$(distdir)$$dir"; \
     301            $(mkdir_p) "$(distdir)$$dir"; \
    293302          else \
    294303            dir=''; \
     
    308317check: check-am
    309318all-am: Makefile $(PROGRAMS) $(HEADERS)
    310 
    311319installdirs:
    312         $(mkinstalldirs) $(DESTDIR)$(bindir)
    313 
     320        for dir in "$(DESTDIR)$(bindir)"; do \
     321          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     322        done
    314323install: install-am
    315324install-exec: install-exec-am
     
    323332install-strip:
    324333        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
    325           INSTALL_STRIP_FLAG=-s \
     334          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
    326335          `test -z '$(STRIP)' || \
    327336            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     
    331340
    332341distclean-generic:
    333         -rm -f Makefile $(CONFIG_CLEAN_FILES)
     342        -rm -f $(CONFIG_CLEAN_FILES)
    334343
    335344maintainer-clean-generic:
     
    341350
    342351distclean: distclean-am
    343 
    344 distclean-am: clean-am distclean-compile distclean-depend \
    345         distclean-generic distclean-tags
     352        -rm -rf ./$(DEPDIR)
     353        -rm -f Makefile
     354distclean-am: clean-am distclean-compile distclean-generic \
     355        distclean-tags
    346356
    347357dvi: dvi-am
     
    349359dvi-am:
    350360
     361html: html-am
     362
    351363info: info-am
    352364
     
    364376
    365377maintainer-clean: maintainer-clean-am
    366 
     378        -rm -rf ./$(DEPDIR)
     379        -rm -f Makefile
    367380maintainer-clean-am: distclean-am maintainer-clean-generic
    368381
     
    383396.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
    384397        clean-generic ctags distclean distclean-compile \
    385         distclean-depend distclean-generic distclean-tags distdir dvi \
    386         dvi-am info info-am install install-am install-binPROGRAMS \
     398        distclean-generic distclean-tags distdir dvi dvi-am html \
     399        html-am info info-am install install-am install-binPROGRAMS \
    387400        install-data install-data-am install-exec install-exec-am \
    388401        install-info install-info-am install-man install-strip \
  • orxonox/branches/buerli/gui/Makefile.am

    r2589 r2707  
    33
    44bin_PROGRAMS=gui
    5 gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc
     5gui_SOURCES=orxonox_gui.cc orxonox_gui_video.cc orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc orxonox_gui_keys.cc
    66
    7 noinst_HEADERS=orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h
     7noinst_HEADERS=orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h orxonox_gui_keys.h
    88
    99#  uncomment the following if bencoder requires the math library
  • orxonox/branches/buerli/gui/Makefile.in

    r2617 r2707  
    1 # Makefile.in generated by automake 1.7.1 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
    5 # Free Software Foundation, Inc.
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1414
    1515@SET_MAKE@
     16
     17
     18SOURCES = $(gui_SOURCES)
    1619
    1720srcdir = @srcdir@
     
    2225pkgincludedir = $(includedir)/@PACKAGE@
    2326top_builddir = ..
    24 
    2527am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    2628INSTALL = @INSTALL@
     
    3638PRE_UNINSTALL = :
    3739POST_UNINSTALL = :
     40bin_PROGRAMS = gui$(EXEEXT)
     41subdir = gui
     42DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     43        $(srcdir)/Makefile.in
     44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     45am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     46am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     47        $(ACLOCAL_M4)
     48mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
     49CONFIG_HEADER = $(top_builddir)/config.h
     50CONFIG_CLEAN_FILES =
     51am__installdirs = "$(DESTDIR)$(bindir)"
     52binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     53PROGRAMS = $(bin_PROGRAMS)
     54am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
     55        orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
     56        orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT) \
     57        orxonox_gui_keys.$(OBJEXT)
     58gui_OBJECTS = $(am_gui_OBJECTS)
     59gui_LDADD = $(LDADD)
     60DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
     61depcomp = $(SHELL) $(top_srcdir)/depcomp
     62am__depfiles_maybe = depfiles
     63@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
     64@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
     65@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_banner.Po \
     66@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
     67@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
     68@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_keys.Po \
     69@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     70CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     71        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     72CXXLD = $(CXX)
     73CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     74        -o $@
     75SOURCES = $(gui_SOURCES)
     76DIST_SOURCES = $(gui_SOURCES)
     77HEADERS = $(noinst_HEADERS)
     78ETAGS = etags
     79CTAGS = ctags
     80DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    3881ACLOCAL = @ACLOCAL@
    3982AMDEP_FALSE = @AMDEP_FALSE@
     
    90133am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
    91134am__include = @am__include@
     135am__leading_dot = @am__leading_dot@
    92136am__quote = @am__quote@
    93137bindir = @bindir@
     
    103147localstatedir = @localstatedir@
    104148mandir = @mandir@
     149mkdir_p = @mkdir_p@
    105150oldincludedir = @oldincludedir@
    106151prefix = @prefix@
     
    111156target_alias = @target_alias@
    112157AM_CXXFLAGS = `pkg-config --cflags gtk+-2.0` $(MSBITFIELDS)
    113 
    114 #AM_LDFLAGS=`pkg-config --libs  gtk+-2.0`
    115 bin_PROGRAMS = gui
    116 gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc       orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc
    117 
    118 noinst_HEADERS = orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h
     158gui_SOURCES = orxonox_gui.cc orxonox_gui_video.cc       orxonox_gui_audio.cc orxonox_gui_exec.cc orxonox_gui_flags.cc orxonox_gui_banner.cc orxonox_gui_keys.cc
     159noinst_HEADERS = orxonox_gui.h orxonox_gui_video.h orxonox_gui_audio.h orxonox_gui_exec.h orxonox_gui_flags.h orxonox_gui_banner.h orxonox_gui_keys.h
    119160
    120161#  uncomment the following if bencoder requires the math library
     
    127168#TESTS=chk
    128169EXTRA_DIST = rc banner.xpm
    129 subdir = gui
    130 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    131 CONFIG_HEADER = $(top_builddir)/config.h
    132 CONFIG_CLEAN_FILES =
    133 bin_PROGRAMS = gui$(EXEEXT)
    134 PROGRAMS = $(bin_PROGRAMS)
    135 
    136 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
    137         orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
    138         orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT)
    139 gui_OBJECTS = $(am_gui_OBJECTS)
    140 gui_LDADD = $(LDADD)
    141 gui_DEPENDENCIES =
    142 gui_LDFLAGS =
    143 
    144 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
    145 depcomp = $(SHELL) $(top_srcdir)/depcomp
    146 am__depfiles_maybe = depfiles
    147 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
    148 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    149 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_banner.Po \
    150 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    151 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
    152 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
    153 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    154         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
    155 CXXLD = $(CXX)
    156 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
    157         -o $@
    158 DIST_SOURCES = $(gui_SOURCES)
    159 HEADERS = $(noinst_HEADERS)
    160 
    161 DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in
    162 SOURCES = $(gui_SOURCES)
    163 
    164170all: all-am
    165171
    166172.SUFFIXES:
    167173.SUFFIXES: .cc .o .obj
    168 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
     174$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     175        @for dep in $?; do \
     176          case '$(am__configure_deps)' in \
     177            *$$dep*) \
     178              cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
     179                && exit 0; \
     180              exit 1;; \
     181          esac; \
     182        done; \
     183        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  gui/Makefile'; \
    169184        cd $(top_srcdir) && \
    170185          $(AUTOMAKE) --gnu  gui/Makefile
    171 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
    172         cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
    173 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     186.PRECIOUS: Makefile
     187Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     188        @case '$?' in \
     189          *config.status*) \
     190            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     191          *) \
     192            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     193            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     194        esac;
     195
     196$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     197        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     198
     199$(top_srcdir)/configure:  $(am__configure_deps)
     200        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     201$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     202        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    174203install-binPROGRAMS: $(bin_PROGRAMS)
    175204        @$(NORMAL_INSTALL)
    176         $(mkinstalldirs) $(DESTDIR)$(bindir)
     205        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    177206        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    178207          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    180209          ; then \
    181210            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    182            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    183            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     211           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     212           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    184213          else :; fi; \
    185214        done
     
    189218        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    190219          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    191           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    192           rm -f $(DESTDIR)$(bindir)/$$f; \
     220          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     221          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    193222        done
    194223
     
    200229
    201230mostlyclean-compile:
    202         -rm -f *.$(OBJEXT) core *.core
     231        -rm -f *.$(OBJEXT)
    203232
    204233distclean-compile:
     
    210239@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    211240@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
     241@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@
    212242@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
    213243
    214 distclean-depend:
    215         -rm -rf ./$(DEPDIR)
    216 
    217244.cc.o:
    218 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    219 @am__fastdepCXX_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
    220 @am__fastdepCXX_TRUE@   then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    221 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    222 @am__fastdepCXX_TRUE@   fi
     245@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
     246@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    223247@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    224248@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    225249@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    226 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
     250@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ $<
    227251
    228252.cc.obj:
    229 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    230 @am__fastdepCXX_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
    231 @am__fastdepCXX_TRUE@   then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    232 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    233 @am__fastdepCXX_TRUE@   fi
     253@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
     254@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    234255@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    235256@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    236257@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    237 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
     258@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    238259uninstall-info-am:
    239 
    240 ETAGS = etags
    241 ETAGSFLAGS =
    242 
    243 CTAGS = ctags
    244 CTAGSFLAGS =
    245 
    246 tags: TAGS
    247260
    248261ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    254267               END { for (i in files) print i; }'`; \
    255268        mkid -fID $$unique
     269tags: TAGS
    256270
    257271TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    265279          $(AWK) '    { files[$$0] = 1; } \
    266280               END { for (i in files) print i; }'`; \
    267         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    268           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    269              $$tags $$unique
    270 
     281        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     282          test -n "$$unique" || unique=$$empty_fix; \
     283          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     284            $$tags $$unique; \
     285        fi
    271286ctags: CTAGS
    272287CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    291306distclean-tags:
    292307        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
    293 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    294 
    295 top_distdir = ..
    296 distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
    297308
    298309distdir: $(DISTFILES)
     
    308319          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
    309320            dir="/$$dir"; \
    310             $(mkinstalldirs) "$(distdir)$$dir"; \
     321            $(mkdir_p) "$(distdir)$$dir"; \
    311322          else \
    312323            dir=''; \
     
    326337check: check-am
    327338all-am: Makefile $(PROGRAMS) $(HEADERS)
    328 
    329339installdirs:
    330         $(mkinstalldirs) $(DESTDIR)$(bindir)
    331 
     340        for dir in "$(DESTDIR)$(bindir)"; do \
     341          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     342        done
    332343install: install-am
    333344install-exec: install-exec-am
     
    341352install-strip:
    342353        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
    343           INSTALL_STRIP_FLAG=-s \
     354          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
    344355          `test -z '$(STRIP)' || \
    345356            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
     
    349360
    350361distclean-generic:
    351         -rm -f Makefile $(CONFIG_CLEAN_FILES)
     362        -rm -f $(CONFIG_CLEAN_FILES)
    352363
    353364maintainer-clean-generic:
     
    359370
    360371distclean: distclean-am
    361 
    362 distclean-am: clean-am distclean-compile distclean-depend \
    363         distclean-generic distclean-tags
     372        -rm -rf ./$(DEPDIR)
     373        -rm -f Makefile
     374distclean-am: clean-am distclean-compile distclean-generic \
     375        distclean-tags
    364376
    365377dvi: dvi-am
     
    367379dvi-am:
    368380
     381html: html-am
     382
    369383info: info-am
    370384
     
    382396
    383397maintainer-clean: maintainer-clean-am
    384 
     398        -rm -rf ./$(DEPDIR)
     399        -rm -f Makefile
    385400maintainer-clean-am: distclean-am maintainer-clean-generic
    386401
     
    401416.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
    402417        clean-generic ctags distclean distclean-compile \
    403         distclean-depend distclean-generic distclean-tags distdir dvi \
    404         dvi-am info info-am install install-am install-binPROGRAMS \
     418        distclean-generic distclean-tags distdir dvi dvi-am html \
     419        html-am info info-am install install-am install-binPROGRAMS \
    405420        install-data install-data-am install-exec install-exec-am \
    406421        install-info install-info-am install-man install-strip \
  • orxonox/branches/buerli/gui/orxonox_gui.cc

    r2595 r2707  
    3232#include "orxonox_gui_flags.h"
    3333#include "orxonox_gui_banner.h"
     34#include "orxonox_gui_keys.h"
    3435
    3536  Window* orxonoxGUI;
     
    3940  OrxonoxGuiFlags* flags;
    4041  OrxonoxGuiBanner* banner;
     42  OrxonoxGuiKeys* keys;
    4143
    4244int main( int argc, char *argv[] )
     
    4951
    5052/**
    51  * Initializes the Gui
     53   \brief Initializes the Gui
    5254*/
    5355OrxonoxGui::OrxonoxGui (int argc, char *argv[])
     
    5658  gtk_rc_parse( "rc" );
    5759 
    58   orxonoxGUI = new Window("Graphical Orxonox Launcher");
     60  orxonoxGUI = new Window( "Grafical OrxOnoX loader, "PACKAGE_VERSION );
    5961  orxonoxGUI->connectSignal ("destroy", orxonoxGUI->orxonox_gui_quit);
    6062  orxonoxGUI->connectSignal ("delete_event", orxonoxGUI->orxonox_gui_quit);
     
    7577     
    7678  optionBox->fill (avBox);
    77    
     79
     80  keys = new OrxonoxGuiKeys ();
     81  optionBox->fill (keys->getWidget ());
     82
    7883  exec = new OrxonoxGuiExec (orxonoxGUI);
    7984  optionBox->fill (exec->getWidget ());
     
    99104
    100105/* WIDGET */
    101 /**
    102  * Initializes a widget.
    103  * Nothing to do here.
    104  */
     106
     107/**
     108   \brief deletes any given Widget
     109   This is still pretty crappy.
     110*/
     111Widget::~Widget()
     112{
     113  //  cout << "hiding: " <<this->label <<"\n";
     114  this->hide();
     115  //  cout << "check if Packer: "<<this->label <<"\n";
     116  if (this->is_option < 0)
     117    {
     118      //  cout << "get Down "<<this->label <<"\n";
     119      static_cast<Packer*>(this)->down->~Widget();
     120    }
     121  //  cout << "next != NULL?: " <<this->label <<"\n";
     122  if (this->next != NULL)
     123    this->next->~Widget();
     124  cout << "delete Widget: " <<this->label <<"\n";
     125  //  delete widget;
     126}
     127
     128/**
     129   \brief Initializes a widget.
     130   Initializes the next Pointer and the other Widget-specific Defaults.
     131*/
    105132void Widget::init()
    106133{
     134  next = NULL;
     135  label = "";
    107136  return;
    108137}
    109138
    110 /**
    111  * Connect any signal to any given Sub-widget
    112  */
     139/**
     140   \brief makes the widget visible.
     141*/
     142void Widget::show()
     143{
     144  gtk_widget_show (this->widget);
     145}
     146
     147/**
     148   \brief hides the widget.
     149*/
     150void Widget::hide()
     151{
     152  gtk_widget_hide (this->widget);
     153}
     154
     155/**
     156   \brief Sets the resolution of a specific widget to the given size.
     157   \param width the width of the widget to set.
     158   \param height the height of the widget to set.
     159*/
     160void Widget::setSize(int width, int height)
     161{
     162  gtk_widget_set_usize (this->widget, width, height);
     163}
     164
     165/**
     166    \brief Connect any signal to any given Sub-widget
     167*/
    113168void Widget::connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    114169{
     
    117172
    118173/**
    119  * Connect a signal with additionally passing the whole Object
    120  */
     174   \brief Connect a signal with additionally passing the whole Object
     175*/
    121176void Widget::connectSignal (char* event, gint (*signal)( GtkWidget*, Widget *))
    122177{
     
    125180
    126181/**
    127  * Connect a signal with additionally passing a whole external Object
    128  */
     182   \brief Connect a signal with additionally passing a whole external Object
     183*/
    129184void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
    130185{
     
    132187}
    133188
    134 
    135 /**
    136  * Function to Shows a specific widget.
    137  */
    138 void Widget::show()
    139 {
    140   gtk_widget_show (this->widget);
    141 }
    142 
    143 /**
    144  * Moves through all the Widgets downwards from this and executes the function on them.
    145  \param function must be of type void and takes a Widget* as an Input.
    146 
    147  */
     189/**
     190   \brief Moves through all the Widgets downwards from this and executes the function on them.
     191   \param function must be of type void and takes a Widget* as an Input.
     192*/
    148193void Widget::walkThrough (void (*function)(Widget*))
    149194{
    150195  function(this);
    151   switch (this->is_option)
     196  if (this->is_option < 0)
    152197    {
    153     case -1:
    154       static_cast<Container*>(this)->down->walkThrough (function);
    155       break;
    156     case -2:
    157       static_cast<Box*>(this)->down->walkThrough (function);
    158       break;
     198      static_cast<Packer*>(this)->down->walkThrough (function);
    159199    }
    160200
     
    163203}
    164204
    165 
    166 /**
    167  * This is for listing the option of "widget"
    168  \param widget specifies the widget that should be listed
     205/**
     206    \brief This is for listing the option of "widget"
     207    \param widget specifies the widget that should be listed
    169208*/
    170209void Widget::listOptions (Widget* widget)
    171210{
    172211  if (widget->is_option >= 1)
    173     cout << static_cast<Option*>(widget)->option_name <<" is : " << static_cast<Option*>(widget)->value <<endl;
    174 }
    175 
    176 /**
    177  * This is for setting the option of "widget"
    178  \param widget specifies the widget that should be set.
     212    cout << static_cast<Option*>(widget)->label <<" is : " << static_cast<Option*>(widget)->value <<endl;
     213}
     214
     215/**
     216    \brief This is for setting the option of "widget"
     217    \param widget specifies the widget that should be set.
    179218*/
    180219void Widget::setOptions (Widget* widget)
     
    184223}
    185224
    186 /* CONTAINERS*/
    187 
    188 /**
    189  * Initializes a Container.
    190  * nothing to do here
    191  */
     225//void deleteWidget(Widget* lastWidget)
     226
     227
     228/* PACKERS */
     229
     230/**
     231   \brief Initializes a Packer.
     232   Sets the down-pinter to NULL and other PackerSpecific-values to their defaults.
     233*/
     234void Packer::init (void)
     235{
     236  down = NULL;
     237  this->setGroupName ("");
     238
     239
     240  static_cast<Widget*>(this)->init();
     241  return;
     242}
     243
     244/**
     245   \brief Sets the group name under which all the lower widgets of this will be saved.
     246   \param name The name of the group.
     247*/
     248void Packer::setGroupName (char* name)
     249{
     250  groupName = name;
     251}
     252
     253/**
     254   \brief Retrieves the group name under which all the lower widgets of this will be saved.
     255   \returns name The name of the group.
     256*/
     257char* Packer::getGroupName (void)
     258{
     259  return groupName;
     260}
     261
     262/* CONTAINERS */
     263
     264/**
     265   \brief Initializes a Container.
     266   sets the Container-Specific defaults.
     267*/
    192268void Container::init (void)
    193269{
     270  is_option = -1;
     271
     272  static_cast<Packer*>(this)->init();
     273
    194274  return;
    195275}
    196276
    197277/**
    198  * Fills a Container with lowerWidget.
    199  * It does this by filling up the down pointer only if down points to NULL.
    200  \param lowerWidget the Widget that should be filled into the Container.
     278   \briefFills a Container with lowerWidget.
     279   It does this by filling up the down pointer only if down points to NULL.
     280   \param lowerWidget the Widget that should be filled into the Container.
    201281*/
    202282void Container::fill (Widget *lowerWidget)
     
    215295/* WINDOW */
    216296
    217   /**
    218    * Creating a new Window without a Name
    219    */
     297/**
     298   \brief Creating a new Window without a Name
     299*/
    220300Window::Window (void)
    221301{
     
    224304
    225305/**
    226  * Creating a Window with a name
    227  \param windowName the name the window should get.
    228  */
     306   \brief Creating a Window with a name
     307   \param windowName the name the window should get.
     308*/
    229309Window::Window (char* windowName)
    230310{
     
    234314
    235315/**
    236  * Destoying a Window (very BAD implemented).
    237  * For now it just hides the window.
    238  */
    239 Window::~Window ()
    240 {
    241   gtk_widget_hide (widget);
    242 }
    243 
    244 /**
    245  *initializes a new Window
    246  */
     316   \brief initializes a new Window
     317*/
    247318void Window::init()
    248319{
    249   is_option = -1;
    250   next = NULL;
    251   down = NULL;
     320  isOpen = true;
     321
     322  static_cast<Container*>(this)->init();
     323
    252324  widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    253325  gtk_window_set_policy (GTK_WINDOW(widget), TRUE, TRUE, TRUE);
     
    259331
    260332/**
    261  * Shows all Widgets that are included within this->widget.
    262  */
     333   \brief Shows all Widgets that are included within this->widget.
     334*/
    263335void Window::showall ()
    264336{
     337  isOpen = true;
    265338  gtk_widget_show_all  (widget);
    266339}
    267340
    268341/**
    269  * Set The Window-title to title
    270  \param title title the Window should get.
     342   \brief Set The Window-title to title
     343   \param title title the Window should get.
    271344*/
    272345void Window::setTitle (char* title)
    273346{
     347  label=title;
    274348  gtk_window_set_title (GTK_WINDOW (widget), title);
    275349}
     
    295369
    296370/**
    297  * Creates a new Frame without a name
    298  */
     371    \brief Creates a new Frame without a name
     372*/
    299373Frame::Frame (void)
    300374{
     
    303377
    304378/**
    305  * Creates a new Frame with name title
    306  */
     379   \brief Creates a new Frame with name title
     380*/
    307381Frame::Frame (char* title)
    308382{
     
    311385}
    312386
    313 /**
    314  * Destroys given Frame (not implemented yet)
    315  */
    316 Frame::~Frame ()
    317 {
    318 }
    319 
    320 /**
    321  * Initializes a new Frame with default settings
    322  */
     387/**
     388    \brief Initializes a new Frame with default settings
     389*/
    323390void Frame::init()
    324391{
    325   is_option = -1;
    326   next = NULL;
    327   down = NULL;
     392  static_cast<Container*>(this)->init();
     393 
    328394  widget = gtk_frame_new ("");
    329395  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
     
    331397
    332398/**
    333  * Sets the Frames name to title
    334  \param title The title the Frame should get.
    335  */
     399   \brief Sets the Frames name to title
     400   \param title The title the Frame should get.
     401*/
    336402void Frame::setTitle (char* title)
    337403{
     404  label = title;
    338405  gtk_frame_set_label (GTK_FRAME (widget), title);
    339406}
     
    342409
    343410/**
    344  * Creates a new EventBox with default settings.
    345  */
     411   \brief Creates a new EventBox with default settings.
     412*/
    346413EventBox::EventBox ()
    347414{
     
    349416}
    350417/**
    351  * Creates a new EventBox with name title
    352  \param title title the Eventbox should get (only data-structure-internal)
     418   \brief Creates a new EventBox with name title
     419   \param title title the Eventbox should get (only data-structure-internal)
    353420*/
    354421EventBox::EventBox (char* title)
     
    360427
    361428/**
    362  * Initializes a new EventBox
    363  */
     429   \brief Initializes a new EventBox
     430*/
    364431void EventBox::init(void)
    365432{
    366433  is_option = -1;
    367   next = NULL;
    368   down = NULL;
     434
     435  static_cast<Container*>(this)->init();
     436
    369437  widget = gtk_event_box_new ();
    370438  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
     
    373441
    374442/**
    375  * Sets the Title of the EventBox (not implemented)
    376  \param title Name the EventBox should get (only datastructure-internal).
     443   \brief Sets the Title of the EventBox (not implemented)
     444   \param title Name the EventBox should get (only datastructure-internal).
    377445*/
    378446void EventBox::setTitle (char* title)
    379447{
    380 
    381 }
    382 
    383 /**
    384  * Destructs an EventBox (not Implemented)
    385  */
    386 EventBox::~EventBox ()
    387 {
    388 }
    389 
     448  label = title;
     449}
    390450
    391451/* BOX */
    392452
    393453/**
    394  * Creates a new horizontal Box
    395  */
     454   \brief Creates a new horizontal Box
     455*/
    396456Box::Box (void)
    397457{
     
    400460
    401461/**
    402  * Creates a new Box of type boxtype
    403  \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
    404  */
     462   \brief Creates a new Box of type boxtype
     463   \param boxtype if 'v' the Box will be vertically, if 'h' the Box will be horizontally
     464*/
    405465Box::Box (char boxtype)
    406466{
     
    409469
    410470/**
    411  * Destroys given Box (not implemented yet)
    412  */
    413 Box::~Box ()
    414 {
    415 }
    416 
    417 /**
    418  * Initializes a new Box with type boxtype
    419  \param boxtype see Box(char boxtype)
     471   \brief Initializes a new Box with type boxtype
     472   \param boxtype see Box(char boxtype)
    420473*/
    421474void Box::init(char boxtype)
    422475{
    423476  is_option = -2;
    424   next = NULL;
    425   down = NULL;
     477
     478  static_cast<Packer*>(this)->init();
    426479  if (boxtype == 'v')
    427480    {
     
    435488
    436489/**
    437  * Fills a box with a given Widget.
    438  * It does this by apending the first one to its down-pointer and all its following ones to the preceding next-pointer. The last one will receive a NULL pointer as Next
    439  \param lowerWidget the next Widget that should be appendet to this Box
    440  */
     490    \brief Fills a box with a given Widget.
     491   It does this by apending the first one to its down-pointer and all its following ones to the preceding next-pointer. The last one will receive a NULL pointer as Next
     492    \param lowerWidget the next Widget that should be appendet to this Box
     493*/
    441494void Box::fill (Widget *lowerWidget)
    442495{
    443   /**
    444    * Fill a Box with its lowerwidgets
    445    */
    446496  gtk_box_pack_start (GTK_BOX (this->widget), lowerWidget->widget, TRUE, TRUE, 0);
    447497  if (this->down == NULL)
     
    462512
    463513/**
    464  * Creates a new Image
    465  \param imagename the location of the Image on the Hard Disc
     514   \brief Creates a new Image
     515   \param imagename the location of the Image on the Hard Disc
    466516*/
    467517Image::Image (char* imagename)
     
    469519  this->init();
    470520  widget = gtk_image_new_from_file (imagename);
    471 }
    472 
    473 /**
    474  * Initializes a new Image
    475  */
     521  label = imagename;
     522}
     523
     524/**
     525    \brief Initializes a new Image
     526*/
    476527void Image::init()
    477528{
    478529  is_option = 0;
    479   next = NULL;
     530
     531  static_cast<Widget*>(this)->init();
    480532}
    481533
     
    484536
    485537/**
    486  * Initializes a new Option: nothing to do here
    487  */
     538   \brief Initializes a new Option.
     539   sets all Option-Specific-Values to their defaults.
     540*/
    488541void Option::init()
    489542{
     543  value = 0;
     544  flag_name = "";
     545  flag_name_short = "";
     546  default_value = 0;
     547
     548  static_cast<Widget*>(this)->init();
     549
    490550  return;
    491551}
    492552
    493553/**
    494  * This sets The FlagName of an Option and defines its default Values
    495  !! Options will be saved if flagname is different from "" !!
    496 \param flagname the Name that will be displayed in the output
    497 \param defaultvalue the default Value for this Option (see definition of defaultvalue
     554   \brief This sets The FlagName of an Option and defines its default Values
     555   !! Options will be saved if flagname is different from "" !!
     556   \param flagname the Name that will be displayed in the output
     557   \param defaultvalue the default Value for this Option (see definition of defaultvalue
    498558*/
    499559void Option::setFlagName (char* flagname, int defaultvalue)
     
    501561  flag_name = flagname;
    502562  default_value = defaultvalue;
    503   cout << "Set Flagname of " << option_name << " to " << flagname << endl;
    504 }
    505 
    506 /**
    507  * see Option::setFlagName (char* flagname, int defaultvalue)
    508  \param flagname the Name that will be displayed in the output
    509  \param defaultvalue the default Value for this Option (see definition of defaultvalue
    510  \param flagnameshort a short flagname to be displayed in the output
     563  cout << "Set Flagname of " << label << " to " << flagname << endl;
     564}
     565
     566/**
     567    \brief see Option::setFlagName (char* flagname, int defaultvalue)
     568    \param flagname the Name that will be displayed in the output
     569    \param defaultvalue the default Value for this Option (see definition of defaultvalue
     570    \param flagnameshort a short flagname to be displayed in the output
    511571*/
    512572void Option::setFlagName (char* flagname, char* flagnameshort,  int defaultvalue)
     
    515575  flag_name_short = flagnameshort;
    516576  default_value = defaultvalue;
    517   cout << "Set Flagname of " << option_name << " to " << flagname << endl;
     577  cout << "Set Flagname of " << label << " to " << flagname << endl;
    518578}
    519579
     
    522582
    523583/**
    524  * Creates a new Button with a buttonname
    525  \param buttonname sets the Name of the Button
     584   \brief Creates a new Button with a buttonname
     585   \param buttonname sets the Name of the Button
    526586*/
    527587Button::Button(char* buttonname)
     
    532592
    533593/**
    534  * Initializes a new Button
    535  */
     594   \brief Initializes a new Button
     595*/
    536596void Button::init(void)
    537597{
    538598  is_option = 0;
    539   value = 0;
    540   next = NULL;
    541   option_name ="";
    542   flag_name = "";
    543   flag_name_short = "";
    544   default_value = 0;
     599
     600  static_cast<Option*>(this)->init();
     601
    545602  widget = gtk_button_new_with_label ("");
    546603}
    547604
    548605/**
    549  * Sets a new name to the Button
    550 \param title The name the Button should get
     606   \brief Sets a new name to the Button
     607   \param title The name the Button should get
    551608*/
    552609void Button::setTitle (char *title)
    553610{
    554   option_name = title;
     611  label = title;
    555612  gtk_button_set_label (GTK_BUTTON(widget), title);
    556613}
    557614
    558615/**
    559  * redraws the Button
    560  * not implemented yet
    561  */
     616   \brief redraws the Button
     617   not implemented yet
     618*/
    562619void Button::redraw ()
    563620{
     
    567624
    568625/**
    569  * Creates a new CheckButton with an ame
    570  \param buttonname The name the CheckButton should display.
    571  */
     626   \brief Creates a new CheckButton with an ame
     627   \param buttonname The name the CheckButton should display.
     628*/
    572629CheckButton::CheckButton (char* buttonname)
    573630{
     
    578635}
    579636
    580 /**
    581  * Destructs a CheckButton (not Implemented yet).
    582  */
    583 CheckButton::~CheckButton()
    584 {
    585 }
    586 
    587 /**
    588  * Initiali a new CheckButton with default settings
    589  */
     637/**
     638   \brief Initialize a new CheckButton with default settings
     639*/
    590640void CheckButton::init(void)
    591641{
    592642  is_option = 1;
    593   value = 0;
    594   next = NULL;
    595   option_name = "";
    596   flag_name = "";
    597   flag_name_short = "";
    598   default_value = 0;
     643
     644  static_cast<Option*>(this)->init();
     645
    599646  widget = gtk_check_button_new_with_label ("");
    600647}
    601648
    602649/**
    603  * Sets a new Title to a CheckButton
    604  \param title The new Name the CheckButton should display.
     650   \brief Sets a new Title to a CheckButton
     651   \param title The new Name the CheckButton should display.
    605652*/
    606653void CheckButton::setTitle(char* title)
    607654{
    608   option_name = title;
     655  label = title;
    609656  gtk_button_set_label(GTK_BUTTON(widget), title);
    610657}
     
    612659
    613660/**
    614  * Signal OptionChange writes the Value from the CheckButton to its Object-Database.
    615  \param widget The widget(CheckButton) that has a changed Value
    616  \param checkbutton the CheckButton-Object that should receive the change.
    617  */
     661    \brief Signal OptionChange writes the Value from the CheckButton to its Object-Database.
     662    \param widget The widget(CheckButton) that has a changed Value
     663    \param checkbutton the CheckButton-Object that should receive the change.
     664*/
    618665gint CheckButton::OptionChange (GtkWidget *widget, Widget* checkbutton)
    619666{
    620667  static_cast<CheckButton*>(checkbutton)->value = (int)gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON ((CheckButton*)checkbutton->widget));
    621668  flags->setTextFromFlags(orxonoxGUI);
    622   cout << static_cast<CheckButton*>(checkbutton)->option_name << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
    623 }
    624 
    625 /**
    626  * Redraws the CheckButton (if option has changed).
    627  * Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
    628  */
     669  cout << static_cast<CheckButton*>(checkbutton)->label << " set to: " << static_cast<CheckButton*>(checkbutton)->value << endl;
     670}
     671
     672/**
     673   \brief Redraws the CheckButton (if option has changed).
     674   Example: if new settings are loaded the Button must be redrawn for the GUI to display that Change
     675*/
    629676void CheckButton::redraw ()
    630677{
     
    635682
    636683/**
    637  * Creates a new Slider
    638  \param slidername The data-structure-name of the slider.
    639  \param start The minimal Value of the slider.
    640  \param end The maximal Value of the slider.
     684   \brief Creates a new Slider
     685   \param slidername The data-structure-name of the slider.
     686   \param start The minimal Value of the slider.
     687   \param end The maximal Value of the slider.
    641688*/
    642689Slider::Slider (char* slidername, int start, int end)
     
    649696
    650697/**
    651  * Destructs a Slider (not implemented yet)
    652  */
    653 Slider::~Slider()
    654 {
    655 }
    656 
    657 /**
    658  * Initializes a Slider with start and end Values
    659  * params: see Slider::Slider (char* slidername, int start, int end)
    660  */
     698   \brief Initializes a Slider with start and end Values
     699   params: see Slider::Slider (char* slidername, int start, int end)
     700*/
    661701void Slider::init(int start, int end)
    662702{
    663703  is_option = 2;
    664   value = 0;
    665   next = NULL;
    666   option_name = "";
    667   flag_name = "";
    668   flag_name_short = "";
    669   default_value = 0;
     704
     705  static_cast<Option*>(this)->init();
     706
    670707  widget = gtk_hscale_new_with_range (start, end, 5);
    671708}
    672709
    673710/**
    674  * Sets a new Title to the Slider
    675  \param title The new Name of the slider
     711   \brief Sets a new Title to the Slider
     712   \param title The new Name of the slider
    676713*/
    677714void Slider::setTitle(char* title)
    678715{
    679   option_name = title;
    680 }
    681 
    682 /**
    683  * Setting a new value to the Slider.
    684  * Maybe you also require a Slider::redraw() for this to display
    685  */
     716  label = title;
     717}
     718
     719/**
     720   \brief Setting a new value to the Slider.
     721   Maybe you also require a Slider::redraw() for this to display
     722*/
    686723void Slider::setValue(int value)
    687724{
     
    690727
    691728/**
    692  * Signal OptionChange writes the Value from the Slider to its Object-Database.
    693  \param widget The widget(Slider) that has a changed Value
    694  \param slider the Slider-Object that should receive the change.
    695  */
     729    \brief Signal OptionChange writes the Value from the Slider to its Object-Database.
     730    \param widget The widget(Slider) that has a changed Value
     731    \param slider the Slider-Object that should receive the change.
     732*/
    696733gint Slider::OptionChange (GtkWidget *widget, Widget* slider)
    697734{
    698735  static_cast<Slider*>(slider)->value = (int)gtk_range_get_value (GTK_RANGE ((Slider*)slider->widget));
    699736  flags->setTextFromFlags(orxonoxGUI);
    700   cout << static_cast<Slider*>(slider)->option_name << " set to: "<< static_cast<Slider*>(slider)->value << endl;
    701 }
    702 
    703 /**
    704  * Redraws the widget
    705  * Example: see void CheckButton::redraw ()
    706  */
     737  cout << static_cast<Slider*>(slider)->label << " set to: "<< static_cast<Slider*>(slider)->value << endl;
     738}
     739
     740/**
     741   \brief Redraws the widget
     742   Example: see void CheckButton::redraw ()
     743*/
    707744void Slider::redraw ()
    708745{
     
    713750
    714751/**
    715  * Creates a Menu-Item-list out of multiple input.
    716  * !! Consider, that the last input argument has to be "lastItem" for this to work!!
    717  \param menuname The Database-Name of this Menu
    718  \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
    719  */
     752    \brief Creates a Menu-Item-list out of multiple input.
     753   !! Consider, that the last input argument has to be "lastItem" for this to work!!
     754    \param menuname The Database-Name of this Menu
     755    \param ... items to be added to this Menu. !! Consider, that the last input argument has to be "lastItem" for this to work!!
     756*/
    720757Menu::Menu (char* menuname, ...)
    721758{
     
    737774
    738775/**
    739  * Initializes a new Menu with no items
    740  */
     776   \brief Initializes a new Menu with no items
     777*/
    741778void Menu::init(void)
    742779{
    743780  is_option = 2;
    744   value = 0;
    745   next = NULL;
    746   flag_name = "";
    747   flag_name_short = "";
    748   default_value = 0;
     781
     782  static_cast<Option*>(this)->init();
     783
    749784  widget = gtk_option_menu_new ();
    750785  menu = gtk_menu_new ();
     
    758793void Menu::setTitle(char* title)
    759794{
    760   option_name = title;
    761 }
    762 
    763 /**
    764  * appends a new Item to the Menu-List.
    765  \param itemName the itemName to be appendet.
     795  label = title;
     796}
     797
     798/**
     799   \brief appends a new Item to the Menu-List.
     800   \param itemName the itemName to be appendet.
    766801*/
    767802void Menu::addItem (char* itemName)
     
    772807
    773808/**
    774  * Signal OptionChange writes the Value from the Menu to its Object-Database.
    775  \param widget The widget(Menu) that has a changed Value
    776  \param menu the Menu-Object that should receive the change.
    777  */gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
     809    \brief Signal OptionChange writes the Value from the Menu to its Object-Database.
     810    \param widget The widget(Menu) that has a changed Value
     811    \param menu the Menu-Object that should receive the change.
     812*/
     813gint Menu::OptionChange (GtkWidget *widget, Widget* menu)
    778814{
    779815  static_cast<Menu*>(menu)->value = (int)gtk_option_menu_get_history (GTK_OPTION_MENU (menu->widget));
    780816  flags->setTextFromFlags(orxonoxGUI);
    781   cout << static_cast<Menu*>(menu)->option_name << " changed to : " << static_cast<Menu*>(menu)->value << endl;
    782 }
    783 
    784 /**
    785  * Redraws the widget
    786  * Example: see void CheckButton::redraw ()
     817  cout << static_cast<Menu*>(menu)->label << " changed to : " << static_cast<Menu*>(menu)->value << endl;
     818}
     819
     820/**
     821   \brief Redraws the widget
     822   Example: see void CheckButton::redraw ()
    787823 */
    788824void Menu::redraw ()
     
    792828
    793829/**
    794  * Creates a new default Label with no Text.
    795  * You migth consider adding Label::setTitle with this.
    796  */
     830   \brief Creates a new default Label with no Text.
     831   You migth consider adding Label::setTitle with this.
     832*/
    797833Label:: Label ()
    798834{
     
    801837
    802838/**
    803  * Creates a new Label with a Text.
    804  \param text The text to be displayed.
     839   \brief Creates a new Label with a Text.
     840   \param text The text to be displayed.
    805841*/
    806842Label:: Label (char* text)
    807843{
     844  this->init();
     845  this->setText(text);
     846}
     847
     848/**
     849   \brief initializes a new Label
     850*/
     851void Label::init(void)
     852{
    808853  is_option = 0;
    809   next = NULL;
    810   widget = gtk_label_new (text);
     854
     855  static_cast<Widget*>(this)->init();
     856
     857  widget = gtk_label_new ("");
    811858  gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
    812859}
    813860
    814 /**
    815  * Destructs a Label
    816  */
    817 Label::~Label ()
    818 {}
    819 
    820 /**
    821  * initializes a new Label
    822  */
    823 void Label::init(void)
    824 {
    825   is_option = 0;
    826   next = NULL;
    827   widget = gtk_label_new ("");
    828   gtk_widget_set_usize (widget, 260, 60);
    829   gtk_label_set_line_wrap (GTK_LABEL(widget), TRUE);
    830 }
    831 
    832 /**
    833  * Sets a new Text to a Label.
    834  \param text The text to be inserted into the Label.
    835  */
     861/**
     862   \brief Sets a new Text to a Label.
     863   \param text The text to be inserted into the Label.
     864*/
    836865void Label::setText (char * text)
    837866{
     867  label = text;
    838868  gtk_label_set_text (GTK_LABEL (this->widget), text);
    839869}
    840870
    841871/**
    842  * get the Text of a Label
    843  \return The Text the Label holds.
     872   \brief get the Text of a Label
     873   \return The Text the Label holds.
    844874*/
    845875char* Label::getText ()
  • orxonox/branches/buerli/gui/orxonox_gui.h

    r2595 r2707  
    77#define _ORXONOX_GUI_H
    88
     9#if HAVE_CONFIG_H
     10#include <config.h>
     11#endif
     12
    913#include <stdlib.h>
    10 #include <string.h>
    1114#include <gtk/gtkmain.h>
    1215#include <gtk/gtkwindow.h>
     
    3437
    3538//! This is the topmost object that can be displayed all others are derived from it.
    36 
    3739class Widget
    3840{
    3941 private:
    4042 public:
     43  ~Widget ();
     44
    4145  Widget* next; //!< next always points to the next Widget in the list. Every Widget has a next one, or has NULL as next
    4246  GtkWidget* widget; //!< widget is the gtk_widget that the specific Object Contains.
    43   virtual void init(void);
     47  void init(void);
    4448  int is_option; //!< with this Paramenter one can set the IsOption type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option
    45   enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2}; //!< defines is_option states
     49  /**
     50     \briefdefines is_option states
     51  */
     52  enum option { containerType = -2, boxType = -1, nothingType = 0, boolType = 1, intType = 2};
     53  char* label; //!< The name of the Widget. Some do display it, Options need it to save;
    4654  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4755  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
    4856  void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4957  void show ();
     58  void hide ();
     59  void setSize(int width, int height);
    5060
    5161  void walkThrough (void (*function)(Widget*));
     
    5565};
    5666
     67//! This is a Packer Object, which has the ability to Pack other Widgets into itself.
     68class Packer : public Widget
     69{
     70 public:
     71  Widget* down; //!< this points to the Widget below this.
     72  char* groupName; //!< For each Packer you can specify a Groupname under which the lowerWidgets will be saved.
     73
     74  void init(void);
     75  void setGroupName (char* name);
     76  char* getGroupName (void);
     77};
    5778
    5879//! This is a Container Class, it can contain one sub-Widget: down.
     
    6283 * The derived classes of Container can be displayed
    6384*/
    64 class Container : public Widget
     85class Container : public Packer
    6586{
    6687 private:
    6788  int borderwidth;
    6889  int policy;
    69   char* label;
    70  
    71  public:
    72   void init(void);
    73   Widget* down; //!< this points to the Widget below this.
     90 
     91 public:
     92  void init(void);
    7493  //  void setBorderWidth (int borderwidth);
    7594  //  virtual void setTitle (char* title) = 0;
     
    84103class Window : public Container
    85104{
     105 private:
     106  bool isOpen;
    86107 public:
    87108  Window (char* windowName);
    88109  Window (void);
    89   ~Window ();
    90110  void init ();
    91111 
     
    105125  Frame (char* frameName);
    106126  Frame (void);
    107   ~Frame ();
    108127  void init(void);
    109128 
     
    120139  EventBox (char* eventBoxName);
    121140  EventBox (void);
    122   ~EventBox ();
    123141  void init(void);
    124142 
     
    132150 * A Box is always filled left->right (horizontally) or up->down (vertically)
    133151 */
    134 class Box : public Widget
     152class Box : public Packer
    135153{
    136154 public:
    137155  Box (void);
    138156  Box (char boxtype);
    139   ~Box (void);
    140157  void init(char boxtype);
    141158
    142   Widget* down; //!< the Lower Widget of a Box.
    143159  void fill (Widget* lowerWidget);
    144160
     
    154170 public:
    155171  Image (char* imgaename);
    156   ~Image ();
    157172  void init(void);
    158173};
     
    169184
    170185  int value; //!< every option has a value either true or false (0,1) or something else like 25 for 25% of the volume
    171   char* option_name; //!< options have a name, that can be displayed around them
    172186  char* flag_name; //!< options have a flag name that will be appendet if you start the Program from the GUI.
    173187  char* flag_name_short; //!< like flag_name but shorter
     
    187201 public:
    188202  Button (char* buttonname);
    189   ~Button (void);
    190203  void init(void);
    191204
     
    202215 public:
    203216  CheckButton (char* buttonname);
    204   ~CheckButton (void);
    205217  static gint OptionChange (GtkWidget* widget, Widget* checkbutton);
    206218 
     
    219231 public:
    220232  Slider (char* slidername,int start, int end);
    221   ~Slider ();
    222233  void init(int start, int end);
    223234
     
    239250 public:
    240251  Menu (char* menuname, ...);
    241   ~Menu ();
    242252  void init(void);
    243253
     
    255265  Label ();
    256266  Label (char* text);
    257   ~Label ();
    258267  void init(void);
    259268 
  • orxonox/branches/buerli/gui/orxonox_gui_audio.cc

    r2595 r2707  
    3333  audioFrame = new Frame ("Audio-Options:");
    3434  audioBox = new Box ('v');
     35  audioFrame->setGroupName ("audio");
    3536 
    3637  enableSound = new CheckButton ("Disable Sound");
  • orxonox/branches/buerli/gui/orxonox_gui_banner.cc

    r2595 r2707  
    6363          logoEventBox = new EventBox();
    6464          logoBox = new Box('v');
    65           logoLabel = new Label("OrxOnoX");
     65          logoLabel = new Label("OrxOnoX, " PACKAGE_VERSION);
    6666          logoImage = new Image("banner.xpm");
    6767          logoEventBox->fill(logoImage);
     
    8888{
    8989  logoWindowIsOpen = 0;
    90   logoWindow->~Window();
     90  logoWindow->hide();
    9191}
    9292
  • orxonox/branches/buerli/gui/orxonox_gui_exec.cc

    r2595 r2707  
    3838  execFrame = new Frame ("Execute-Tags:");
    3939  execBox = new Box ('v');
     40  execFrame->setGroupName ("misc");
    4041 
    4142  start = new Button ("Start");
     
    109110  CONFIG_FILE = fopen (configFile, "w");
    110111  if (CONFIG_FILE)
    111     writeFileText (widget);
     112    writeFileText (widget, 0);
    112113  fclose (CONFIG_FILE);
    113114}
     
    116117   \brief Actually writes into the configuration file to the disk.
    117118   \param widget from which Widget on should be saved.
    118 */
    119 void OrxonoxGuiExec::writeFileText (Widget* widget)
    120 {
     119   \param depth initially "0", and grows higher, while new Groups are bundeled.
     120*/
     121void OrxonoxGuiExec::writeFileText (Widget* widget, int depth)
     122{
     123  int counter = 0;
     124  while (counter < depth && ((widget->is_option>0
     125                              && (strcmp (static_cast<Option*>(widget)->flag_name, "")
     126                                  || strcmp (static_cast<Option*>(widget)->flag_name_short, "")) )
     127                             || (widget->is_option<0
     128                                 && strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))))
     129    {
     130      fprintf (CONFIG_FILE, "  ", depth);
     131      counter++;
     132    }
     133 
     134  // check if it is a Packer, and if it is, check if it has a name and if there is something in it.
     135  if (widget->is_option <0)
     136    {
     137      if (strcmp (static_cast<Packer*>(widget)->getGroupName(), ""))
     138        {
     139          fprintf (CONFIG_FILE, "[%s]\n", static_cast<Packer*>(widget)->getGroupName());
     140          writeFileText (static_cast<Packer*>(widget)->down, depth+1);
     141          fprintf(CONFIG_FILE, "\n");
     142        }
     143      else
     144        {
     145          writeFileText (static_cast<Packer*>(widget)->down, depth);
     146        }
     147    }
     148 
    121149  if (widget->is_option >= 1)
    122150    if  (strcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, ""))
     
    124152        char Buffer[256];
    125153        char* space2under;
    126         sprintf (Buffer, "%s", static_cast<Option*>(widget)->option_name);
     154        sprintf (Buffer, "%s", static_cast<Option*>(widget)->label);
    127155        if (strchr (Buffer, '_'))
    128           cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl; 
     156          cout << "Warning Optionname" << Buffer << " is not Valid for Saving, because it includes an underscore" << endl;
    129157        while (space2under = strchr(Buffer, ' '))
    130158          {
     
    133161        fprintf (CONFIG_FILE, "%s = %i\n", Buffer, static_cast<Option*>(widget)->value);
    134162      }
    135   switch (widget->is_option)
    136     {
    137     case -1:
    138       writeFileText (static_cast<Container*>(widget)->down);
    139       break;
    140     case -2:
    141       writeFileText (static_cast<Box*>(widget)->down);
    142       break;
    143     }
    144  
     163
    145164  if (widget->next != NULL)
    146     writeFileText (widget->next);
     165    writeFileText (widget->next, depth);
    147166}
    148167
     
    156175  if (CONFIG_FILE)
    157176    {
     177      Widget* groupWidget = widget;
    158178      char Buffer[256] = "";
    159179      char Variable[256]= "";
     
    161181      while (fscanf (CONFIG_FILE, "%s", Buffer) != EOF)
    162182        {
     183          if (!strncmp (Buffer, "[", 1))
     184            {
     185              if ((groupWidget = locateGroup (widget, Buffer, 1))==NULL)
     186                {
     187                  cout << "!!There is no group called " << Buffer << " in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n";
     188                  groupWidget = widget;
     189                }
     190            }
    163191          if (!strcmp (Buffer, "="))
    164192            {
     
    171199              fscanf (CONFIG_FILE, "%s", Buffer);
    172200              Value = atoi(Buffer);
    173               readFileText (widget, Variable, Value);
     201              readFileText (groupWidget, Variable, Value, 0);
    174202              sprintf (Variable, "");
    175203            }
     
    179207    }
    180208}
    181 
    182209/**
    183210   \brief Maps Confugurations to the Options.
     
    185212   \param variableName the name of the Variable that should be set up.
    186213   \param variableValue the Value of the Variable that should be set up
    187 */
    188 void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue)
     214   \param depth the depth of the local Widget
     215*/
     216void OrxonoxGuiExec::readFileText (Widget* widget, char* variableName, int variableValue, int depth)
    189217{
    190218  if (widget->is_option >= 1)
    191     if (!strcmp (static_cast<Option*>(widget)->option_name, variableName))
     219    if (!strcmp (static_cast<Option*>(widget)->label, variableName))
    192220        static_cast<Option*>(widget)->value = variableValue;
    193221
    194   switch (widget->is_option)
    195     {
    196     case -1:
    197       readFileText (static_cast<Container*>(widget)->down, variableName, variableValue);
    198       break;
    199     case -2:
    200       readFileText (static_cast<Box*>(widget)->down, variableName, variableValue);
    201       break;
     222  if (widget->is_option < 0)
     223    {
     224      readFileText (static_cast<Packer*>(widget)->down, variableName, variableValue, depth+1);
    202225    }
    203226
    204   if (widget->next != NULL)
    205     readFileText (widget->next, variableName, variableValue);
     227  if (widget->next != NULL && depth !=0)
     228    readFileText (widget->next, variableName, variableValue, depth);
     229}
     230
     231/**
     232   \brief locates a Group member
     233*/
     234Widget* OrxonoxGuiExec::locateGroup(Widget* widget, char* groupName, int depth)
     235{
     236  Widget* tmp;
     237
     238  // removes the trailing and ending [ ].
     239  if (!strncmp (groupName, "[", 1))
     240    {
     241      groupName = groupName+1;
     242      groupName[strlen(groupName)-1] = '\0';
     243    }
     244
     245  if (widget->is_option < 0)
     246    {
     247      if (!strcmp(groupName, static_cast<Packer*>(widget)->getGroupName()))
     248        {
     249          return widget;
     250        }
     251      else
     252        {
     253          if ((tmp = locateGroup (static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL)
     254            return tmp;
     255        }
     256    }
     257 
     258  if (widget->next != NULL && depth != 0)
     259    {
     260      if ((tmp = locateGroup (widget->next, groupName, depth)) != NULL)
     261        return tmp;
     262    }
     263  return NULL;
    206264}
    207265
  • orxonox/branches/buerli/gui/orxonox_gui_exec.h

    r2595 r2707  
    3333  int shouldsave ();
    3434  void writeToFile (Widget* widget);
    35   void writeFileText (Widget* widget);
     35  void writeFileText (Widget* widget, int depth);
    3636  void readFromFile (Widget* widget);
    37   void readFileText (Widget* widget, char* variableName, int variableValue);
     37  void readFileText (Widget* widget, char* variableName, int variableValue, int depth);
     38  Widget* locateGroup(Widget* widget, char* groupName, int depth);
    3839
    3940};
  • orxonox/branches/buerli/gui/orxonox_gui_flags.cc

    r2595 r2707  
    3939
    4040  flagsLabel = new Label ();
     41  flagsLabel->setSize (260,60);
    4142  flagsBox->fill (flagsLabel);
    4243  shortFlags = new CheckButton ("shortFlags");
  • orxonox/branches/buerli/gui/orxonox_gui_video.cc

    r2595 r2707  
    3232  videoFrame = new Frame ("Video-Options:");
    3333  videoBox = new Box ('v');
     34  videoFrame->setGroupName("video");
    3435 
    3536  fullscreen = new CheckButton ("Fullscreen-mode");
  • orxonox/branches/buerli/src/Makefile.in

    r2685 r2707  
    1 # Makefile.in generated by automake 1.7.9 from Makefile.am.
     1# Makefile.in generated by automake 1.8.5 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
    5 # Free Software Foundation, Inc.
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004  Free Software Foundation, Inc.
    66# This Makefile.in is free software; the Free Software Foundation
    77# gives unlimited permission to copy and/or distribute it,
     
    1414
    1515@SET_MAKE@
     16
     17
     18SOURCES = $(orxonox_SOURCES)
    1619
    1720srcdir = @srcdir@
     
    2225pkgincludedir = $(includedir)/@PACKAGE@
    2326top_builddir = ..
    24 
    2527am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
    2628INSTALL = @INSTALL@
     
    3638PRE_UNINSTALL = :
    3739POST_UNINSTALL = :
     40bin_PROGRAMS = orxonox$(EXEEXT)
     41subdir = src
     42DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
     43        $(srcdir)/Makefile.in INSTALL
     44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
     45am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     46am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
     47        $(ACLOCAL_M4)
     48mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
     49CONFIG_HEADER = $(top_builddir)/config.h
     50CONFIG_CLEAN_FILES =
     51am__installdirs = "$(DESTDIR)$(bindir)"
     52binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     53PROGRAMS = $(bin_PROGRAMS)
     54am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) \
     55        player.$(OBJEXT) data_tank.$(OBJEXT) world_entity.$(OBJEXT) \
     56        vector.$(OBJEXT) camera.$(OBJEXT) collision.$(OBJEXT) \
     57        command_node.$(OBJEXT) ini_parser.$(OBJEXT) keynames.$(OBJEXT) \
     58        track.$(OBJEXT) base_entity.$(OBJEXT) IPhys.$(OBJEXT)
     59orxonox_OBJECTS = $(am_orxonox_OBJECTS)
     60orxonox_LDADD = $(LDADD)
     61DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
     62depcomp = $(SHELL) $(top_srcdir)/depcomp
     63am__depfiles_maybe = depfiles
     64@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po \
     65@AMDEP_TRUE@    ./$(DEPDIR)/base_entity.Po ./$(DEPDIR)/camera.Po \
     66@AMDEP_TRUE@    ./$(DEPDIR)/collision.Po \
     67@AMDEP_TRUE@    ./$(DEPDIR)/command_node.Po \
     68@AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \
     69@AMDEP_TRUE@    ./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \
     70@AMDEP_TRUE@    ./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \
     71@AMDEP_TRUE@    ./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
     72@AMDEP_TRUE@    ./$(DEPDIR)/world_entity.Po
     73CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     74        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     75CXXLD = $(CXX)
     76CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
     77        -o $@
     78SOURCES = $(orxonox_SOURCES)
     79DIST_SOURCES = $(orxonox_SOURCES)
     80HEADERS = $(noinst_HEADERS)
     81ETAGS = etags
     82CTAGS = ctags
     83DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    3884ACLOCAL = @ACLOCAL@
    3985AMDEP_FALSE = @AMDEP_FALSE@
     
    90136am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
    91137am__include = @am__include@
     138am__leading_dot = @am__leading_dot@
    92139am__quote = @am__quote@
    93140bindir = @bindir@
     
    103150localstatedir = @localstatedir@
    104151mandir = @mandir@
     152mkdir_p = @mkdir_p@
    105153oldincludedir = @oldincludedir@
    106154prefix = @prefix@
     
    112160AM_CXXFLAGS = "-I/usr/X11R6/include"
    113161AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
    114 
    115 
    116 #"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
    117 bin_PROGRAMS = orxonox
    118162orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc base_entity.cc IPhys.cc
    119 
    120163noinst_HEADERS = ability.h data_tank.h npc.h stdincl.h ai.h environment.h orxonox.h synchronisable.h base_entity.h error.h player.h track.h camera.h ini_parser.h power_up.h vector.h collision.h keynames.h proto_class.h world.h command_node.h list.h shoot_laser.h world_entity.h coordinates.h message_structures.h shoot_rocket.h IPhys.h
    121 subdir = src
    122 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    123 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    124 CONFIG_HEADER = $(top_builddir)/config.h
    125 CONFIG_CLEAN_FILES =
    126 bin_PROGRAMS = orxonox$(EXEEXT)
    127 PROGRAMS = $(bin_PROGRAMS)
    128 
    129 am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) player.$(OBJEXT) \
    130         data_tank.$(OBJEXT) world_entity.$(OBJEXT) vector.$(OBJEXT) \
    131         camera.$(OBJEXT) collision.$(OBJEXT) command_node.$(OBJEXT) \
    132         ini_parser.$(OBJEXT) keynames.$(OBJEXT) track.$(OBJEXT) \
    133         base_entity.$(OBJEXT) IPhys.$(OBJEXT)
    134 orxonox_OBJECTS = $(am_orxonox_OBJECTS)
    135 orxonox_LDADD = $(LDADD)
    136 orxonox_DEPENDENCIES =
    137 orxonox_LDFLAGS =
    138 
    139 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
    140 depcomp = $(SHELL) $(top_srcdir)/depcomp
    141 am__depfiles_maybe = depfiles
    142 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/IPhys.Po ./$(DEPDIR)/base_entity.Po \
    143 @AMDEP_TRUE@    ./$(DEPDIR)/camera.Po ./$(DEPDIR)/collision.Po \
    144 @AMDEP_TRUE@    ./$(DEPDIR)/command_node.Po \
    145 @AMDEP_TRUE@    ./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \
    146 @AMDEP_TRUE@    ./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \
    147 @AMDEP_TRUE@    ./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \
    148 @AMDEP_TRUE@    ./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
    149 @AMDEP_TRUE@    ./$(DEPDIR)/world_entity.Po
    150 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    151         $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
    152 CXXLD = $(CXX)
    153 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
    154         -o $@
    155 DIST_SOURCES = $(orxonox_SOURCES)
    156 HEADERS = $(noinst_HEADERS)
    157 
    158 DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.in INSTALL \
    159         Makefile.am
    160 SOURCES = $(orxonox_SOURCES)
    161 
    162164all: all-am
    163165
    164166.SUFFIXES:
    165167.SUFFIXES: .cc .o .obj
    166 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
     168$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
     169        @for dep in $?; do \
     170          case '$(am__configure_deps)' in \
     171            *$$dep*) \
     172              cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
     173                && exit 0; \
     174              exit 1;; \
     175          esac; \
     176        done; \
     177        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
    167178        cd $(top_srcdir) && \
    168179          $(AUTOMAKE) --gnu  src/Makefile
    169 Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
    170         cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
    171 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
     180.PRECIOUS: Makefile
     181Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     182        @case '$?' in \
     183          *config.status*) \
     184            cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
     185          *) \
     186            echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
     187            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
     188        esac;
     189
     190$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     191        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     192
     193$(top_srcdir)/configure:  $(am__configure_deps)
     194        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
     195$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
     196        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
    172197install-binPROGRAMS: $(bin_PROGRAMS)
    173198        @$(NORMAL_INSTALL)
    174         $(mkinstalldirs) $(DESTDIR)$(bindir)
     199        test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
    175200        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    176201          p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
     
    178203          ; then \
    179204            f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
    180            echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
    181            $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
     205           echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
     206           $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
    182207          else :; fi; \
    183208        done
     
    187212        @list='$(bin_PROGRAMS)'; for p in $$list; do \
    188213          f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
    189           echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
    190           rm -f $(DESTDIR)$(bindir)/$$f; \
     214          echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
     215          rm -f "$(DESTDIR)$(bindir)/$$f"; \
    191216        done
    192217
     
    198223
    199224mostlyclean-compile:
    200         -rm -f *.$(OBJEXT) core *.core
     225        -rm -f *.$(OBJEXT)
    201226
    202227distclean-compile:
     
    219244
    220245.cc.o:
    221 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    222 @am__fastdepCXX_TRUE@     -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
    223 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    224 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    225 @am__fastdepCXX_TRUE@   fi
     246@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
     247@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    226248@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    227249@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    228250@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    229 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
     251@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ $<
    230252
    231253.cc.obj:
    232 @am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
    233 @am__fastdepCXX_TRUE@     -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
    234 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
    235 @am__fastdepCXX_TRUE@   else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
    236 @am__fastdepCXX_TRUE@   fi
     254@am__fastdepCXX_TRUE@   if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
     255@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
    237256@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    238257@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
    239258@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    240 @am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
     259@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    241260uninstall-info-am:
    242 
    243 ETAGS = etags
    244 ETAGSFLAGS =
    245 
    246 CTAGS = ctags
    247 CTAGSFLAGS =
    248 
    249 tags: TAGS
    250261
    251262ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    257268               END { for (i in files) print i; }'`; \
    258269        mkid -fID $$unique
     270tags: TAGS
    259271
    260272TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    268280          $(AWK) '    { files[$$0] = 1; } \
    269281               END { for (i in files) print i; }'`; \
    270         test -z "$(ETAGS_ARGS)$$tags$$unique" \
    271           || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
    272              $$tags $$unique
    273 
     282        if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
     283          test -n "$$unique" || unique=$$empty_fix; \
     284          $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
     285            $$tags $$unique; \
     286        fi
    274287ctags: CTAGS
    275288CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     
    294307distclean-tags:
    295308        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
    296 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    297 
    298 top_distdir = ..
    299 distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
    300309
    301310distdir: $(DISTFILES)
     
    311320          if test "$$dir" != "$$file" && test "$$dir" != "."; then \
    312321            dir="/$$dir"; \
    313             $(mkinstalldirs) "$(distdir)$$dir"; \
     322            $(mkdir_p) "$(distdir)$$dir"; \
    314323          else \
    315324            dir=''; \
     
    329338check: check-am
    330339all-am: Makefile $(PROGRAMS) $(HEADERS)
    331 
    332340installdirs:
    333         $(mkinstalldirs) $(DESTDIR)$(bindir)
     341        for dir in "$(DESTDIR)$(bindir)"; do \
     342          test -z "$$dir" || $(mkdir_p) "$$dir"; \
     343        done
    334344install: install-am
    335345install-exec: install-exec-am
     
    370380dvi-am:
    371381
     382html: html-am
     383
    372384info: info-am
    373385
     
    405417.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
    406418        clean-generic ctags distclean distclean-compile \
    407         distclean-generic distclean-tags distdir dvi dvi-am info \
    408         info-am install install-am install-binPROGRAMS install-data \
    409         install-data-am install-exec install-exec-am install-info \
    410         install-info-am install-man install-strip installcheck \
    411         installcheck-am installdirs maintainer-clean \
     419        distclean-generic distclean-tags distdir dvi dvi-am html \
     420        html-am info info-am install install-am install-binPROGRAMS \
     421        install-data install-data-am install-exec install-exec-am \
     422        install-info install-info-am install-man install-strip \
     423        installcheck installcheck-am installdirs maintainer-clean \
    412424        maintainer-clean-generic mostlyclean mostlyclean-compile \
    413425        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
  • orxonox/branches/buerli/src/camera.cc

    r2551 r2707  
    2727   This standard constructor sets all parameters to zero
    2828*/
    29 Camera::Camera ()
    30 {
     29Camera::Camera (World* world)
     30{
     31  this->world = world;
    3132  bound = NULL;
    3233  /* give it some physical live */
     
    3637  fs = new Vector(0.0, 0.0, 0.0);
    3738  cameraMode = NORMAL;
    38 
    3939  deltaTime = 3000.0;
    4040  cameraOffset = 1.0;
     
    179179      /* the camera is handled like an entity and rolls on the track */
    180180    case NORMAL:
    181       Orxonox *orx = Orxonox::getInstance();
    182181      Location lookat; 
    183       if( bound != NULL)
     182      if( bound != NULL && world != NULL )
    184183        {
    185184          bound->get_lookat (&lookat);
    186           orx->get_world()->calc_camera_pos (&lookat, &desired_place);
     185          world->calc_camera_pos (&lookat, &desired_place);
    187186        }
    188187      else
     
    293292    }
    294293}
     294
     295
     296void Camera::setWorld(World* world)
     297{
     298  this->world = world;
     299}
  • orxonox/branches/buerli/src/camera.h

    r2551 r2707  
    1010
    1111class WorldEntity;
     12class World;
    1213
    1314//! Camera
    1415/**
    15         This class controls the viewpoint from which the World is rendered. To use the
    16         Camera it has to be bound to a WorldEntity which serves as the reference focus
    17         point. The Camera itself calls the WorldEntity::get_lookat() and
    18         World::calc_camera_pos() functions to calculate the position it currently should
    19         be in.
     16   This class controls the viewpoint from which the World is rendered. To use the
     17   Camera it has to be bound to a WorldEntity which serves as the reference focus
     18   point. The Camera itself calls the WorldEntity::get_lookat() and
     19   World::calc_camera_pos() functions to calculate the position it currently should
     20   be in.
    2021*/
    2122
     
    2728  Placement actual_place;               //!< the Camera's current position
    2829  Placement desired_place;        //!< where the Camera should be according to calculations
     30  World* world;
    2931 
    3032  /* physical system - not needed yet */
     
    4951  Quaternion *res;
    5052 
     53 
     54  CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
     55 
     56  void update_desired_place ();
     57 
     58 public:
     59  Camera (World* world);
     60  ~Camera ();
     61 
     62  void time_slice (Uint32 deltaT);
     63  void apply ();
     64  void bind (WorldEntity* entity);
     65  void jump (Placement* plc);
    5166
    52   CAMERA_MODE cameraMode; //!< saves the camera mode: how the camera follows the entity
    53 
    54         void update_desired_place ();
    55        
    56  public:
    57   Camera ();
    58   ~Camera ();
    59 
    60         void time_slice (Uint32 deltaT);
    61         void apply ();
    62         void bind (WorldEntity* entity);
    63         void jump (Placement* plc);
     67  void setWorld(World* world); 
    6468
    6569};
  • orxonox/branches/buerli/src/command_node.cc

    r2551 r2707  
    1919#include "ini_parser.h"
    2020#include "world_entity.h"
     21#include "game_loader.h"
    2122
    2223#include <stdio.h>
     
    2728
    2829/**
    29         \brief constructs a CommandNode to handle remote input
    30         \param ID: unique denumerator to identify the node in the network
     30   \brief constructs a CommandNode to handle remote input
     31   \param ID: unique denumerator to identify the node in the network
    3132*/
    3233CommandNode::CommandNode (int ID)
    3334{
    34         bound = new List<WorldEntity>();
    35         aliases = NULL;
    36         netID = ID;
    37         bLocalInput = false;
    38 }
    39 
    40 /**
    41         \brief constructs a CommandNode to handle local input
    42         \param filename: The path and name of the file to load the key bindings from
     35  bound = new List<WorldEntity>();
     36  aliases = NULL;
     37  netID = ID;
     38  bLocalInput = false;
     39}
     40
     41/**
     42   \brief constructs a CommandNode to handle local input
     43   \param filename: The path and name of the file to load the key bindings from
    4344*/
    4445CommandNode::CommandNode (char* filename = DEFAULT_KEYBIND_FILE)
    4546{
    46         aliases = NULL;
    47         bLocalInput = true;
    48         netID = 0;
    49         bound = new List<WorldEntity>();
    50         load_bindings (filename);
    51 }
    52 
    53 /**
    54         \brief removes the CommandNode from memory
     47  aliases = NULL;
     48  bLocalInput = true;
     49  netID = 0;
     50  bound = new List<WorldEntity>();
     51  load_bindings (filename);
     52}
     53
     54/**
     55   \brief removes the CommandNode from memory
    5556*/
    5657CommandNode::~CommandNode ()
    5758{
    58         if( aliases != NULL) free (aliases);
    59         if( bound != NULL) delete bound;
    60 }
    61 
    62 /**
    63         \brief loads new key bindings from a file
    64         \param filename: The path and name of the file to load the bindings from
     59  if( aliases != NULL) free (aliases);
     60  if( bound != NULL) delete bound;
     61}
     62
     63/**
     64   \brief loads new key bindings from a file
     65   \param filename: The path and name of the file to load the bindings from
    6566*/
    6667void CommandNode::load_bindings (char* filename)
    6768{
    68         FILE* stream;
    69        
    70         printf("Loading key bindings from %s\n", filename);
    71        
    72         if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
    73        
    74                 // remove old bindings if present
    75         if( aliases != NULL)
     69  FILE* stream;
     70 
     71  printf("Loading key bindings from %s\n", filename);
     72 
     73  if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
     74 
     75  // remove old bindings if present
     76  if( aliases != NULL)
     77    {
     78      free (aliases);
     79      aliases = NULL;
     80    }
     81 
     82  // create parser
     83  IniParser parser (filename);
     84  if( parser.get_section ("Bindings") == -1)
     85    {
     86      printf("Could not find key bindings in %s\n", filename);
     87      return;
     88    }
     89  // allocate empty lookup table
     90  aliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
     91 
     92  char namebuf[256];
     93  char valuebuf[256];
     94  memset (namebuf, 0, 256);
     95  memset (valuebuf, 0, 256);
     96  int* index;
     97 
     98  while( parser.next_var (namebuf, valuebuf) != -1)
     99    {
     100      index = name_to_index (namebuf);
     101      switch( index[0])
    76102        {
    77                 free (aliases);
    78                 aliases = NULL;
     103        case 0:
     104          printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
     105          strcpy (aliases->keys[index[1]], valuebuf);
     106          break;
     107        case 1:
     108          printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
     109          strcpy (aliases->buttons[index[1]], valuebuf);
     110          break;
     111        default:
     112          break;
    79113        }
    80                        
    81                 // create parser
    82         IniParser parser (filename);
    83         if( parser.get_section ("Bindings") == -1)
     114      memset (namebuf, 0, 256);
     115      memset (valuebuf, 0, 256);
     116    }
     117}
     118
     119/**
     120   \brief binds a WorldEntity to the CommandNode
     121   \param entity: Pointer to the entity to bind
     122*/
     123void CommandNode::bind (WorldEntity* entity)
     124{
     125  bound->add (entity, LIST_ADD_NEXT, true);
     126}
     127
     128/**
     129   \brief removes an entity from the list of the CommandNode
     130   \param entity: Pointer to the entity to relese
     131*/
     132void CommandNode::unbind (WorldEntity* entity)
     133{
     134  bound->remove (entity, LIST_FIND_FW);
     135}
     136
     137int* CommandNode::name_to_index (char* name)
     138{
     139  coord[0] = -1;
     140  coord[1] = -1;
     141  int c;
     142  if( (c = keyname_to_SDLK (name)) != -1)
     143    {
     144      coord[1] = c;
     145      coord[0] = 0;
     146    }
     147  if( (c = buttonname_to_SDLB (name)) != -1)
     148    {
     149      coord[1] = c;
     150      coord[0] = 1;
     151    }
     152  return coord;
     153}
     154
     155/**
     156   \brief tells the CommandNode to run through all pending events and relay them accordingly
     157*/
     158void CommandNode::process ()
     159{
     160  if( bLocalInput) process_local ();
     161  else process_network ();
     162}
     163
     164void CommandNode::process_local ()
     165{
     166  SDL_Event event;
     167  Command cmd;
     168 
     169  while( SDL_PollEvent (&event))
     170    {
     171      memset (cmd.cmd, 0, CMD_LENGHT);
     172      switch( event.type)
    84173        {
    85                 printf("Could not find key bindings in %s\n", filename);
    86                 return;
     174        case SDL_KEYDOWN:
     175          strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
     176          cmd.bUp = false;
     177          if( strlen (cmd.cmd) > 0) relay (&cmd);
     178          break;
     179        case SDL_KEYUP:
     180          strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
     181          cmd.bUp = true;
     182          if( strlen (cmd.cmd) > 0) relay (&cmd);
     183          break;
     184        case SDL_MOUSEMOTION:
     185          strcpy( cmd.cmd, "cursor");
     186          cmd.x = event.motion.x;
     187          cmd.y = event.motion.y;
     188          cmd.xrel = event.motion.xrel;
     189          cmd.yrel = event.motion.yrel;
     190          break;
     191        case SDL_MOUSEBUTTONUP:
     192          strcpy( cmd.cmd, aliases->buttons[event.button.button]);
     193          cmd.bUp = true;
     194          if( strlen (cmd.cmd) > 0) relay (&cmd);
     195          break;
     196        case SDL_MOUSEBUTTONDOWN:
     197          strcpy( cmd.cmd, aliases->buttons[event.button.button]);
     198          cmd.bUp = false;
     199          if( strlen (cmd.cmd) > 0) relay (&cmd);
     200          break;
     201        case SDL_JOYAXISMOTION:
     202        case SDL_JOYBALLMOTION:
     203        case SDL_JOYHATMOTION:
     204        case SDL_JOYBUTTONDOWN:
     205        case SDL_JOYBUTTONUP:
     206          break;
     207        default:
     208          Orxonox *orx = Orxonox::getInstance();
     209          orx->event_handler (&event);
     210         
     211          break;
    87212        }
    88                         // allocate empty lookup table
    89         aliases = (KeyBindings*) calloc (1, sizeof (KeyBindings));
    90        
    91         char namebuf[256];
    92         char valuebuf[256];
    93         memset (namebuf, 0, 256);
    94         memset (valuebuf, 0, 256);
    95         int* index;
    96 
    97         while( parser.next_var (namebuf, valuebuf) != -1)
    98         {
    99                 index = name_to_index (namebuf);
    100                 switch( index[0])
    101                 {
    102                         case 0:
    103                                 printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
    104                                 strcpy (aliases->keys[index[1]], valuebuf);
    105                                 break;
    106                         case 1:
    107                                 printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
    108                                 strcpy (aliases->buttons[index[1]], valuebuf);
    109                                 break;
    110                         default:
    111                                 break;
    112                 }
    113                 memset (namebuf, 0, 256);
    114                 memset (valuebuf, 0, 256);
    115         }
    116 }
    117 
    118 /**
    119         \brief binds a WorldEntity to the CommandNode
    120         \param entity: Pointer to the entity to bind
    121 */
    122 void CommandNode::bind (WorldEntity* entity)
    123 {
    124         bound->add (entity, LIST_ADD_NEXT, true);
    125 }
    126 
    127 /**
    128         \brief removes an entity from the list of the CommandNode
    129         \param entity: Pointer to the entity to relese
    130 */
    131 void CommandNode::unbind (WorldEntity* entity)
    132 {
    133         bound->remove (entity, LIST_FIND_FW);
    134 }
    135 
    136 int* CommandNode::name_to_index (char* name)
    137 {
    138         coord[0] = -1;
    139         coord[1] = -1;
    140         int c;
    141         if( (c = keyname_to_SDLK (name)) != -1)
    142         {
    143                 coord[1] = c;
    144                 coord[0] = 0;
    145         }
    146         if( (c = buttonname_to_SDLB (name)) != -1)
    147         {
    148                 coord[1] = c;
    149                 coord[0] = 1;
    150         }
    151         return coord;
    152 }
    153 
    154 /**
    155         \brief tells the CommandNode to run through all pending events and relay them accordingly
    156 */
    157 void CommandNode::process ()
    158 {
    159         if( bLocalInput) process_local ();
    160         else process_network ();
    161 }
    162 
    163 void CommandNode::process_local ()
    164 {
    165         SDL_Event event;
    166         Command cmd;
    167        
    168         while( SDL_PollEvent (&event))
    169         {
    170                 memset (cmd.cmd, 0, CMD_LENGHT);
    171                 switch( event.type)
    172                 {
    173                         case SDL_KEYDOWN:
    174                                 strcpy (cmd.cmd, aliases->keys[event.key.keysym.sym]);
    175                                 cmd.bUp = false;
    176                                 if( strlen (cmd.cmd) > 0) relay (&cmd);
    177                                 break;
    178                         case SDL_KEYUP:
    179                                 strcpy( cmd.cmd, aliases->keys[event.key.keysym.sym]);
    180                                 cmd.bUp = true;
    181                                 if( strlen (cmd.cmd) > 0) relay (&cmd);
    182                                 break;
    183                         case SDL_MOUSEMOTION:
    184                                 strcpy( cmd.cmd, "cursor");
    185                                 cmd.x = event.motion.x;
    186                                 cmd.y = event.motion.y;
    187                                 cmd.xrel = event.motion.xrel;
    188                                 cmd.yrel = event.motion.yrel;
    189                                 break;
    190                         case SDL_MOUSEBUTTONUP:
    191                                 strcpy( cmd.cmd, aliases->buttons[event.button.button]);
    192                                 cmd.bUp = true;
    193                                 if( strlen (cmd.cmd) > 0) relay (&cmd);
    194                                 break;
    195                         case SDL_MOUSEBUTTONDOWN:
    196                                 strcpy( cmd.cmd, aliases->buttons[event.button.button]);
    197                                 cmd.bUp = false;
    198                                 if( strlen (cmd.cmd) > 0) relay (&cmd);
    199                                 break;
    200                         case SDL_JOYAXISMOTION:
    201                         case SDL_JOYBALLMOTION:
    202                         case SDL_JOYHATMOTION:
    203                         case SDL_JOYBUTTONDOWN:
    204                         case SDL_JOYBUTTONUP:
    205                                 break;
    206                         default:
    207                                 Orxonox *orx = Orxonox::getInstance();
    208                                 orx->event_handler (&event);
    209                                 break;
    210                 }
    211         }
     213    }
    212214}
    213215
     
    219221void CommandNode::relay (Command* cmd)
    220222{
    221 printf("CommandNode|relay()\n");
    222         List<WorldEntity>* plist = bound;
    223        
    224         Orxonox *orx = Orxonox::getInstance();
    225         if( orx->system_command (cmd)) return;
    226                
    227         if( bLocalInput) send_over_network (cmd);
    228        
    229         while( (plist = plist->get_next()) != NULL)
    230         {
    231                 plist->get_object()->command (cmd);
    232         }
    233 }
    234 
    235 /**
    236         \brief sets the network identifier of the CommandNode
    237         \param ID: the new ID to use
     223  //printf("CommandNode|relay()\n");
     224  List<WorldEntity>* plist = bound;
     225 
     226  Orxonox *orx = Orxonox::getInstance();
     227  if( orx->system_command (cmd)) return;
     228  GameLoader* gl = GameLoader::getInstance();
     229  if(gl->worldCommand(cmd)) return;
     230 
     231  if( bLocalInput) send_over_network (cmd);
     232 
     233  while( (plist = plist->get_next()) != NULL)
     234    {
     235      plist->get_object()->command (cmd);
     236    }
     237}
     238
     239/**
     240   \brief sets the network identifier of the CommandNode
     241   \param ID: the new ID to use
    238242*/
    239243void CommandNode::set_netID (int ID)
    240244{
    241         netID = ID;
     245  netID = ID;
    242246}
    243247
  • orxonox/branches/buerli/src/error.h

    r2551 r2707  
    2222*/
    2323
     24// this are the two undefined error nr. Don't use them ...
     25#define ERROR -1
     26#define NERROR 0
    2427
    25 #define ERROR -1
    26 #define NO_ERROR 0
     28/*!
     29    \brief Error Definitions:
     30
     31    Error Classes:
     32    0xx application framework codes
     33    1xx graphics codes
     34    2xx file/FS codes
     35    3xx network codes
     36    4xx general codes
     37
     38    Error Specifier 1:
     39    x0x action finsished as desired
     40    x1x initialisation error
     41    x2x execution error
     42    x3x uninitialisation error
     43
     44    Error Specifier 2:
     45    xx0 no further informations
     46    xx1 only a warning - feel free to ignore, the program will proceed
     47    xx2 this could lead unexpected behaviour
     48    xx3 this is a fatal error - you are invited to quit the program - panic!
     49*/
     50
     51typedef struct
     52{
     53  int code;
     54  char* message;
     55  char* location;
     56} Error;
  • orxonox/branches/buerli/src/list.h

    r2077 r2707  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific:
     12   main-programmer: Christian Meyer
     13
     14   ADDONS/FIXES:
     15 
     16   Patrick Boenzli     :          Implemented getSize() function
     17*/
     18
     19
    120/*!
    221  \file list.h
     
    2140  List<T>* prev;
    2241  bool bReference;
     42  int size;
    2343 
    2444 public:
     
    3555  void set_prev (List<T>* ptr);
    3656  int remove (T* obj, FINDMODE mode);
     57  int getSize();
    3758};
    3859
     
    5273  prev = p;
    5374  bReference = bRef;
     75  if(obj != NULL)
     76    ++size;
    5477}
    5578
     
    127150      break;
    128151  }
     152  ++size;
    129153  return 0;
    130154}
     
    224248    }
    225249  }
     250  --size;
    226251  return 0;
    227252}
     
    262287
    263288
     289/**
     290  \brief Returns the current size of the List
     291  \return Size of List
     292*/
     293template<class T>
     294int List<T>::getSize()
     295{
     296  return this->size;
     297}
    264298
    265299#endif
  • orxonox/branches/buerli/src/orxonox.cc

    r2551 r2707  
    2929#include "data_tank.h"
    3030#include "command_node.h"
     31#include "game_loader.h"
    3132#include <string.h>
    3233
     
    3435
    3536/**
    36         \brief create a new Orxonox
     37   \brief create a new Orxonox
    3738*/
    3839Orxonox::Orxonox ()
     
    4243
    4344/**
    44         \brief remove Orxonox from memory
     45   \brief remove Orxonox from memory
    4546*/
    4647Orxonox::~Orxonox ()
    4748{
    48         Orxonox::singleton_ref = NULL;
    49         if( world != NULL) delete world;
    50         if( localinput != NULL) delete world;
    51         if( localcamera != NULL) delete localcamera;
    52         if( resources != NULL) delete resources;
     49  Orxonox::singleton_ref = NULL;
     50  if( world != NULL) delete world;
     51  if( localinput != NULL) delete world;
     52  if( localcamera != NULL) delete localcamera;
     53  if( resources != NULL) delete resources;
    5354}
    5455
     
    6566
    6667/**
    67         \brief this finds the config file
    68        
    69         Since the config file varies from user to user and since one may want to specify different config files
    70         for certain occasions or platforms this function finds the right config file for every occasion and stores
    71         it's path and name into configfilename
     68   \brief this finds the config file
     69   
     70   Since the config file varies from user to user and since one may want to specify different config files
     71   for certain occasions or platforms this function finds the right config file for every occasion and stores
     72   it's path and name into configfilename
    7273*/
    7374void Orxonox::get_config_file (int argc, char** argv)
    7475{
    75 /*      char* path;
    76         #ifdef __WIN32__
    77         path = getenv("");
    78         #else
    79         path = getenv("HOME");
    80         #endif
    81        
    82         if( path != NULL) strcpy (configfilename, path);
    83         else strcpy (configfilename, "./");
    84         strcat (configfilename, "/.orxonox.conf");*/
    85        
    86         strcpy (configfilename, "orxonox.conf");
    87 }
    88 
    89 /**
    90         \brief initialize Orxonox with command line
     76  /*    char* path;
     77    #ifdef __WIN32__
     78    path = getenv("");
     79    #else
     80    path = getenv("HOME");
     81    #endif
     82   
     83    if( path != NULL) strcpy (configfilename, path);
     84    else strcpy (configfilename, "./");
     85    strcat (configfilename, "/.orxonox.conf");*/
     86 
     87  strcpy (configfilename, "orxonox.conf");
     88}
     89
     90/**
     91   \brief initialize Orxonox with command line
    9192*/
    9293int Orxonox::init (int argc, char** argv)
    9394{
    94                 // parse command line
    95                 // config file
    96                
    97         get_config_file (argc, argv);
    98        
    99                 // initialize SDL
     95  // parse command line
     96  // config file
     97 
     98  get_config_file (argc, argv);
     99 
     100  // initialize SDL
    100101  printf("> Initializing SDL\n");
    101102  if( SDL_Init (SDL_INIT_EVERYTHING) == -1)
    102   {
    103     printf ("Could not SDL_Init(): %s\n", SDL_GetError());
    104     return -1;
    105   }
    106  
    107         // initialize everything
     103    {
     104      printf ("Could not SDL_Init(): %s\n", SDL_GetError());
     105      return -1;
     106    }
     107 
     108  // initialize everything
    108109  printf("> Initializing video\n");
    109         if( init_video () == -1) return -1;
     110  if( init_video () == -1) return -1;
    110111  printf("> Initializing sound\n");
    111         if( init_sound () == -1) return -1;
     112  if( init_sound () == -1) return -1;
    112113  printf("> Initializing input\n");
    113         if( init_input () == -1) return -1;
     114  if( init_input () == -1) return -1;
    114115  printf("> Initializing networking\n");
    115         if( init_networking () == -1) return -1;
     116  if( init_networking () == -1) return -1;
    116117  printf("> Initializing resources\n");
    117         if( init_resources () == -1) return -1;
    118   printf("> Initializing world\n");
    119         if( init_world () == -1) return -1;
    120        
    121         return 0;
    122 }
    123 
    124 /**
    125         \brief initializes SDL and OpenGL
     118  if( init_resources () == -1) return -1;
     119  //printf("> Initializing world\n");
     120  //if( init_world () == -1) return -1; PB: world will be initialized when started
     121 
     122  return 0;
     123}
     124
     125/**
     126   \brief initializes SDL and OpenGL
    126127*/
    127128int Orxonox::init_video ()
     
    161162 
    162163  // create camera
    163   localcamera = new Camera();
    164  
    165   return 0;
    166 }
    167 
    168 /**
    169         \brief initializes the sound engine
     164  localcamera = new Camera(world);
     165 
     166  return 0;
     167}
     168
     169/**
     170   \brief initializes the sound engine
    170171*/
    171172int Orxonox::init_sound ()
    172173{
    173         printf("Not yet implemented\n");
    174         return 0;
    175 }
    176 
    177 /**
    178         \brief initializes input functions
     174  printf("Not yet implemented\n");
     175  return 0;
     176}
     177
     178/**
     179   \brief initializes input functions
    179180*/
    180181int Orxonox::init_input ()
    181182{
    182         // create localinput
    183         localinput = new CommandNode( configfilename);
    184        
    185         return 0;
    186 }
    187 
    188 /**
    189         \brief initializes network system
     183  // create localinput
     184  localinput = new CommandNode( configfilename);
     185 
     186  return 0;
     187}
     188
     189/**
     190   \brief initializes network system
    190191*/
    191192int Orxonox::init_networking ()
    192193{
    193         printf("Not yet implemented\n");
    194         return 0;
    195 }
    196 
    197 /**
    198         \brief initializes and loads resource files
     194  printf("Not yet implemented\n");
     195  return 0;
     196}
     197
     198/**
     199   \brief initializes and loads resource files
    199200*/
    200201int Orxonox::init_resources ()
    201202{
    202         printf("Not yet implemented\n");
    203         return 0;
    204 }
    205 
    206 /**
    207         \brief initializes the world
     203  printf("Not yet implemented\n");
     204  return 0;
     205}
     206
     207/**
     208   \brief initializes the world
    208209*/
    209210int Orxonox::init_world ()
    210211{
    211         world = new World();
    212        
    213         // TO DO: replace this with a menu/intro
    214         world->load_debug_level();
    215        
    216         return 0;
    217 }
    218 
    219 /**
    220         \brief exits Orxonox
     212  //world = new World();
     213 
     214  // TO DO: replace this with a menu/intro
     215  //world->load_debug_level();
     216 
     217  return 0;
     218}
     219
     220
     221/**
     222   \brief starts the orxonox game or menu
     223
     224   here is the central orxonox state manager. There are currently two states
     225   - menu
     226   - game-play
     227   both states manage their states themselfs again.
     228*/
     229void Orxonox::start()
     230{
     231 
     232  this->gameLoader = GameLoader::getInstance();
     233  this->gameLoader->loadDebugCampaign(DEBUG_CAMPAIGN_0);
     234  this->gameLoader->init();
     235  this->gameLoader->start();
     236}
     237
     238/**
     239   \brief exits Orxonox
    221240*/
    222241void Orxonox::quitGame()
    223242{
    224         bQuitOrxonox = true;
    225 }
    226 
    227 /**
    228         \brief this runs all of Orxonox
     243  bQuitOrxonox = true;
     244}
     245
     246/**
     247   \brief this runs all of Orxonox
    229248*/
    230249void Orxonox::mainLoop()
     
    236255  while( !bQuitOrxonox)
    237256    {
    238       printf("<==");
    239 
    240257      // Network
    241258      synchronize();
     
    248265      // Draw
    249266      display();
    250 
    251       printf(">\n");
    252267    }
    253268  printf("Orxonox|Exiting the main loop\n");
     
    255270
    256271/**
    257         \brief handles sprecial events from localinput
    258         \param event: an event not handled by the CommandNode
     272   \brief handles sprecial events from localinput
     273   \param event: an event not handled by the CommandNode
    259274*/
    260275void Orxonox::event_handler (SDL_Event* event)
    261276{
    262         // Handle special events such as reshape, quit, focus changes
    263 }
    264 
    265 /**
    266         \brief synchronize local data with remote data
     277  // Handle special events such as reshape, quit, focus changes
     278}
     279
     280/**
     281   \brief synchronize local data with remote data
    267282*/
    268283void Orxonox::synchronize ()
    269284{
    270         // Get remote input
    271         // Update synchronizables
    272 }
    273 
    274 /**
    275         \brief run all input processing
     285  // Get remote input
     286  // Update synchronizables
     287}
     288
     289/**
     290   \brief run all input processing
    276291*/
    277292void Orxonox::handle_input ()
    278293{
    279         // localinput
    280                 localinput->process();
    281         // remoteinput
    282 }
    283 
    284 /**
    285         \brief advance the timeline
     294  // localinput
     295  localinput->process();
     296  // remoteinput
     297}
     298
     299/**
     300   \brief advance the timeline
    286301*/
    287302void Orxonox::time_slice ()
     
    295310        {
    296311          float fps = 1000/dt;
    297           printf("%f", fps);
     312          printf("fps = %f\n", fps);
    298313        }
    299314     
     
    306321
    307322/**
    308         \brief compute collision detection
     323   \brief compute collision detection
    309324*/
    310325void Orxonox::collision ()
    311326{
    312         world->collide ();
    313 }
    314 
    315 /**
    316         \brief handle keyboard commands that are not meant for WorldEntities
    317         \param cmd: the command to handle
    318         \return true if the command was handled by the system or false if it may be passed to the WorldEntities
     327  world->collide ();
     328}
     329
     330/**
     331   \brief handle keyboard commands that are not meant for WorldEntities
     332   \param cmd: the command to handle
     333   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
    319334*/
    320335bool Orxonox::system_command (Command* cmd)
    321336{
    322         if( !strcmp( cmd->cmd, "quit"))
    323         {
    324                 if( !cmd->bUp) bQuitOrxonox = true;
    325                 return true;
    326         }
    327         return false;
    328 }
    329 
    330 /**
    331         \brief render the current frame
     337  if( !strcmp( cmd->cmd, "quit"))
     338    {
     339      if( !cmd->bUp) this->gameLoader->stop();
     340      return true;
     341    }
     342  return false;
     343}
     344
     345/**
     346   \brief render the current frame
    332347*/
    333348void Orxonox::display ()
    334349{
    335                 // clear buffer
    336         glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
    337                 // set camera
    338         localcamera->apply ();
    339                 // draw world
    340         world->draw ();
    341                 // draw HUD
    342                 // flip buffers
    343         SDL_GL_SwapBuffers();
    344 }
    345 
    346 /**
    347         \brief retrieve a pointer to the local Camera
    348         \return a pointer to localcamera
     350  // clear buffer
     351  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
     352  // set camera
     353  localcamera->apply ();
     354  // draw world
     355  world->draw ();
     356  // draw HUD
     357  // flip buffers
     358  SDL_GL_SwapBuffers();
     359}
     360
     361/**
     362   \brief retrieve a pointer to the local Camera
     363   \return a pointer to localcamera
    349364*/
    350365Camera* Orxonox::get_camera ()
    351366{
    352         return localcamera;
    353 }
    354 
    355 /**
    356         \brief retrieve a pointer to the local CommandNode
    357         \return a pointer to localinput
     367  return localcamera;
     368}
     369
     370/**
     371   \brief retrieve a pointer to the local CommandNode
     372   \return a pointer to localinput
    358373*/
    359374CommandNode* Orxonox::get_localinput ()
    360375{
    361         return localinput;
    362 }
    363 
    364 /**
    365         \brief retrieve a pointer to the local World
    366         \return a pointer to world
     376  return localinput;
     377}
     378
     379/**
     380   \brief retrieve a pointer to the local World
     381   \return a pointer to world
    367382*/
    368383World* Orxonox::get_world ()
    369384{
    370         return world;
     385  return world;
    371386}
    372387
    373388int main (int argc, char** argv)
    374389
    375         printf(">>> Starting Orxonox <<<\n");
     390  printf(">>> Starting Orxonox <<<\n");
    376391  Orxonox *orx = Orxonox::getInstance();
    377392 
    378393  if( (*orx).init(argc, argv) == -1)
    379   {
    380     printf("! Orxonox initialization failed\n");
    381     return -1;
    382   }
    383        
    384   (*orx).mainLoop();
    385 
     394    {
     395      printf("! Orxonox initialization failed\n");
     396      return -1;
     397    }
     398 
     399  //(*orx).mainLoop();
     400
     401  orx->start();
     402 
    386403  //delete orx;
    387404 
  • orxonox/branches/buerli/src/orxonox.conf

    r2190 r2707  
    66SPACE=fire
    77ESCAPE=quit
     8p=pause
    89q=quit
    910BUTTON_LEFT=fire
    1011BUTTON_RIGHT=altfire
    1112b=benscho
     13x=up_world
     14z=down_world
     15
  • orxonox/branches/buerli/src/orxonox.h

    r2190 r2707  
    1616class World;
    1717class Camera;
     18class GameLoader;
    1819
    1920//! Orxonox core singleton class
     
    3334  Camera* localcamera;
    3435  SDL_Surface* screen;
     36  GameLoader* gameLoader;
    3537 
    3638  bool bQuitOrxonox;
    3739  bool pause;
    38         Uint32 lastframe;
    39 
    40         void get_config_file (int argc, char** argv);
    41        
    42                 // main loop functions
     40  Uint32 lastframe;
     41 
     42  void get_config_file (int argc, char** argv);
     43 
     44  // main loop functions
    4345  void synchronize ();
    4446  void handle_input ();
     
    5759 public:
    5860  static Orxonox* getInstance ();
     61  void start();
    5962  void quitGame();
    6063
     
    6366
    6467  int init (int argc, char** argv);
    65        
    66         CommandNode* get_localinput();
    67         Camera* get_camera();
    68         World* get_world();
    69        
     68 
     69  CommandNode* get_localinput();
     70  Camera* get_camera();
     71  World* get_world();
     72 
    7073  void mainLoop();
    7174};
  • orxonox/branches/buerli/src/player.cc

    r2551 r2707  
    6262void Player::command (Command* cmd)
    6363{
    64         printf("Player|recieved command [%s]\n", cmd->cmd);
    65         if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
    66         else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
    67         else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
    68         else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
    69         else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
     64  //printf("Player|recieved command [%s]\n", cmd->cmd);
     65  if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
     66  else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
     67  else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
     68  else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
     69  else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
    7070}
    7171
    7272void Player::draw ()
    73 {
     73{ 
    7474  glMatrixMode(GL_MODELVIEW);
    7575  glLoadIdentity();
  • orxonox/branches/buerli/src/stdincl.h

    r2551 r2707  
    1515#include "coordinates.h"
    1616#include "list.h"
     17#include "error.h"
    1718#include "message_structures.h"
    1819#include "orxonox.h"
  • orxonox/branches/buerli/src/track.cc

    r2551 r2707  
    5252{
    5353}
     54
     55void Track::init()
     56{
     57 
     58}
     59
    5460
    5561/**
  • orxonox/branches/buerli/src/track.h

    r2551 r2707  
    2727       
    2828 public:
    29         Track ();
     29  Track ();
    3030  Track (Uint32 number, Uint32 next, Vector* start, Vector* finish);
    3131  ~Track ();
    32        
    33         virtual void post_enter (WorldEntity* entity);  // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
    34         virtual void post_leave (WorldEntity* entity);
    35         virtual void tick (float deltaT);
    36         virtual void map_camera (Location* lookat, Placement* camplc);
    37         virtual bool map_coords (Location* loc, Placement* plc);        // this should return true if the entity left track boundaries
     32  virtual void init();
     33 
     34  virtual void post_enter (WorldEntity* entity);        // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
     35  virtual void post_leave (WorldEntity* entity);
     36  virtual void tick (float deltaT);
     37  virtual void map_camera (Location* lookat, Placement* camplc);
     38  virtual bool map_coords (Location* loc, Placement* plc);      // this should return true if the entity left track boundaries
    3839};
    3940
  • orxonox/branches/buerli/src/world.cc

    r2551 r2707  
    3131    This creates a new empty world!
    3232*/
    33 World::World ()
    34 {
    35   entities = new List<WorldEntity>();
     33World::World (char* name)
     34{
     35  this->worldName = name;
     36  this->debugWorldNr = -1;
     37  this->entities = new List<WorldEntity>();
     38}
     39
     40World::World (int worldID)
     41{
     42  this->debugWorldNr = worldID;
     43  this->worldName = NULL;
     44  this->entities = new List<WorldEntity>();
    3645}
    3746
     
    4150World::~World ()
    4251{
    43   unload ();
    44   delete entities;
    45 }
     52  Orxonox *orx = Orxonox::getInstance();
     53  orx->get_localinput()->unbind (this->localPlayer);
     54  delete this->entities;
     55  delete this->localCamera;
     56}
     57
     58
     59/**
     60    \brief initialize the world before use.
     61*/
     62Error World::init()
     63{
     64  this->bPause = false;
     65}
     66
     67Error World::start()
     68{
     69  this->mainLoop();
     70}
     71
     72Error World::stop()
     73{
     74  this->bQuitCurrentGame = true;
     75  this->localCamera->setWorld(NULL);
     76  this->~World();
     77}
     78
     79Error World::pause()
     80{
     81  this->isPaused = true;
     82}
     83
     84Error World::resume()
     85{
     86  this->isPaused = false;
     87}
     88
     89void World::load()
     90{
     91  if(this->debugWorldNr != -1)
     92    {
     93      switch(this->debugWorldNr)
     94        {
     95        case DEBUG_WORLD_0:
     96          {
     97            // create some path nodes
     98            this->pathnodes = new Vector[6];
     99            this->pathnodes[0] = Vector(0, 0, 0);
     100            this->pathnodes[1] = Vector(-100, 40, 0);
     101            this->pathnodes[2] = Vector(-100, 140, 0);
     102            this->pathnodes[3] = Vector(0, 180, 0);
     103            this->pathnodes[4] = Vector(100, 140, 0);
     104            this->pathnodes[5] = Vector(100, 40, 0);
     105           
     106            // create the tracks
     107            this->tracklen = 6;
     108            this->track = new Track[6];
     109            for( int i = 0; i < this->tracklen; i++)
     110              {
     111                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
     112              }
     113           
     114            // create a player
     115            //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
     116            WorldEntity* myPlayer = new Player();
     117            this->spawn(myPlayer);
     118            this->localPlayer = myPlayer;           
     119
     120            // bind input
     121            Orxonox *orx = Orxonox::getInstance();
     122            orx->get_localinput()->bind (myPlayer);
     123           
     124            // bind camera
     125            this->localCamera = new Camera(this);
     126            this->getCamera()->bind (myPlayer);
     127            break;
     128          }
     129        case DEBUG_WORLD_1:
     130          {
     131            // create some path nodes
     132            this->pathnodes = new Vector[6];
     133            this->pathnodes[0] = Vector(0, 0, 0);
     134            this->pathnodes[1] = Vector(20, 10, 10);
     135            this->pathnodes[2] = Vector(40, 0, 10);
     136            this->pathnodes[3] = Vector(60, 10, 0);
     137            this->pathnodes[4] = Vector(80, 20, 10);
     138            this->pathnodes[5] = Vector(30, 50, 0);
     139           
     140            // create the tracks
     141            this->tracklen = 6;
     142            this->track = new Track[6];
     143            for( int i = 0; i < this->tracklen; i++)
     144              {
     145                this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);
     146              }
     147           
     148            // create a player
     149            //WorldEntity* myPlayer = (WorldEntity*) this->spawn<Player>();
     150            WorldEntity* myPlayer = new Player();
     151            this->spawn(myPlayer);
     152            this->localPlayer = myPlayer;
     153           
     154            // bind input
     155            Orxonox *orx = Orxonox::getInstance();
     156            orx->get_localinput()->bind (myPlayer);
     157           
     158            // bind camera
     159            this->localCamera = new Camera(this);
     160            this->getCamera()->bind (myPlayer);
     161            break;
     162          }
     163        default:
     164          printf("World::load() - no world with ID %i found", this->debugWorldNr );
     165        }
     166    }
     167  else if(this->worldName != NULL)
     168    {
     169
     170    }
     171}
     172
    46173
    47174/**
     
    254381}
    255382
    256 /**
    257    \brief loads a simple level for testing purposes
    258 */
    259 void World::load_debug_level()
    260 {
    261   // create some path nodes
    262   pathnodes = new Vector[6];
    263   pathnodes[0] = Vector(0, 0, 0);
    264   pathnodes[1] = Vector(-100, 40, 0);
    265   pathnodes[2] = Vector(-100, 140, 0);
    266   pathnodes[3] = Vector(0, 180, 0);
    267   pathnodes[4] = Vector(100, 140, 0);
    268   pathnodes[5] = Vector(100, 40, 0);   
    269  
    270   // create the tracks
    271   tracklen = 6;
    272   track = new Track[6];
    273   for( int i = 0; i < tracklen; i++)
    274     {
    275       track[i] = Track( i, (i+1)%tracklen, &pathnodes[i], &pathnodes[(i+1)%tracklen]);
    276     }
    277  
    278   // create a player
    279   WorldEntity* myPlayer = (WorldEntity*) spawn<Player>();
    280  
    281   // bind input
    282   Orxonox *orx = Orxonox::getInstance();
    283   orx->get_localinput()->bind (myPlayer);
    284  
    285   // bind camera
    286   orx->get_camera()->bind (myPlayer);
    287 }
     383
    288384
    289385/**
     
    295391  track[loc->part].map_camera (loc, plc);
    296392}
     393
     394
     395void World::setTrackLen(Uint32 len)
     396{
     397  this->tracklen = len;
     398}
     399
     400int World::getTrackLen()
     401{
     402  return this->tracklen;
     403}
     404
     405void World::debug()
     406{
     407  List<WorldEntity> *l;
     408  WorldEntity* entity;
     409 
     410  printf("counting all entities\n");
     411  l = entities->get_next(); 
     412  while( l != NULL )
     413    {
     414      entity = l->get_object();
     415      if( entity->bDraw ) printf("got an entity\n");
     416      l = l->get_next();
     417    }
     418}
     419
     420
     421void World::mainLoop()
     422{
     423  this->lastFrame = SDL_GetTicks();
     424  this->bQuitOrxonox = false;
     425  this->bQuitCurrentGame = false;
     426  printf("World|Entering main loop\n");
     427  while(!this->bQuitOrxonox && !this->bQuitCurrentGame) /* pause pause pause ?!?!?*/
     428    {
     429      //debug routine
     430      //debug();
     431      // Network
     432      synchronize();
     433      // Process input
     434      handle_input();
     435      // Process time
     436      time_slice();
     437      // Process collision
     438      collision();
     439      // Draw
     440      display();
     441    }
     442  printf("World|Exiting the main loop\n");
     443}
     444
     445/**
     446   \brief synchronize local data with remote data
     447*/
     448void World::synchronize ()
     449{
     450  // Get remote input
     451  // Update synchronizables
     452}
     453
     454/**
     455   \brief run all input processing
     456*/
     457void World::handle_input ()
     458{
     459  // localinput
     460  Orxonox::getInstance()->get_localinput()->process();
     461  // remoteinput
     462}
     463
     464/**
     465   \brief advance the timeline
     466*/
     467void World::time_slice ()
     468{
     469  Uint32 currentFrame = SDL_GetTicks();
     470  if(!this->bPause)
     471    {
     472      Uint32 dt = currentFrame - this->lastFrame;
     473      /*
     474      if(dt > 0)
     475        {
     476          float fps = 1000/dt;
     477          printf("fps = %f\n", fps);
     478        }
     479      else
     480        {
     481          printf("fps = 1000\n");
     482        }
     483      */
     484      this->time_slice (dt);
     485      this->update ();
     486      this->localCamera->time_slice (dt);
     487    }
     488  this->lastFrame = currentFrame;
     489}
     490
     491/**
     492   \brief compute collision detection
     493*/
     494void World::collision ()
     495{
     496  this->collide ();
     497}
     498
     499/**
     500   \brief handle keyboard commands that are not meant for WorldEntities
     501   \param cmd: the command to handle
     502   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
     503*/
     504bool World::system_command (Command* cmd)
     505{
     506  if( !strcmp( cmd->cmd, "quit"))
     507    {
     508      if( !cmd->bUp) this->bQuitOrxonox = true;
     509      return true;
     510    }
     511  return false;
     512}
     513
     514/**
     515        \brief render the current frame
     516*/
     517void World::display ()
     518{
     519  // clear buffer
     520  glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
     521  // set camera
     522  this->localCamera->apply ();
     523  // draw world
     524  this->draw();
     525  // draw HUD
     526  // flip buffers
     527  SDL_GL_SwapBuffers();
     528}
     529
     530Camera* World::getCamera()
     531{
     532  return this->localCamera;
     533}
     534
     535
     536void World::spawn(WorldEntity* entity)
     537{
     538  Location zeroloc;
     539  Location* loc = NULL;
     540  WorldEntity* owner;
     541  //T* entity = new T();
     542  entities->add (entity, LIST_ADD_NEXT);
     543  //if( loc == NULL)
     544  //{
     545      zeroloc.dist = 0;
     546      zeroloc.part = 0;
     547      zeroloc.pos = Vector();
     548      zeroloc.rot = Quaternion();
     549      loc = &zeroloc;
     550      //}
     551  entity->init (loc, owner);
     552  if (entity->bFree)
     553    {
     554      this->track[loc->part].map_coords( loc, entity->get_placement());
     555    }
     556  entity->post_spawn ();
     557  //return entity;
     558}
  • orxonox/branches/buerli/src/world.h

    r2551 r2707  
    88
    99#include "stdincl.h"
     10#include "story_entity.h"
     11
     12
    1013
    1114class Track;
    1215class WorldEntity;
     16class Camera;
    1317
    1418//! The game environment
    15 class World {
     19class World : public StoryEntity {
    1620
    1721 public:
    18   World ();
     22  World (char* name);
     23  World (int worldID);
    1924  ~World ();
    2025
    21         template<typename T>
    22           T* spawn(Location* loc, WorldEntity* owner);  // template to be able to spawn any derivation of WorldEntity
    23         template<typename T>
    24           T* spawn(Placement* plc, WorldEntity* owner);
     26  template<typename T>
     27    T* spawn(Location* loc, WorldEntity* owner);        // template to be able to spawn any derivation of WorldEntity
     28  template<typename T>
     29    T* spawn(Placement* plc, WorldEntity* owner);
     30 
     31  virtual Error init();
     32  virtual Error start();
     33  virtual Error stop();
     34  virtual Error pause();
     35  virtual Error resume();
    2536
    26         void time_slice (Uint32 deltaT);
    27         void collide ();
    28         void draw ();
    29         void update (); // maps Locations to Placements
    30         void calc_camera_pos (Location* loc, Placement* plc);
     37  virtual void load();
     38
     39  void time_slice (Uint32 deltaT);
     40  void collide ();
     41  void draw ();
     42  void update ();       // maps Locations to Placements
     43  void calc_camera_pos (Location* loc, Placement* plc);
    3144       
    32         void unload ();
    33        
    34         void load_debug_level ();
    35        
     45  void unload ();
     46 
     47  void setTrackLen(Uint32 tracklen);
     48  int getTrackLen();
     49  bool system_command (Command* cmd);
     50  Camera* getCamera();
     51  //private:
     52
     53  void spawn(WorldEntity* entity);
     54
     55  List<WorldEntity>* entities;
     56 
     57  // base level data
     58  Track* track;
     59  Uint32 tracklen;   // number of Tracks the World consist of
     60  Vector* pathnodes;
     61  Camera* localCamera; 
     62
    3663 private:
    37  
    38         List<WorldEntity>* entities;
    39        
    40                 // base level data
    41         Track* track;
    42         Uint32 tracklen;   // number of Tracks the World consist of
    43         Vector* pathnodes;
     64  Uint32 lastFrame; //!> last time of frame
     65  bool bQuitOrxonox; //!> quit this application
     66  bool bQuitCurrentGame; //!> quit only the current game and return to menu
     67  bool bPause;
    4468
     69  char* worldName;
     70  int debugWorldNr;
     71
     72  WorldEntity* localPlayer;
     73 
     74  void mainLoop();
     75  void synchronize();
     76  void handle_input();
     77  void time_slice();
     78  void collision();
     79  void display();
     80  void debug();
    4581};
    4682
     
    5894template<typename T> T* World::spawn(Location* loc = NULL, WorldEntity* owner = NULL)
    5995{
    60         Location zeroloc;
    61         T* entity = new T();
    62         entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
    63         if( loc == NULL)
    64         {
    65                 zeroloc.dist = 0;
    66                 zeroloc.part = 0;
    67                 zeroloc.pos = Vector();
    68                 zeroloc.rot = Quaternion();
    69                 loc = &zeroloc;
    70         }
    71         entity->init (loc, owner);
    72         if (entity->bFree)
    73         {
    74                 track[loc->part].map_coords( loc, entity->get_placement());
    75         }
    76         entity->post_spawn ();
    77         return entity;
     96  Location zeroloc;
     97  T* entity = new T();
     98  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
     99  if( loc == NULL)
     100    {
     101      zeroloc.dist = 0;
     102      zeroloc.part = 0;
     103      zeroloc.pos = Vector();
     104      zeroloc.rot = Quaternion();
     105      loc = &zeroloc;
     106    }
     107  entity->init (loc, owner);
     108  if (entity->bFree)
     109    {
     110      track[loc->part].map_coords( loc, entity->get_placement());
     111    }
     112  entity->post_spawn ();
     113  return entity;
    78114}
    79115
     
    92128template<typename T> T* World::spawn(Placement* plc, WorldEntity* owner = NULL)
    93129{
    94         T* entity = new T();
    95         entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
    96         entity->init (plc, owner);
    97         if (!entity->bFree)
    98         {
    99                 printf("Can't spawn unfree entity with placement\n");
    100                 entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
    101                 return NULL;
    102         }
    103         entity->post_spawn ();
    104         return entity;
     130  T* entity = new T();
     131  entities->add ((WorldEntity*)entity, LIST_ADD_NEXT);
     132  entity->init (plc, owner);
     133  if (!entity->bFree)
     134    {
     135      printf("Can't spawn unfree entity with placement\n");
     136      entities->remove( (WorldEntity*)entity, LIST_FIND_FW);
     137      return NULL;
     138    }
     139  entity->post_spawn ();
     140  return entity;
    105141}
    106142
Note: See TracChangeset for help on using the changeset viewer.