diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/coin.m4 SIMVoleon-2.0.1/cfg/m4/coin.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/coin.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/coin.m4 2005-05-20 17:56:18.000000000 +0200 @@ -0,0 +1,152 @@ +############################################################################ +# Usage: +# SIM_AC_HAVE_COIN_IFELSE( IF-FOUND, IF-NOT-FOUND ) +# +# Description: +# This macro locates the Coin development system. If it is found, +# the set of variables listed below are set up as described and made +# available to the configure script. +# +# The $sim_ac_coin_desired variable can be set to false externally to +# make Coin default to be excluded. +# +# Autoconf Variables: +# > $sim_ac_coin_desired true | false (defaults to true) +# < $sim_ac_coin_avail true | false +# < $sim_ac_coin_cppflags (extra flags the preprocessor needs) +# < $sim_ac_coin_cflags (extra flags the C compiler needs) +# < $sim_ac_coin_cxxflags (extra flags the C++ compiler needs) +# < $sim_ac_coin_ldflags (extra flags the linker needs) +# < $sim_ac_coin_libs (link library flags the linker needs) +# < $sim_ac_coin_datadir (location of Coin data files) +# < $sim_ac_coin_includedir (location of Coin headers) +# < $sim_ac_coin_version (the libCoin version) +# < $sim_ac_coin_msvcrt (the MSVC++ C library Coin was built with) +# < $sim_ac_coin_configcmd (the path to coin-config or "false") +# +# Authors: +# Lars J. Aas, <larsa@sim.no> +# Morten Eriksen, <mortene@sim.no> +# +# TODO: +# + +AC_DEFUN([SIM_AC_HAVE_COIN_IFELSE], [ +AC_PREREQ([2.14a]) + +# official variables +sim_ac_coin_avail=false +sim_ac_coin_cppflags= +sim_ac_coin_cflags= +sim_ac_coin_cxxflags= +sim_ac_coin_ldflags= +sim_ac_coin_libs= +sim_ac_coin_datadir= +sim_ac_coin_includedir= +sim_ac_coin_version= + +# internal variables +: ${sim_ac_coin_desired=true} +sim_ac_coin_extrapath= + +AC_ARG_WITH([coin], +AC_HELP_STRING([--with-coin], [enable use of Coin [[default=yes]]]) +AC_HELP_STRING([--with-coin=DIR], [give prefix location of Coin]), + [ case $withval in + no) sim_ac_coin_desired=false ;; + yes) sim_ac_coin_desired=true ;; + *) sim_ac_coin_desired=true + sim_ac_coin_extrapath=$withval ;; + esac], + []) + +case $build in +*-mks ) sim_ac_pathsep=";" ;; +* ) sim_ac_pathsep="${PATH_SEPARATOR}" ;; +esac + +if $sim_ac_coin_desired; then + sim_ac_path=$PATH + test -z "$sim_ac_coin_extrapath" || ## search in --with-coin path + sim_ac_path="$sim_ac_coin_extrapath/bin${sim_ac_pathsep}$sim_ac_path" + test x"$prefix" = xNONE || ## search in --prefix path + sim_ac_path="$sim_ac_path${sim_ac_pathsep}$prefix/bin" + + AC_PATH_PROG(sim_ac_coin_configcmd, coin-config, false, $sim_ac_path) + + if test "X$sim_ac_coin_configcmd" != "Xfalse"; then + test -n "$CONFIG" && + $sim_ac_coin_configcmd --alternate=$CONFIG >/dev/null 2>/dev/null && + sim_ac_coin_configcmd="$sim_ac_coin_configcmd --alternate=$CONFIG" + fi + + if $sim_ac_coin_configcmd; then + sim_ac_coin_version=`$sim_ac_coin_configcmd --version` + sim_ac_coin_cppflags=`$sim_ac_coin_configcmd --cppflags` + sim_ac_coin_cflags=`$sim_ac_coin_configcmd --cflags 2>/dev/null` + sim_ac_coin_cxxflags=`$sim_ac_coin_configcmd --cxxflags` + sim_ac_coin_ldflags=`$sim_ac_coin_configcmd --ldflags` + sim_ac_coin_libs=`$sim_ac_coin_configcmd --libs` + sim_ac_coin_datadir=`$sim_ac_coin_configcmd --datadir` + # Hide stderr on the following, as ``--includedir'', ``--msvcrt'' + # and ``--cflags'' options were added late to coin-config. + sim_ac_coin_includedir=`$sim_ac_coin_configcmd --includedir 2>/dev/null` + sim_ac_coin_msvcrt=`$sim_ac_coin_configcmd --msvcrt 2>/dev/null` + sim_ac_coin_cflags=`$sim_ac_coin_configcmd --cflags 2>/dev/null` + AC_CACHE_CHECK( + [if we can compile and link with the Coin library], + sim_cv_coin_avail, + [sim_ac_save_cppflags=$CPPFLAGS + sim_ac_save_cxxflags=$CXXFLAGS + sim_ac_save_ldflags=$LDFLAGS + sim_ac_save_libs=$LIBS + CPPFLAGS="$CPPFLAGS $sim_ac_coin_cppflags" + CXXFLAGS="$CXXFLAGS $sim_ac_coin_cxxflags" + LDFLAGS="$LDFLAGS $sim_ac_coin_ldflags" + LIBS="$sim_ac_coin_libs $LIBS" + AC_LANG_PUSH(C++) + + AC_TRY_LINK( + [#include <Inventor/SoDB.h>], + [SoDB::init();], + [sim_cv_coin_avail=true], + [sim_cv_coin_avail=false]) + + AC_LANG_POP + CPPFLAGS=$sim_ac_save_cppflags + CXXFLAGS=$sim_ac_save_cxxflags + LDFLAGS=$sim_ac_save_ldflags + LIBS=$sim_ac_save_libs + ]) + sim_ac_coin_avail=$sim_cv_coin_avail + if $sim_ac_coin_avail; then :; else + AC_MSG_WARN([ +Compilation and/or linking with the Coin main library SDK failed, for +unknown reason. If you are familiar with configure-based configuration +and building, investigate the 'config.log' file for clues. + +If you can not figure out what went wrong, please forward the 'config.log' +file to the email address <coin-support@coin3d.org> and ask for help by +describing the situation where this failed. +]) + fi + else # no 'coin-config' found + locations=`IFS="${sim_ac_pathsep}"; for p in $sim_ac_path; do echo " -> $p/coin-config"; done` + AC_MSG_WARN([cannot find 'coin-config' at any of these locations: +$locations]) + AC_MSG_WARN([ +Need to be able to run 'coin-config' to figure out how to build and link +against the Coin library. To rectify this problem, you most likely need +to a) install Coin if it has not been installed, b) add the Coin install +bin/ directory to your PATH environment variable. +]) + fi +fi + +if $sim_ac_coin_avail; then + ifelse([$1], , :, [$1]) +else + ifelse([$2], , :, [$2]) +fi +]) # SIM_AC_HAVE_COIN_IFELSE() + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_debug.m4 SIMVoleon-2.0.1/cfg/m4/compile_debug.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_debug.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_debug.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,80 @@ +############################################################################ +# Usage: +# SIM_AC_COMPILE_DEBUG([ACTION-IF-DEBUG[, ACTION-IF-NOT-DEBUG]]) +# +# Description: +# Let the user decide if compilation should be done in "debug mode". +# If compilation is not done in debug mode, all assert()'s in the code +# will be disabled. +# +# Also sets enable_debug variable to either "yes" or "no", so the +# configure.in writer can add package-specific actions. Default is "yes". +# This was also extended to enable the developer to set up the two first +# macro arguments following the well-known ACTION-IF / ACTION-IF-NOT +# concept. +# +# Authors: +# Morten Eriksen, <mortene@sim.no> +# Lars J. Aas, <larsa@sim.no> +# + +AC_DEFUN([SIM_AC_COMPILE_DEBUG], [ +AC_ARG_ENABLE( + [debug], + AC_HELP_STRING([--enable-debug], [compile in debug mode [[default=yes]]]), + [case "${enableval}" in + yes) enable_debug=true ;; + no) enable_debug=false ;; + true | false) enable_debug=${enableval} ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-debug) ;; + esac], + [enable_debug=true]) + +if $enable_debug; then + DSUFFIX=d + ifelse([$1], , :, [$1]) +else + DSUFFIX= + CPPFLAGS="$CPPFLAGS -DNDEBUG" + ifelse([$2], , :, [$2]) +fi +AC_SUBST(DSUFFIX) +]) + +############################################################################ +# Usage: +# SIM_AC_COMPILER_OPTIMIZATION +# +# Description: +# Let the user decide if optimization should be attempted turned off +# by stripping off an "-O[0-9]" option. +# +# Note: this macro must be placed after either AC_PROG_CC or AC_PROG_CXX +# in the configure.in script. +# +# FIXME: this is pretty much just a dirty hack. Unfortunately, this +# seems to be the best we can do without fixing Autoconf to behave +# properly wrt setting optimization options. 20011021 mortene. +# +# Author: Morten Eriksen, <mortene@sim.no>. +# + +AC_DEFUN([SIM_AC_COMPILER_OPTIMIZATION], [ +AC_ARG_ENABLE( + [optimization], + AC_HELP_STRING([--enable-optimization], + [allow compilers to make optimized code [[default=yes]]]), + [case "${enableval}" in + yes) sim_ac_enable_optimization=true ;; + no) sim_ac_enable_optimization=false ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-optimization) ;; + esac], + [sim_ac_enable_optimization=true]) + +if $sim_ac_enable_optimization; then + : +else + CFLAGS="`echo $CFLAGS | sed 's/-O[[0-9]]*[[ ]]*//'`" + CXXFLAGS="`echo $CXXFLAGS | sed 's/-O[[0-9]]*[[ ]]*//'`" +fi +]) diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_exceptions.m4 SIMVoleon-2.0.1/cfg/m4/compile_exceptions.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_exceptions.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_exceptions.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,54 @@ +############################################################################ +# Usage: +# SIM_AC_EXCEPTION_HANDLING +# +# Description: +# Let the user decide if C++ exception handling should be compiled +# in. The compiled libraries/executables will use a lot less space +# if they have exception handling support. +# +# Note: this macro must be placed after AC_PROG_CXX in the +# configure.in script. +# +# Author: Morten Eriksen, <mortene@sim.no>. +# +# TODO: +# * [mortene:19991114] make this work with compilers other than gcc/g++ +# + +AC_DEFUN([SIM_AC_EXCEPTION_HANDLING], [ +AC_PREREQ([2.13]) +AC_ARG_ENABLE( + [exceptions], + AC_HELP_STRING([--enable-exceptions], + [(g++ only) compile with exceptions [[default=no]]]), + [case "${enableval}" in + yes) enable_exceptions=yes ;; + no) enable_exceptions=no ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-exceptions) ;; + esac], + [enable_exceptions=no]) + +if test x"$enable_exceptions" = x"no"; then + if test "x$GXX" = "xyes"; then + unset _exception_flag + dnl This is for GCC >= 2.8 + SIM_AC_CXX_COMPILER_OPTION([-fno-exceptions], [_exception_flag=-fno-exceptions]) + if test x"${_exception_flag+set}" != x"set"; then + dnl For GCC versions < 2.8 + SIM_AC_CXX_COMPILER_OPTION([-fno-handle-exceptions], + [_exception_flag=-fno-handle-exceptions]) + fi + if test x"${_exception_flag+set}" != x"set"; then + AC_MSG_WARN([couldn't find a valid option for avoiding exception handling]) + else + CXXFLAGS="$CXXFLAGS $_exception_flag" + fi + fi +else + if test x"$GXX" != x"yes"; then + AC_MSG_WARN([--enable-exceptions only has effect when using GNU g++]) + fi +fi +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_profiling.m4 SIMVoleon-2.0.1/cfg/m4/compile_profiling.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_profiling.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_profiling.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,43 @@ +############################################################################ +# Usage: +# SIM_AC_PROFILING_SUPPORT +# +# Description: +# Let the user decide if profiling code should be compiled +# in. The compiled libraries/executables will use a lot less space +# if they don't contain profiling code information, and they will also +# execute faster. +# +# Note: this macro must be placed after either AC_PROG_CC or AC_PROG_CXX +# in the configure.in script. +# +# Author: Morten Eriksen, <mortene@sim.no>. +# +# TODO: +# * [mortene:19991114] make this work with compilers other than gcc/g++ +# + +AC_DEFUN([SIM_AC_PROFILING_SUPPORT], [ +AC_PREREQ([2.13]) +AC_ARG_ENABLE( + [profile], + AC_HELP_STRING([--enable-profile], + [(GCC only) turn on inclusion of profiling code [[default=no]]]), + [case "${enableval}" in + yes) enable_profile=yes ;; + no) enable_profile=no ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-profile) ;; + esac], + [enable_profile=no]) + +if test x"$enable_profile" = x"yes"; then + if test x"$GXX" = x"yes" || test x"$GCC" = x"yes"; then + CFLAGS="$CFLAGS -pg" + CXXFLAGS="$CXXFLAGS -pg" + LDFLAGS="$LDFLAGS -pg" + else + AC_MSG_WARN([--enable-profile only has effect when using GNU gcc or g++]) + fi +fi +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compiler_capabilities.m4 SIMVoleon-2.0.1/cfg/m4/compiler_capabilities.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compiler_capabilities.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compiler_capabilities.m4 2004-08-29 06:30:57.000000000 +0200 @@ -0,0 +1,268 @@ +############################################################################ +# Usage: +# SIM_AC_COMPILER_CPLUSPLUS_FATAL_ERRORS +# +# Description: +# Check for the known causes that would make the current C++ compiler +# unusable for building Coin or Coin-related projects. +# +# Exits the configure script if any of them fail. +# + +AC_DEFUN([SIM_AC_COMPILER_CPLUSPLUS_FATAL_ERRORS], [ + SIM_AC_COMPILER_CPLUSPLUS_ENV_OK + SIM_AC_COMPILER_INLINE_FOR + SIM_AC_COMPILER_SWITCH_IN_VIRTUAL_DESTRUCTOR + SIM_AC_COMPILER_CRAZY_GCC296_BUG + SIM_AC_COMPILER_BUILTIN_EXPECT +]) + + +############################################################################ +# Usage: +# SIM_AC_COMPILER_CPLUSPLUS_ENV_OK +# +# Description: +# Checks that the C++ compiler environment can compile, link and run an +# executable. We do this before the other checks, so we can smoke out +# a fubar environment before trying anything else, because otherwise the +# error message from the failing check would be bogus. +# +# (I.e. we've had reports from people that the GCC 2.96 crazy-bug checks +# hits, even though they didn't have GCC 2.96. Upon closer inspection, +# the reason for failure was simply that some other part of the compiler +# environment was fubar.) + +AC_DEFUN([SIM_AC_COMPILER_CPLUSPLUS_ENV_OK], [ +AC_LANG_PUSH(C++) + +AC_CACHE_CHECK( + [if the C++ compiler environment is ok], + sim_cv_c_compiler_env_ok, + [AC_TRY_RUN([ +// Just any old C++ source code. It might be useful +// to try to add in more standard C++ features that +// we depend on, like classes using templates (or +// even multiple templates), etc etc. -mortene. + +#include <stdio.h> + +class myclass { +public: + myclass(void) { value = 0.0f; } + float value; +}; + +int +main(void) +{ + myclass proj; + proj.value = 42; + return 0; +} +], + [sim_cv_c_compiler_env_ok=true], + [sim_cv_c_compiler_env_ok=false], + [sim_cv_c_compiler_env_ok=true + AC_MSG_WARN([can't check for fully working C++ environment when cross-compiling, assuming it's ok])]) +]) + +AC_LANG_POP + +if $sim_cv_c_compiler_env_ok; then + : +else + SIM_AC_ERROR(c--fubarenvironment) +fi +]) + + +############################################################################ +# Usage: +# SIM_AC_COMPILER_INLINE_FOR( [ACTION-IF-OK [, ACTION-IF-FAILS ] ] ) +# +# Description: +# Check if the compiler supports for(;;){} loops inside inlined +# constructors. +# +# This smokes out the useless HPUX 10.20 CC compiler. +# + +AC_DEFUN([SIM_AC_COMPILER_INLINE_FOR], [ + +AC_LANG_PUSH(C++) +AC_CACHE_CHECK( + [if the compiler handles for() loops in inlined constructors], + sim_cv_c_inlinefor, + [AC_TRY_COMPILE([ +class TestClass { +public: + TestClass(int); +}; + +inline TestClass::TestClass(int) { for (int i=0; i<1; i++) i=0; } +], + [TestClass t(0);], + [sim_cv_c_inlinefor=yes], + [sim_cv_c_inlinefor=no]) +]) +AC_LANG_POP + +if test x"$sim_cv_c_inlinefor" = x"yes"; then + ifelse([$1], , :, [$1]) +else + SIM_AC_ERROR([c--inlinefor]) + $2 +fi +]) + + +############################################################################ +# Usage: +# SIM_AC_COMPILER_SWITCH_IN_VIRTUAL_DESTRUCTOR( [ACTION-IF-OK [, ACTION-IF-FAILS ] ] ) +# +# Description: +# Check if the compiler crashes on switch() statements inside virtual +# destructors. +# +# This smokes out a particular patch-level version of the CC compiler +# for Sun WorkShop 6 (update 1 C++ 5.2 Patch 109508-01 2001/01/31). +# + +AC_DEFUN([SIM_AC_COMPILER_SWITCH_IN_VIRTUAL_DESTRUCTOR], [ + +AC_LANG_PUSH(C++) +AC_CACHE_CHECK( + [if the compiler handles switch statements in virtual destructors], + sim_cv_c_virtualdestrswitch, + [AC_TRY_COMPILE([ +class hepp { virtual ~hepp(); }; +hepp::~hepp() { switch(0) { } } +], +[], + [sim_cv_c_virtualdestrswitch=yes], + [sim_cv_c_virtualdestrswitch=no])]) +AC_LANG_POP + +if test x"$sim_cv_c_virtualdestrswitch" = x"yes"; then + ifelse([$1], , :, [$1]) +else + SIM_AC_ERROR([c--vdest]) + $2 +fi +]) + + +############################################################################ +# Usage: +# SIM_AC_COMPILER_CRAZY_GCC296_BUG([ACTION-IF-OK [, ACTION-IF-FAILS ]]) +# +# Description: +# Tries to smoke out some completely fubar bug in g++ of GCC 2.96 +# (at least) when -O2 (or higher, probably) optimization on. The reason +# we check specifically for this bug is because this compiler version +# is pretty well spread because it was part of a Red Hat Linux release. +# + +AC_DEFUN([SIM_AC_COMPILER_CRAZY_GCC296_BUG], [ + +AC_LANG_PUSH(C++) +AC_CACHE_CHECK( + [if this is a version of GCC with a known nasty optimization bug], + sim_cv_c_gcctwonightysixbug, + [AC_TRY_RUN([ +#include <stdio.h> + +class myclass { +public: + float value; + float & ref(); +}; + +myclass +hepp(const float v0, const float v1) +{ + myclass proj; + + proj.ref() = 0.0f; + proj.ref() = -(v1+v0); + + return proj; +} + +float & +myclass::ref() +{ + return this->value; +} + +int +main(void) +{ + myclass proj = hepp(2.0f, 4.0f); + return (proj.ref() < 0.0f) ? 0 : 1; +} +], + [sim_cv_c_gcctwonightysixbug=false], + [sim_cv_c_gcctwonightysixbug=true], + [sim_cv_c_gcctwonightysixbug=false + AC_MSG_WARN([can't check for GCC bug when cross-compiling, assuming it's ok])]) +]) +AC_LANG_POP + + +if $sim_cv_c_gcctwonightysixbug; then + SIM_AC_ERROR(c--gcc296bug) + $2 +else + ifelse([$1], , :, [$1]) +fi +]) + +# ************************************************************************** +# SIM_AC_COMPILER_BUILTIN_EXPECT + +AC_DEFUN([SIM_AC_COMPILER_BUILTIN_EXPECT], [ +AC_LANG_PUSH(C++) +AC_MSG_CHECKING([for __builtin_expect()]) +sim_ac_builtin_expect=false +AC_TRY_LINK([ + #include <assert.h> +], [ + if ( __builtin_expect(!!(1), 1) ? 1 : 0 ) { + /* nada */ + } +], [sim_ac_builtin_expect=true]) + +sim_ac_assert_uses_builtin_expect=false +if $sim_ac_builtin_expect; then + AC_MSG_RESULT([found]) + AC_DEFINE([HAVE___BUILTIN_EXPECT], 1, [Define if compiler has __builtin_expect() macro]) + + AC_MSG_CHECKING([if assert() uses __builtin_expect()]) + cat <<EOF > conftest.c +#include <assert.h> + +int main(int argc, char ** argv) { + assert(argv); +} +EOF + if test x"$CPP" = x; then + AC_MSG_ERROR([cpp not detected - aborting. notify maintainer at coin-support@coin3d.org.]) + fi + echo "$CPP $CPPFLAGS conftest.c" >&AS_MESSAGE_LOG_FD + sim_ac_builtin_expect_line=`$CPP $CPPFLAGS conftest.c 2>&AS_MESSAGE_LOG_FD | grep "__builtin_expect"` + if test x"$sim_ac_builtin_expect_line" = x""; then + AC_MSG_RESULT([no]) + else + sim_ac_assert_uses_builtin_expect=true + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_ASSERT_WITH_BUILTIN_EXPECT], 1, [Define if assert() uses __builtin_expect()]) + fi +else + AC_MSG_RESULT([not found]) +fi + +AC_LANG_POP +]) # SIM_AC_COMPILER_BUILTIN_EXPECT + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_rtti.m4 SIMVoleon-2.0.1/cfg/m4/compile_rtti.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_rtti.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_rtti.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,34 @@ +############################################################################ +# Usage: +# SIM_AC_RTTI_SUPPORT +# +# Description: +# Let the user decide if RTTI should be compiled in. The compiled +# libraries/executables will use a lot less space if they don't +# contain RTTI. +# +# Note: this macro must be placed after AC_PROG_CXX in the +# configure.in script. +# +# Author: Morten Eriksen, <mortene@sim.no>. + +AC_DEFUN([SIM_AC_RTTI_SUPPORT], [ +AC_PREREQ([2.13]) +AC_ARG_ENABLE( + [rtti], + AC_HELP_STRING([--enable-rtti], [(g++ only) compile with RTTI [[default=yes]]]), + [case "${enableval}" in + yes) enable_rtti=yes ;; + no) enable_rtti=no ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-rtti) ;; + esac], + [enable_rtti=yes]) + +if test x"$enable_rtti" = x"no"; then + if test x"$GXX" = x"yes"; then + CXXFLAGS="$CXXFLAGS -fno-rtti" + else + AC_MSG_WARN([--enable-rtti only has effect when using GNU g++]) + fi +fi +]) diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_symbols.m4 SIMVoleon-2.0.1/cfg/m4/compile_symbols.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_symbols.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_symbols.m4 2005-05-20 17:56:18.000000000 +0200 @@ -0,0 +1,36 @@ +############################################################################ +# Usage: +# SIM_AC_DEBUGSYMBOLS +# +# Description: +# Let the user decide if debug symbol information should be compiled +# in. The compiled libraries/executables will use a lot less space +# if stripped for their symbol information. +# +# Note: this macro must be placed after either AC_PROG_CC or AC_PROG_CXX +# in the configure.in script. +# +# Author: Morten Eriksen, <mortene@sim.no>. +# + +AC_DEFUN([SIM_AC_DEBUGSYMBOLS], [ +AC_ARG_ENABLE( + [symbols], + AC_HELP_STRING([--enable-symbols], + [include symbol debug information [[default=yes]]]), + [case "${enableval}" in + yes) enable_symbols=yes ;; + no) enable_symbols=no ;; + *) AC_MSG_ERROR(bad value "${enableval}" for --enable-symbols) ;; + esac], + [enable_symbols=yes]) + +# FIXME: don't mangle options like -fno-gnu-linker and -fvolatile-global +# 20020104 larsa +if test x"$enable_symbols" = x"no"; then + # CPPFLAGS="`echo $CPPFLAGS | sed 's/-g\>//'`" + CFLAGS="`echo $CFLAGS | sed 's/ -g //' | sed 's/^-g //' | sed 's/ -g$//'`" + CXXFLAGS="`echo $CXXFLAGS | sed 's/ -g //' | sed 's/^-g //' | sed 's/ -g$//'`" +fi +]) # SIM_AC_DEBUGSYMBOLS + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/compile_warnings.m4 SIMVoleon-2.0.1/cfg/m4/compile_warnings.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/compile_warnings.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/compile_warnings.m4 2004-08-29 06:30:57.000000000 +0200 @@ -0,0 +1,199 @@ +############################################################################ +# Usage: +# SIM_AC_COMPILER_WARNINGS +# +# Description: +# Take care of making a sensible selection of warning messages +# to turn on or off. +# +# Note: this macro must be placed after either AC_PROG_CC or AC_PROG_CXX +# in the configure.in script. +# +# Author: Morten Eriksen, <mortene@sim.no>. +# +# TODO: +# * [mortene:19991114] find out how to get GCC's +# -Werror-implicit-function-declaration option to work as expected +# +# * [larsa:20010504] rename to SIM_AC_COMPILER_WARNINGS and clean up +# the macro + +AC_DEFUN([SIM_AC_COMPILER_WARNINGS], [ +AC_ARG_ENABLE( + [warnings], + AC_HELP_STRING([--enable-warnings], + [turn on warnings when compiling [[default=yes]]]), + [case "${enableval}" in + yes) enable_warnings=yes ;; + no) enable_warnings=no ;; + *) AC_MSG_ERROR([bad value "$enableval" for --enable-warnings]) ;; + esac], + [enable_warnings=yes]) + +if test x"$enable_warnings" = x"yes"; then + + for sim_ac_try_cc_warning_option in \ + "-W" "-Wall" "-Wno-unused" "-Wno-multichar"; do + + if test x"$GCC" = x"yes"; then + SIM_AC_CC_COMPILER_OPTION([$sim_ac_try_cc_warning_option], + [CFLAGS="$CFLAGS $sim_ac_try_cc_warning_option"]) + fi + done + + for sim_ac_try_cxx_warning_option in \ + "-W" "-Wall" "-Wno-unused" "-Wno-multichar" "-Woverloaded-virtual"; do + if test x"$GXX" = x"yes"; then + SIM_AC_CXX_COMPILER_OPTION([$sim_ac_try_cxx_warning_option], + [CXXFLAGS="$CXXFLAGS $sim_ac_try_cxx_warning_option"]) + fi + + done + + case $host in + *-*-irix*) + ### Turn on all warnings ###################################### + # we try to catch settings like CC="CC -n32" too, even though the + # -n32 option belongs to C[XX]FLAGS + case $CC in + cc | "cc "* | CC | "CC "* ) + SIM_AC_CC_COMPILER_OPTION([-fullwarn], [CFLAGS="$CFLAGS -fullwarn"]) + ;; + esac + case $CXX in + CC | "CC "* ) + SIM_AC_CXX_COMPILER_OPTION([-fullwarn], [CXXFLAGS="$CXXFLAGS -fullwarn"]) + ;; + esac + + ### Turn off specific (bogus) warnings ######################## + + ### SGI MipsPro v?.?? (our compiler on IRIX 6.2) ############## + ## + ## 3115: ``type qualifiers are meaningless in this declaration''. + ## 3262: unused variables. + ## + ### SGI MipsPro v7.30 ######################################### + ## + ## 1174: "The function was declared but never referenced." + ## 1209: "The controlling expression is constant." (kill warning on + ## if (0), assert(FALSE), etc). + ## 1375: Non-virtual destructors in base classes. + ## 3201: Unused argument to a function. + ## 1110: "Statement is not reachable" (the Lex/Flex generated code in + ## Coin/src/engines has lots of shitty code which needs this). + ## 1506: Implicit conversion from "unsigned long" to "long". + ## SbTime.h in SGI/TGS Inventor does this, so we need to kill + ## this warning to avoid all the output clutter when compiling + ## the SoQt, SoGtk or SoXt libraries on IRIX with SGI MIPSPro CC. + ## 1169: External/internal linkage conflicts with a previous declaration. + ## We get this for the "friend operators" in SbString.h + + sim_ac_bogus_warnings="-woff 3115,3262,1174,1209,1375,3201,1110,1506,1169,1210" + + case $CC in + cc | "cc "* | CC | "CC "* ) + SIM_AC_CC_COMPILER_OPTION([$sim_ac_bogus_warnings], + [CFLAGS="$CFLAGS $sim_ac_bogus_warnings"]) + esac + case $CXX in + CC | "CC "* ) + SIM_AC_CXX_COMPILER_OPTION([$sim_ac_bogus_warnings], + [CXXFLAGS="$CXXFLAGS $sim_ac_bogus_warnings"]) + ;; + esac + ;; + esac +fi +]) + +# ************************************************************************** +# +# SIM_AC_DETECT_COMMON_COMPILER_FLAGS +# +# Sets sim_ac_compiler_CFLAGS and sim_ac_compiler_CXXFLAGS +# + +AC_DEFUN([SIM_AC_DETECT_COMMON_COMPILER_FLAGS], [ + +AC_REQUIRE([SIM_AC_CHECK_PROJECT_BETA_STATUS_IFELSE]) +AC_REQUIRE([SIM_AC_CHECK_SIMIAN_IFELSE]) + +SIM_AC_COMPILE_DEBUG([ + if test x"$GCC" = x"yes"; then + # no auto string.h-functions + SIM_AC_CC_COMPILER_OPTION([-fno-builtin], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -fno-builtin"]) + SIM_AC_CXX_COMPILER_OPTION([-fno-builtin], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -fno-builtin"]) + + # disallow non-standard scoping of for()-variables + SIM_AC_CXX_COMPILER_OPTION([-fno-for-scoping], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -fno-for-scope"]) + + SIM_AC_CC_COMPILER_OPTION([-finline-functions], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -finline-functions"]) + SIM_AC_CXX_COMPILER_OPTION([-finline-functions], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -finline-functions"]) + + if $sim_ac_simian; then + if $sim_ac_source_release; then :; else + # break build on warnings, except for in official source code releases + if test x"$enable_werror" = x"no"; then :; else + SIM_AC_CC_COMPILER_OPTION([-Werror], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -Werror"]) + SIM_AC_CXX_COMPILER_OPTION([-Werror], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -Werror"]) + fi + fi + fi + + # warn on missing return-value + SIM_AC_CC_COMPILER_OPTION([-Wreturn-type], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -Wreturn-type"]) + SIM_AC_CXX_COMPILER_OPTION([-Wreturn-type], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -Wreturn-type"]) + + SIM_AC_CC_COMPILER_OPTION([-Wchar-subscripts], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -Wchar-subscripts"]) + SIM_AC_CXX_COMPILER_OPTION([-Wchar-subscripts], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -Wchar-subscripts"]) + + SIM_AC_CC_COMPILER_OPTION([-Wparentheses], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS -Wparentheses"]) + SIM_AC_CXX_COMPILER_OPTION([-Wparentheses], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS -Wparentheses"]) + + else + case $CXX in + *wrapmsvc* ) + if $sim_ac_simian; then + if $sim_ac_source_release; then :; else + # break build on warnings, except for in official source code releases + SIM_AC_CC_COMPILER_OPTION([/WX], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS /WX"]) + SIM_AC_CXX_COMPILER_OPTION([/WX], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS /WX"]) + fi + fi + + # warning level 3 + SIM_AC_CC_COMPILER_OPTION([/W3], [sim_ac_compiler_CFLAGS="$sim_ac_compiler_CFLAGS /W3"]) + SIM_AC_CXX_COMPILER_OPTION([/W3], [sim_ac_compiler_CXXFLAGS="$sim_ac_compiler_CXXFLAGS /W3"]) + ;; + esac + fi +]) + +ifelse($1, [], :, $1) + +]) + +AC_DEFUN([SIM_AC_COMPILER_NOBOOL], [ +sim_ac_nobool_CXXFLAGS= +sim_ac_have_nobool=false +AC_MSG_CHECKING([whether $CXX accepts /noBool]) +SIM_AC_CXX_COMPILER_BEHAVIOR_OPTION_QUIET( + [/noBool], + [int temp], + [SIM_AC_CXX_COMPILER_BEHAVIOR_OPTION_QUIET( + [/noBool], + [bool res = true], + [], + [sim_ac_have_nobool=true])]) + +if $sim_ac_have_nobool; then + sim_ac_nobool_CXXFLAGS="/noBool" + AC_MSG_RESULT([yes]) + ifelse([$1], , :, [$1]) +else + AC_MSG_RESULT([no]) + ifelse([$2], , :, [$2]) +fi +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/configuration_summary.m4 SIMVoleon-2.0.1/cfg/m4/configuration_summary.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/configuration_summary.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/configuration_summary.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,91 @@ +# ************************************************************************** +# configuration_summary.m4 +# +# This file contains some utility macros for making it easy to have a short +# summary of the important configuration settings printed at the end of the +# configure run. +# +# Authors: +# Lars J. Aas <larsa@sim.no> +# + +# ************************************************************************** +# SIM_AC_CONFIGURATION_SETTING( DESCRIPTION, SETTING ) +# +# This macro registers a configuration setting to be dumped by the +# SIM_AC_CONFIGURATION_SUMMARY macro. + +AC_DEFUN([SIM_AC_CONFIGURATION_SETTING], +[ifelse($#, 2, [], [m4_fatal([SIM_AC_CONFIGURATION_SETTING: takes two arguments])]) +if test x"${sim_ac_configuration_settings+set}" = x"set"; then + sim_ac_configuration_settings="$sim_ac_configuration_settings|$1:$2" +else + sim_ac_configuration_settings="$1:$2" +fi +]) # SIM_AC_CONFIGURATION_SETTING + +# ************************************************************************** +# SIM_AC_CONFIGURATION_WARNING( WARNING ) +# +# This macro registers a configuration warning to be dumped by the +# SIM_AC_CONFIGURATION_SUMMARY macro. + +AC_DEFUN([SIM_AC_CONFIGURATION_WARNING], +[ifelse($#, 1, [], [m4_fatal([SIM_AC_CONFIGURATION_WARNING: takes one argument])]) +if test x"${sim_ac_configuration_warnings+set}" = x"set"; then + sim_ac_configuration_warnings="$sim_ac_configuration_warnings|$1" +else + sim_ac_configuration_warnings="$1" +fi +]) # SIM_AC_CONFIGURATION_WARNING + +# ************************************************************************** +# SIM_AC_CONFIGURATION_SUMMARY +# +# This macro dumps the settings and warnings summary. + +AC_DEFUN([SIM_AC_CONFIGURATION_SUMMARY], +[ifelse($#, 0, [], [m4_fatal([SIM_AC_CONFIGURATION_SUMMARY: takes no arguments])]) +sim_ac_settings="$sim_ac_configuration_settings" +sim_ac_num_settings=`echo "$sim_ac_settings" | tr -d -c "|" | wc -c` +sim_ac_maxlength=0 +while test $sim_ac_num_settings -ge 0; do + sim_ac_description=`echo "$sim_ac_settings" | cut -d: -f1` + sim_ac_length=`echo "$sim_ac_description" | wc -c` + if test $sim_ac_length -gt $sim_ac_maxlength; then + sim_ac_maxlength=`expr $sim_ac_length + 0` + fi + sim_ac_settings=`echo $sim_ac_settings | cut -d"|" -f2-` + sim_ac_num_settings=`expr $sim_ac_num_settings - 1` +done + +sim_ac_maxlength=`expr $sim_ac_maxlength + 3` +sim_ac_padding=`echo " " | + cut -c1-$sim_ac_maxlength` + +sim_ac_num_settings=`echo "$sim_ac_configuration_settings" | tr -d -c "|" | wc -c` +echo "" +echo "$PACKAGE configuration settings:" +while test $sim_ac_num_settings -ge 0; do + sim_ac_setting=`echo $sim_ac_configuration_settings | cut -d"|" -f1` + sim_ac_description=`echo "$sim_ac_setting" | cut -d: -f1` + sim_ac_status=`echo "$sim_ac_setting" | cut -d: -f2-` + # hopefully not too many terminals are too dumb for this + echo -e "$sim_ac_padding $sim_ac_status\r $sim_ac_description:" + sim_ac_configuration_settings=`echo $sim_ac_configuration_settings | cut -d"|" -f2-` + sim_ac_num_settings=`expr $sim_ac_num_settings - 1` +done + +if test x${sim_ac_configuration_warnings+set} = xset; then +sim_ac_num_warnings=`echo "$sim_ac_configuration_warnings" | tr -d -c "|" | wc -c` +echo "" +echo "$PACKAGE configuration warnings:" +while test $sim_ac_num_warnings -ge 0; do + sim_ac_warning=`echo "$sim_ac_configuration_warnings" | cut -d"|" -f1` + echo " * $sim_ac_warning" + sim_ac_configuration_warnings=`echo $sim_ac_configuration_warnings | cut -d"|" -f2-` + sim_ac_num_warnings=`expr $sim_ac_num_warnings - 1` +done +fi +]) # SIM_AC_CONFIGURATION_SUMMARY + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/doxygen_detection.m4 SIMVoleon-2.0.1/cfg/m4/doxygen_detection.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/doxygen_detection.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/doxygen_detection.m4 2005-05-20 17:56:18.000000000 +0200 @@ -0,0 +1,39 @@ +############################################################################ +# Usage: +# SIM_AC_DOXYGEN_TOOL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +# +# Description: +# This macro locates the doxygen executable. If it is found, the +# variable $sim_ac_doxygen_exe is set to the full path- and +# executable name (if not found, it is set to "false") and +# $sim_ac_doxygen_avail is set to the version number (if not +# found, it is set to "no"). +# +# Author: Morten Eriksen, <mortene@sim.no>. + +AC_DEFUN(SIM_AC_DOXYGEN_TOOL, [ +AC_ARG_WITH( + [doxygen], + AC_HELP_STRING([--with-doxygen=DIR], + [DIR is the directory where the doxygen executable resides]), + [], + [with_doxygen=yes]) + +sim_ac_doxygen_avail=no + +if test x"$with_doxygen" != xno; then + sim_ac_path=$PATH + if test x"$with_doxygen" != xyes; then + sim_ac_path=${with_doxygen}:$PATH + fi + + AC_PATH_PROG(sim_ac_doxygen_exe, doxygen, false, $sim_ac_path) + if test x"$sim_ac_doxygen_exe" = xfalse; then + ifelse([$2], , :, [$2]) + else + sim_ac_doxygen_avail=`$sim_ac_doxygen_exe -help 2> /dev/null | head -1 | sed 's%[[^ ]]\+ [[^ ]]\+ %%'` + $1 + fi +fi +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/errors.m4 SIMVoleon-2.0.1/cfg/m4/errors.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/errors.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/errors.m4 2004-08-29 06:30:52.000000000 +0200 @@ -0,0 +1,68 @@ +# ************************************************************************** +# SIM_AC_ERROR_MESSAGE_FILE( FILENAME ) +# Sets the error message file. Default is $ac_aux_dir/m4/errors.txt. +# +# SIM_AC_ERROR( ERROR [, ERROR ...] ) +# Fetches the error messages from the error message file and displays +# them on stderr. The configure process will subsequently exit. +# +# SIM_AC_WARN( ERROR [, ERROR ...] ) +# As SIM_AC_ERROR, but will not exit after displaying the message(s). +# +# SIM_AC_WITH_ERROR( WITHARG ) +# Invokes AC_MSG_ERROR in a consistent way for problems with the --with-* +# $withval argument. +# +# SIM_AC_ENABLE_ERROR( ENABLEARG ) +# Invokes AC_MSG_ERROR in a consistent way for problems with the --enable-* +# $enableval argument. +# +# Authors: +# Lars J. Aas <larsa@sim.no> + +AC_DEFUN([SIM_AC_ERROR_MESSAGE_FILE], [ +sim_ac_message_file=$1 +]) # SIM_AC_ERROR_MESSAGE_FILE + +AC_DEFUN([SIM_AC_ONE_MESSAGE], [ +: ${sim_ac_message_file=$ac_aux_dir/errors.txt} +if test -f $sim_ac_message_file; then + sim_ac_message="`sed -n -e '/^!$1$/,/^!/ { /^!/ d; p; }' <$sim_ac_message_file`" + if test x"$sim_ac_message" = x""; then + AC_MSG_ERROR([no message named '$1' in '$sim_ac_message_file' - notify the $PACKAGE_NAME maintainer(s)]) + else + eval "echo >&2 \"$sim_ac_message\"" + fi +else + AC_MSG_ERROR([file '$sim_ac_message_file' not found - notify the $PACKAGE_NAME maintainer(s)]) +fi +]) # SIM_AC_ONE_MESSAGE + +AC_DEFUN([_SIM_AC_ERROR], [ +SIM_AC_ONE_MESSAGE([$1]) +ifelse([$2], , , [ +echo >&2 "" +_SIM_AC_ERROR(m4_shift($@))]) +]) # _SIM_AC_ERROR + +AC_DEFUN([SIM_AC_ERROR], [ +echo >&2 "" +_SIM_AC_ERROR($@) +echo >&2 "" +AC_MSG_ERROR([aborting]) +]) # SIM_AC_ERROR + +AC_DEFUN([SIM_AC_WARN], [ +echo >&2 "" +_SIM_AC_ERROR($@) +echo >&2 "" +]) # SIM_AC_WARN + +AC_DEFUN([SIM_AC_WITH_ERROR], [ +AC_MSG_ERROR([invalid value "${withval}" for "$1" configure argument]) +]) # SIM_AC_WITH_ERROR + +AC_DEFUN([SIM_AC_ENABLE_ERROR], [ +AC_MSG_ERROR([invalid value "${enableval}" for "$1" configure argument]) +]) # SIM_AC_ENABLE_ERROR + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/gendsp.m4 SIMVoleon-2.0.1/cfg/m4/gendsp.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/gendsp.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/gendsp.m4 2005-05-20 17:56:18.000000000 +0200 @@ -0,0 +1,110 @@ +# ************************************************************************** +# gendsp.m4 +# +# macros: +# SIM_AC_MSVC_DSP_ENABLE_OPTION +# SIM_AC_MSVC_DSP_SETUP(PROJECT, Project, project, extra-args) +# +# authors: +# Lars J. Aas <larsa@coin3d.org> + +# ************************************************************************** +AC_DEFUN([SIM_AC_MSVC_DSP_ENABLE_OPTION], [ +AC_ARG_ENABLE([msvcdsp], + [AC_HELP_STRING([--enable-msvcdsp], [build .dsp, not library])], + [case $enableval in + no | false) sim_ac_make_dsp=false ;; + *) sim_ac_make_dsp=true ;; + esac], + [sim_ac_make_dsp=false]) + +if $sim_ac_make_dsp; then + enable_dependency_tracking=no + enable_libtool_lock=no +fi +]) # SIM_AC_MSVC_DSP_ENABLE_OPTION + +# ************************************************************************** +AC_DEFUN([SIM_AC_MSVC_DSP_SETUP], [ +AC_REQUIRE([SIM_AC_MSVC_DSP_ENABLE_OPTION]) +## Microsoft Developer Studio Project files +$1_DSP_LIBDIRS= +$1_DSP_LIBS= +$1_DSP_INCS= +$1_DSP_DEFS= + +if $sim_ac_make_dsp; then + SIM_AC_CONFIGURATION_SETTING([$2 build type], [msvc .dsp]) + + # -DHAVE_CONFIG_H is set up in $DEFS too late for us to use, and some + # include directives are usually set up in the Makefile.am files + for arg in -DHAVE_CONFIG_H $4 $CPPFLAGS $LDFLAGS $LIBS; do + case $arg in + -L* ) + libdir=`echo $arg | cut -c3-` + $1_DSP_LIBDIRS="[$]$1_DSP_LIBDIRS $libdir" + ;; + -l* ) + libname=`echo $arg | cut -c3-` + for libdir in [$]$1_DSP_LIBDIRS; do + if test -f $libdir/$libname.lib; then + # lib is not in any standard location - use full path + libname=`cygpath -w "$libdir/$libname" 2>/dev/null || echo "$libdir/$libname"` + break + fi + done + if test x"[$]$1_DSP_LIBS" = x""; then + $1_DSP_LIBS="$libname.lib" + else + $1_DSP_LIBS="[$]$1_DSP_LIBS $libname.lib" + fi + ;; + -I* ) + incdir=`echo $arg | cut -c3-` + incdir=`cygpath -w "$incdir" 2>/dev/null || echo "$incdir"` + if test x"[$]$1_DSP_INCS" = x""; then + $1_DSP_INCS="/I \"$incdir\"" + else + $1_DSP_INCS="[$]$1_DSP_INCS /I \"$incdir\"" + fi + ;; + -D$1_DEBUG* | -DNDEBUG ) + # Defines that vary between release/debug configurations can't be + # set up dynamically in <lib>_DSP_DEFS - they must be static in the + # gendsp.sh script. We therefore catch them here so we can ignore + # checking for them below. + ;; + -D*=* | -D* ) + define=`echo $arg | cut -c3-` + if test x"[$]$1_DSP_DEFS" = x""; then + $1_DSP_DEFS="/D \"$define\"" + else + $1_DSP_DEFS="[$]$1_DSP_DEFS /D \"$define\"" + fi + ;; + esac + done + + CC=[$]$3_src_dir/cfg/gendsp.sh + CXX=[$]$3_src_dir/cfg/gendsp.sh + CXXLD=[$]$3_src_dir/cfg/gendsp.sh + # Yes, this is totally bogus stuff, but don't worry about it. As long + # as gendsp.sh recognizes it... 20030219 larsa + CPPFLAGS="$CPPFLAGS -Ddspfile=[$]$3_build_dir/$3[$]$1_MAJOR_VERSION.dsp" + LDFLAGS="$LDFLAGS -Wl,-Ddspfile=[$]$3_build_dir/$3[$]$1_MAJOR_VERSION.dsp" + LIBFLAGS="$LIBFLAGS -o $3[$]$1_MAJOR_VERSION.so.0" + + # this can't be set up at the point the libtool script is generated + mv libtool libtool.bak + sed -e "s%^CC=\"gcc\"%CC=\"[$]$3_src_dir/cfg/gendsp.sh\"%" \ + -e "s%^CC=\".*/wrapmsvc.exe\"%CC=\"[$]$3_src_dir/cfg/gendsp.sh\"%" \ + <libtool.bak >libtool + rm -f libtool.bak + chmod 755 libtool +fi + +AC_SUBST([$1_DSP_LIBS]) +AC_SUBST([$1_DSP_INCS]) +AC_SUBST([$1_DSP_DEFS]) +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/misc_compiler.m4 SIMVoleon-2.0.1/cfg/m4/misc_compiler.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/misc_compiler.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/misc_compiler.m4 2004-08-29 06:30:53.000000000 +0200 @@ -0,0 +1,77 @@ +# Use this file to store miscellaneous macros related to checking +# compiler features. + +############################################################################ +# Usage: +# SIM_AC_CC_COMPILER_OPTION(OPTION-TO-TEST, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +# SIM_AC_CXX_COMPILER_OPTION(OPTION-TO-TEST, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +# +# Description: +# +# Check whether the current C or C++ compiler can handle a +# particular command-line option. +# +# +# Author: Morten Eriksen, <mortene@sim.no>. +# +# * [mortene:19991218] improve macros by catching and analyzing +# stderr (at least to see if there was any output there)? +# + +AC_DEFUN([SIM_AC_COMPILER_OPTION], [ +sim_ac_save_cppflags=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $1" +AC_TRY_COMPILE([], [], [sim_ac_accept_result=yes], [sim_ac_accept_result=no]) +AC_MSG_RESULT([$sim_ac_accept_result]) +CPPFLAGS=$sim_ac_save_cppflags +# This need to go last, in case CPPFLAGS is modified in arg 2 or arg 3. +if test $sim_ac_accept_result = yes; then + ifelse([$2], , :, [$2]) +else + ifelse([$3], , :, [$3]) +fi +]) + +AC_DEFUN([SIM_AC_COMPILER_BEHAVIOR_OPTION_QUIET], [ +sim_ac_save_cppflags=$CPPFLAGS +CPPFLAGS="$CPPFLAGS $1" +AC_TRY_COMPILE([], [$2], [sim_ac_accept_result=yes], [sim_ac_accept_result=no]) +CPPFLAGS=$sim_ac_save_cppflags +# This need to go last, in case CPPFLAGS is modified in arg 3 or arg 4. +if test $sim_ac_accept_result = yes; then + ifelse([$3], , :, [$3]) +else + ifelse([$4], , :, [$4]) +fi +]) + + +AC_DEFUN([SIM_AC_CC_COMPILER_OPTION], [ +AC_LANG_SAVE +AC_LANG(C) +AC_MSG_CHECKING([whether $CC accepts $1]) +SIM_AC_COMPILER_OPTION([$1], [$2], [$3]) +AC_LANG_RESTORE +]) + +AC_DEFUN([SIM_AC_CC_COMPILER_BEHAVIOR_OPTION_QUIET], [ +AC_LANG_SAVE +AC_LANG(C) +SIM_AC_COMPILER_BEHAVIOR_OPTION_QUIET([$1], [$2], [$3], [$4]) +AC_LANG_RESTORE +]) + +AC_DEFUN([SIM_AC_CXX_COMPILER_OPTION], [ +AC_LANG_SAVE +AC_LANG(C++) +AC_MSG_CHECKING([whether $CXX accepts $1]) +SIM_AC_COMPILER_OPTION([$1], [$2], [$3]) +AC_LANG_RESTORE +]) + +AC_DEFUN([SIM_AC_CXX_COMPILER_BEHAVIOR_OPTION_QUIET], [ +AC_LANG_SAVE +AC_LANG(C++) +SIM_AC_COMPILER_BEHAVIOR_OPTION_QUIET([$1], [$2], [$3], [$4]) +AC_LANG_RESTORE +]) diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/project.m4 SIMVoleon-2.0.1/cfg/m4/project.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/project.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/project.m4 2004-01-09 14:03:20.000000000 +0100 @@ -0,0 +1,22 @@ +# +# SIM_AC_CHECK_PROJECT_BETA_STATUS_IFELSE( IF-BETA, IF-BONA-FIDE ) +# +# Sets sim_ac_source_release to true or false +# + +AC_DEFUN([SIM_AC_CHECK_PROJECT_BETA_STATUS_IFELSE], [ +AC_MSG_CHECKING([for project release status]) +case $VERSION in +*[[a-z]]* ) + AC_MSG_RESULT([beta / inbetween releases]) + sim_ac_source_release=false + ifelse($1, [], :, $1) + ;; +* ) + AC_MSG_RESULT([release version]) + sim_ac_source_release=true + ifelse($2, [], :, $2) + ;; +esac +]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/sim.m4 SIMVoleon-2.0.1/cfg/m4/sim.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/sim.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/sim.m4 2004-01-09 14:03:20.000000000 +0100 @@ -0,0 +1,31 @@ +# +# SIM_AC_CHECK_SIMIAN_IFELSE( IF-SIMIAN, IF-NOT-SIMIAN ) +# +# Sets $sim_ac_simian to true or false +# + +AC_DEFUN([SIM_AC_CHECK_SIMIAN_IFELSE], [ +AC_MSG_CHECKING([if user is simian]) +case `hostname -d 2>/dev/null || domainname 2>/dev/null || hostname` in +*.sim.no | sim.no ) + sim_ac_simian=true + ;; +* ) + if grep -ls "domain.*sim\\.no" /etc/resolv.conf >/dev/null; then + sim_ac_simian=true + : + else + sim_ac_simian=false + : + fi + ;; +esac + +if $sim_ac_simian; then + AC_MSG_RESULT([probably]) + ifelse($1, [], :, $1) +else + AC_MSG_RESULT([probably not]) + ifelse($2, [], :, $2) +fi]) + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/uniqify.m4 SIMVoleon-2.0.1/cfg/m4/uniqify.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/uniqify.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/uniqify.m4 2004-08-29 06:30:53.000000000 +0200 @@ -0,0 +1,44 @@ +# ************************************************************************** +# SIM_AC_UNIQIFY_LIST( VARIABLE, LIST ) +# +# This macro filters out redundant items from a list. This macro was made +# to avoid having multiple equivalent -I and -L options for the compiler on +# the command-line, which made compilation quite messy to watch. +# +# BUGS: +# Items with spaces are probably not supported. +# +# Authors: +# Lars J. Aas <larsa@sim.no> +# + +AC_DEFUN([SIM_AC_UNIQIFY_LIST], [ +sim_ac_save_prefix=$prefix +sim_ac_save_exec_prefix=$exec_prefix +test x"$prefix" = xNONE && prefix=/usr/local +test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' +sim_ac_uniqued_list= +for sim_ac_item in $2; do + eval sim_ac_eval_item="$sim_ac_item" + eval sim_ac_eval_item="$sim_ac_eval_item" + if test x"$sim_ac_uniqued_list" = x; then + sim_ac_uniqued_list="$sim_ac_item" + else + sim_ac_unique=true + for sim_ac_uniq in $sim_ac_uniqued_list; do + eval sim_ac_eval_uniq="$sim_ac_uniq" + eval sim_ac_eval_uniq="$sim_ac_eval_uniq" + test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false + done + $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" + fi +done +$1=$sim_ac_uniqued_list +prefix=$sim_ac_save_prefix +exec_prefix=$sim_ac_save_exec_prefix +# unset sim_ac_save_prefix +# unset sim_ac_save_exec_prefix +# unset sim_ac_eval_item +# unset sim_ac_eval_uniq +]) # SIM_AC_UNIQIFY_LIST + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/uniqify_option_list.m4 SIMVoleon-2.0.1/cfg/m4/uniqify_option_list.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/uniqify_option_list.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/uniqify_option_list.m4 2004-08-29 06:30:53.000000000 +0200 @@ -0,0 +1,48 @@ +# ************************************************************************** +# SIM_AC_UNIQIFY_OPTION_LIST( VARIABLE, LIST ) +# +# This macro filters out redundant commandline options. It is heavily based +# on the SIM_AC_UNIQIFY_LIST macro, but has been extended to support +# spaces (i.e. for instance "-framework OpenGL" as needed on Mac OS X). +# +# Authors: +# Lars J. Aas <larsa@sim.no> +# Karin Kosina <kyrah@sim.no> +# Tamer Fahmy <tamer@tammura.at> + +AC_DEFUN([SIM_AC_UNIQIFY_OPTION_LIST], [ +sim_ac_save_prefix=$prefix +sim_ac_save_exec_prefix=$exec_prefix +test x"$prefix" = xNONE && prefix=/usr/local +test x"$exec_prefix" = xNONE && exec_prefix='${prefix}' +sim_ac_uniqued_list= +eval paramlist='"$2"' +sim_ac_sed_expr="[s,\(-[_a-zA-Z0-9][%_a-zA-Z0-9]*\) [ ]*\([_a-zA-Z0-9][_a-zA-Z0-9]*\),\1%%%%%\2,g]" +paramlist="`echo $paramlist | sed \"$sim_ac_sed_expr\"`" +while test x"$paramlist" != x"`echo $paramlist | sed \"$sim_ac_sed_expr\"`"; do + paramlist="`echo $paramlist | sed \"$sim_ac_sed_expr\"`" +done +for sim_ac_item in $paramlist; do + eval sim_ac_eval_item="$sim_ac_item" + eval sim_ac_eval_item="$sim_ac_eval_item" + if test x"$sim_ac_uniqued_list" = x; then + sim_ac_uniqued_list="$sim_ac_item" + else + sim_ac_unique=true + for sim_ac_uniq in $sim_ac_uniqued_list; do + eval sim_ac_eval_uniq="$sim_ac_uniq" + eval sim_ac_eval_uniq="$sim_ac_eval_uniq" + test x"$sim_ac_eval_item" = x"$sim_ac_eval_uniq" && sim_ac_unique=false + done + $sim_ac_unique && sim_ac_uniqued_list="$sim_ac_uniqued_list $sim_ac_item" + fi +done +$1=`echo $sim_ac_uniqued_list | sed 's/%%%%%/ /g'` +prefix=$sim_ac_save_prefix +exec_prefix=$sim_ac_save_exec_prefix +# unset sim_ac_save_prefix +# unset sim_ac_save_exec_prefix +# unset sim_ac_eval_item +# unset sim_ac_eval_uniq +]) # SIM_AC_UNIQIFY_OPTION_LIST + diff -uNr SIMVoleon-2.0.1.orig/cfg/m4/wrapmsvc.m4 SIMVoleon-2.0.1/cfg/m4/wrapmsvc.m4 --- SIMVoleon-2.0.1.orig/cfg/m4/wrapmsvc.m4 1970-01-01 01:00:00.000000000 +0100 +++ SIMVoleon-2.0.1/cfg/m4/wrapmsvc.m4 2004-08-29 06:30:54.000000000 +0200 @@ -0,0 +1,144 @@ +# ************************************************************************** +# SIM_AC_SETUP_MSVC_IFELSE( IF-FOUND, IF-NOT-FOUND ) +# +# This macro invokes IF-FOUND if the wrapmsvc wrapper can be run, and +# IF-NOT-FOUND if not. +# +# Authors: +# Morten Eriksen <mortene@coin3d.org> +# Lars J. Aas <larsa@coin3d.org> + +# ************************************************************************** + +AC_DEFUN([SIM_AC_MSVC_DISABLE_OPTION], [ +AC_ARG_ENABLE([msvc], + [AC_HELP_STRING([--disable-msvc], [don't require MS Visual C++ on Cygwin])], + [case $enableval in + no | false) sim_ac_try_msvc=false ;; + *) sim_ac_try_msvc=true ;; + esac], + [sim_ac_try_msvc=true]) +]) + +# ************************************************************************** +# Note: the SIM_AC_SETUP_MSVC_IFELSE macro has been OBSOLETED and +# replaced by the one below. +# +# If the Microsoft Visual C++ cl.exe compiler is available, set us up for +# compiling with it and to generate an MSWindows .dll file. + +AC_DEFUN([SIM_AC_SETUP_MSVCPP_IFELSE], +[ +AC_REQUIRE([SIM_AC_MSVC_DISABLE_OPTION]) +AC_REQUIRE([SIM_AC_SPACE_IN_PATHS]) + +: ${BUILD_WITH_MSVC=false} +if $sim_ac_try_msvc; then + if test -z "$CC" -a -z "$CXX"; then + sim_ac_wrapmsvc=`cd $ac_aux_dir; pwd`/wrapmsvc.exe + echo "$as_me:$LINENO: sim_ac_wrapmsvc=$sim_ac_wrapmsvc" >&AS_MESSAGE_LOG_FD + AC_MSG_CHECKING([setup for wrapmsvc.exe]) + if $sim_ac_wrapmsvc >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + m4_ifdef([$0_VISITED], + [AC_FATAL([Macro $0 invoked multiple times])]) + m4_define([$0_VISITED], 1) + CC=$sim_ac_wrapmsvc + CXX=$sim_ac_wrapmsvc + export CC CXX + BUILD_WITH_MSVC=true + AC_MSG_RESULT([working]) + else + case $host in + *-cygwin) + AC_MSG_RESULT([not working]) + SIM_AC_ERROR([no-msvc++]) ;; + *) + AC_MSG_RESULT([not working (as expected)]) + ;; + esac + fi + fi +fi +export BUILD_WITH_MSVC +AC_SUBST(BUILD_WITH_MSVC) + +if $BUILD_WITH_MSVC; then + ifelse([$1], , :, [$1]) +else + ifelse([$2], , :, [$2]) +fi +]) # SIM_AC_SETUP_MSVC_IFELSE + +# ************************************************************************** +# SIM_AC_SETUP_MSVCRT +# +# This macro sets up compiler flags for the MS Visual C++ C library of +# choice. + +AC_DEFUN([SIM_AC_SETUP_MSVCRT], +[sim_ac_msvcrt_LDFLAGS="" +sim_ac_msvcrt_LIBS="" + +AC_ARG_WITH([msvcrt], + [AC_HELP_STRING([--with-msvcrt=<crt>], + [set which C run-time library to build against])], + [case `echo "$withval" | tr "[A-Z]" "[a-z]"` in + default | singlethread-static | ml | /ml | libc | libc\.lib ) + sim_ac_msvcrt=singlethread-static + sim_ac_msvcrt_CFLAGS="/ML" + sim_ac_msvcrt_CXXFLAGS="/ML" + ;; + default-debug | singlethread-static-debug | mld | /mld | libcd | libcd\.lib ) + sim_ac_msvcrt=singlethread-static-debug + sim_ac_msvcrt_CFLAGS="/MLd" + sim_ac_msvcrt_CXXFLAGS="/MLd" + ;; + multithread-static | mt | /mt | libcmt | libcmt\.lib ) + sim_ac_msvcrt=multithread-static + sim_ac_msvcrt_CFLAGS="/MT" + sim_ac_msvcrt_CXXFLAGS="/MT" + ;; + multithread-static-debug | mtd | /mtd | libcmtd | libcmtd\.lib ) + sim_ac_msvcrt=multithread-static-debug + sim_ac_msvcrt_CFLAGS="/MTd" + sim_ac_msvcrt_CXXFLAGS="/MTd" + ;; + multithread-dynamic | md | /md | msvcrt | msvcrt\.lib ) + sim_ac_msvcrt=multithread-dynamic + sim_ac_msvcrt_CFLAGS="/MD" + sim_ac_msvcrt_CXXFLAGS="/MD" + ;; + multithread-dynamic-debug | mdd | /mdd | msvcrtd | msvcrtd\.lib ) + sim_ac_msvcrt=multithread-dynamic-debug + sim_ac_msvcrt_CFLAGS="/MDd" + sim_ac_msvcrt_CXXFLAGS="/MDd" + ;; + *) + SIM_AC_ERROR([invalid-msvcrt]) + ;; + esac], + [sim_ac_msvcrt=singlethread-static]) + +AC_MSG_CHECKING([MSVC++ C library choice]) +AC_MSG_RESULT([$sim_ac_msvcrt]) + +$1 +]) # SIM_AC_SETUP_MSVCRT + +# ************************************************************************** +# SIM_AC_SPACE_IN_PATHS + +AC_DEFUN([SIM_AC_SPACE_IN_PATHS], [ +sim_ac_full_builddir=`pwd` +sim_ac_full_srcdir=`cd $srcdir; pwd` +if test -z "`echo $sim_ac_full_srcdir | tr -cd ' '`"; then :; else + AC_MSG_WARN([Detected space character in the path leading up to the Coin source directory - this will probably cause random problems later. You are advised to move the Coin source directory to another location.]) + SIM_AC_CONFIGURATION_WARNING([Detected space character in the path leading up to the Coin source directory - this will probably cause random problems later. You are advised to move the Coin source directory to another location.]) +fi +if test -z "`echo $sim_ac_full_builddir | tr -cd ' '`"; then :; else + AC_MSG_WARN([Detected space character in the path leading up to the Coin build directory - this will probably cause random problems later. You are advised to move the Coin build directory to another location.]) + SIM_AC_CONFIGURATION_WARNING([Detected space character in the path leading up to the Coin build directory - this will probably cause random problems later. You are advised to move the Coin build directory to another location.]) +fi +]) # SIM_AC_SPACE_IN_PATHS + +# EOF **********************************************************************