From ff62f5bf18722d2f93b2f924411bda0e9550d590 Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 12 Sep 2006 18:57:02 +0000 Subject: [PATCH] PR: first version from Antony GEAY, with directory restructuration --- AUTHORS | 0 ChangeLog | 0 Makefile.am | 2 + NEWS | 0 README | 4 + adm/unix/config_files/ac_pkg_swig.m4 | 150 ++++++++++ adm/unix/config_files/ac_prog_esope.m4 | 50 ++++ adm/unix/config_files/ac_python_devel.m4 | 60 ++++ adm/unix/config_files/check_cppunit.m4 | 64 +++++ adm/unix/config_files/check_qt.m4 | 154 +++++++++++ adm/unix/config_files/production.m4 | 107 ++++++++ adm/unix/config_files/thread.m4 | 24 ++ adm/unix/make_begin.am | 2 + adm/unix/make_end.am | 11 + build_configure | 62 +++++ configure.in.base | 16 ++ doc/opml.dtd | 63 +++++ doc/opml.xslt | 57 ++++ doc/programingRules.sxw | Bin 0 -> 7332 bytes mkinstalldirs | 99 +++++++ py-compile | 92 +++++++ rfind | 52 ++++ root_clean | 26 ++ src/Makefile.am | 2 + src/bases/Exception.cxx | 16 ++ src/bases/Exception.hxx | 20 ++ src/bases/Makefile.am | 20 ++ src/bases/Mutex.cxx | 7 + src/bases/Mutex.hxx | 28 ++ src/bases/MutexPT.cxx | 24 ++ src/bases/MutexPT.hxx | 25 ++ src/bases/Semaphore.cxx | 7 + src/bases/Semaphore.hxx | 30 ++ src/bases/SemaphorePT.cxx | 30 ++ src/bases/SemaphorePT.hxx | 24 ++ src/bases/Test/Makefile.am | 18 ++ src/bases/Test/test1.cxx | 139 ++++++++++ src/bases/Thread.cxx | 9 + src/bases/Thread.hxx | 31 +++ src/bases/ThreadPT.cxx | 26 ++ src/bases/ThreadPT.hxx | 25 ++ src/bases/define.hxx | 53 ++++ src/basicData/ContentOfDataFlow.cxx | 104 +++++++ src/basicData/ContentOfDataFlow.hxx | 88 ++++++ src/basicData/ConversionException.cxx | 14 + src/basicData/ConversionException.hxx | 22 ++ src/basicData/Data.cxx | 127 +++++++++ src/basicData/Data.hxx | 84 ++++++ src/basicData/Makefile.am | 26 ++ src/basicData/Test/Makefile.am | 21 ++ src/basicData/Test/testData.cxx | 118 ++++++++ src/basicData/TypeCheckerDataFlow.cxx | 11 + src/basicData/TypeCheckerDataFlow.hxx | 332 +++++++++++++++++++++++ src/basicData/TypeCheckerDataStream.cxx | 127 +++++++++ src/basicData/TypeCheckerDataStream.hxx | 24 ++ src/engine/Bloc.cxx | 220 +++++++++++++++ src/engine/Bloc.hxx | 41 +++ src/engine/ComposedNode.cxx | 288 ++++++++++++++++++++ src/engine/ComposedNode.hxx | 51 ++++ src/engine/DataFlowPort.cxx | 25 ++ src/engine/DataFlowPort.hxx | 31 +++ src/engine/DataStreamPort.cxx | 14 + src/engine/DataStreamPort.hxx | 30 ++ src/engine/ElementaryNode.cxx | 110 ++++++++ src/engine/ElementaryNode.hxx | 43 +++ src/engine/Executor.cxx | 123 +++++++++ src/engine/Executor.hxx | 43 +++ src/engine/InGate.cxx | 47 ++++ src/engine/InGate.hxx | 37 +++ src/engine/InPort.cxx | 7 + src/engine/InPort.hxx | 18 ++ src/engine/InputDataStreamPort.cxx | 16 ++ src/engine/InputDataStreamPort.hxx | 22 ++ src/engine/InputPort.cxx | 45 +++ src/engine/InputPort.hxx | 31 +++ src/engine/Loop.cxx | 282 +++++++++++++++++++ src/engine/Loop.hxx | 78 ++++++ src/engine/Makefile.am | 40 +++ src/engine/Node.cxx | 142 ++++++++++ src/engine/Node.hxx | 134 +++++++++ src/engine/OutGate.cxx | 67 +++++ src/engine/OutGate.hxx | 35 +++ src/engine/OutPort.cxx | 7 + src/engine/OutPort.hxx | 23 ++ src/engine/OutputDataStreamPort.cxx | 57 ++++ src/engine/OutputDataStreamPort.hxx | 36 +++ src/engine/OutputPort.cxx | 100 +++++++ src/engine/OutputPort.hxx | 40 +++ src/engine/Port.cxx | 18 ++ src/engine/Port.hxx | 40 +++ src/engine/Scheduler.hxx | 25 ++ src/engine/Switch.cxx | 28 ++ src/engine/Switch.hxx | 27 ++ src/engine/Task.hxx | 19 ++ src/engine/Test/Makefile.am | 36 +++ src/engine/Test/ToyNode.cxx | 72 +++++ src/engine/Test/ToyNode.hxx | 28 ++ src/engine/Test/testBloc.cxx | 153 +++++++++++ src/engine/Test/testPorts.cxx | 103 +++++++ 99 files changed, 5559 insertions(+) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100755 adm/unix/config_files/ac_pkg_swig.m4 create mode 100755 adm/unix/config_files/ac_prog_esope.m4 create mode 100755 adm/unix/config_files/ac_python_devel.m4 create mode 100755 adm/unix/config_files/check_cppunit.m4 create mode 100755 adm/unix/config_files/check_qt.m4 create mode 100755 adm/unix/config_files/production.m4 create mode 100755 adm/unix/config_files/thread.m4 create mode 100755 adm/unix/make_begin.am create mode 100755 adm/unix/make_end.am create mode 100755 build_configure create mode 100644 configure.in.base create mode 100644 doc/opml.dtd create mode 100644 doc/opml.xslt create mode 100644 doc/programingRules.sxw create mode 100755 mkinstalldirs create mode 100755 py-compile create mode 100755 rfind create mode 100755 root_clean create mode 100644 src/Makefile.am create mode 100644 src/bases/Exception.cxx create mode 100644 src/bases/Exception.hxx create mode 100644 src/bases/Makefile.am create mode 100644 src/bases/Mutex.cxx create mode 100644 src/bases/Mutex.hxx create mode 100644 src/bases/MutexPT.cxx create mode 100644 src/bases/MutexPT.hxx create mode 100644 src/bases/Semaphore.cxx create mode 100644 src/bases/Semaphore.hxx create mode 100644 src/bases/SemaphorePT.cxx create mode 100644 src/bases/SemaphorePT.hxx create mode 100644 src/bases/Test/Makefile.am create mode 100644 src/bases/Test/test1.cxx create mode 100644 src/bases/Thread.cxx create mode 100644 src/bases/Thread.hxx create mode 100644 src/bases/ThreadPT.cxx create mode 100644 src/bases/ThreadPT.hxx create mode 100644 src/bases/define.hxx create mode 100644 src/basicData/ContentOfDataFlow.cxx create mode 100644 src/basicData/ContentOfDataFlow.hxx create mode 100644 src/basicData/ConversionException.cxx create mode 100644 src/basicData/ConversionException.hxx create mode 100644 src/basicData/Data.cxx create mode 100644 src/basicData/Data.hxx create mode 100644 src/basicData/Makefile.am create mode 100644 src/basicData/Test/Makefile.am create mode 100644 src/basicData/Test/testData.cxx create mode 100644 src/basicData/TypeCheckerDataFlow.cxx create mode 100644 src/basicData/TypeCheckerDataFlow.hxx create mode 100644 src/basicData/TypeCheckerDataStream.cxx create mode 100644 src/basicData/TypeCheckerDataStream.hxx create mode 100644 src/engine/Bloc.cxx create mode 100644 src/engine/Bloc.hxx create mode 100644 src/engine/ComposedNode.cxx create mode 100644 src/engine/ComposedNode.hxx create mode 100644 src/engine/DataFlowPort.cxx create mode 100644 src/engine/DataFlowPort.hxx create mode 100644 src/engine/DataStreamPort.cxx create mode 100644 src/engine/DataStreamPort.hxx create mode 100644 src/engine/ElementaryNode.cxx create mode 100644 src/engine/ElementaryNode.hxx create mode 100644 src/engine/Executor.cxx create mode 100644 src/engine/Executor.hxx create mode 100644 src/engine/InGate.cxx create mode 100644 src/engine/InGate.hxx create mode 100644 src/engine/InPort.cxx create mode 100644 src/engine/InPort.hxx create mode 100644 src/engine/InputDataStreamPort.cxx create mode 100644 src/engine/InputDataStreamPort.hxx create mode 100644 src/engine/InputPort.cxx create mode 100644 src/engine/InputPort.hxx create mode 100644 src/engine/Loop.cxx create mode 100644 src/engine/Loop.hxx create mode 100644 src/engine/Makefile.am create mode 100644 src/engine/Node.cxx create mode 100644 src/engine/Node.hxx create mode 100644 src/engine/OutGate.cxx create mode 100644 src/engine/OutGate.hxx create mode 100644 src/engine/OutPort.cxx create mode 100644 src/engine/OutPort.hxx create mode 100644 src/engine/OutputDataStreamPort.cxx create mode 100644 src/engine/OutputDataStreamPort.hxx create mode 100644 src/engine/OutputPort.cxx create mode 100644 src/engine/OutputPort.hxx create mode 100644 src/engine/Port.cxx create mode 100644 src/engine/Port.hxx create mode 100644 src/engine/Scheduler.hxx create mode 100644 src/engine/Switch.cxx create mode 100644 src/engine/Switch.hxx create mode 100644 src/engine/Task.hxx create mode 100644 src/engine/Test/Makefile.am create mode 100644 src/engine/Test/ToyNode.cxx create mode 100644 src/engine/Test/ToyNode.hxx create mode 100644 src/engine/Test/testBloc.cxx create mode 100644 src/engine/Test/testPorts.cxx diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..e69de29bb diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 000000000..2cad62a26 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,2 @@ + +SUBDIRS = src diff --git a/NEWS b/NEWS new file mode 100644 index 000000000..e69de29bb diff --git a/README b/README new file mode 100644 index 000000000..d981c48b5 --- /dev/null +++ b/README @@ -0,0 +1,4 @@ +IMPROVEMENTS : + +- OutGate::isAlreadyInList : use std::find +- Bloc::checkNoCyclePassingThrough : first loop iter1=currentNodesToTest.erase(iter1) as last argument diff --git a/adm/unix/config_files/ac_pkg_swig.m4 b/adm/unix/config_files/ac_pkg_swig.m4 new file mode 100755 index 000000000..6810ca27b --- /dev/null +++ b/adm/unix/config_files/ac_pkg_swig.m4 @@ -0,0 +1,150 @@ +dnl @synopsis AC_PROG_SWIG([major.minor.micro]) +dnl +dnl This macro searches for a SWIG installation on your system. If found you +dnl should) SWIG via $(SWIG). You can use the optional first argument to check +dnl if the version of the available SWIG is greater than or equal to the +dnl value of the argument. It should have the format: N[.N[.N]] (N is a +dnl number between 0 and 999. Only the first N is mandatory.) +dnl +dnl If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that the +dnl swig package is this version number or higher. +dnl +dnl In configure.in, use as: +dnl +dnl AC_PROG_SWIG(1.3.17) +dnl SWIG_ENABLE_CXX +dnl SWIG_MULTI_MODULE_SUPPORT +dnl SWIG_PYTHON +dnl +dnl @authors Sebastian Huber , Alan W. Irwin +dnl , Rafael Laboissiere and +dnl Andrew Collier . +dnl +dnl +AC_DEFUN([AC_PROG_SWIG],[ + AC_PATH_PROG([SWIG],[swig]) + if test -z "$SWIG" ; then + AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) + SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' + elif test -n "$1" ; then + AC_MSG_CHECKING([for SWIG version]) + [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] + AC_MSG_RESULT([$swig_version]) + if test -n "$swig_version" ; then + # Calculate the required version number components + [required=$1] + [required_major=`echo $required | sed 's/[^0-9].*//'`] + if test -z "$required_major" ; then + [required_major=0] + fi + [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required_minor=`echo $required | sed 's/[^0-9].*//'`] + if test -z "$required_minor" ; then + [required_minor=0] + fi + [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] + [required_patch=`echo $required | sed 's/[^0-9].*//'`] + if test -z "$required_patch" ; then + [required_patch=0] + fi + # Calculate the available version number components + [available=$swig_version] + [available_major=`echo $available | sed 's/[^0-9].*//'`] + if test -z "$available_major" ; then + [available_major=0] + fi + [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] + [available_minor=`echo $available | sed 's/[^0-9].*//'`] + if test -z "$available_minor" ; then + [available_minor=0] + fi + [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] + [available_patch=`echo $available | sed 's/[^0-9].*//'`] + if test -z "$available_patch" ; then + [available_patch=0] + fi + if test $available_major -ne $required_major \ + -o $available_minor -ne $required_minor \ + -o $available_patch -lt $required_patch ; then + AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) + SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' + else + AC_MSG_NOTICE([SWIG executable is '$SWIG']) + SWIG_LIB=`$SWIG -swiglib` + AC_MSG_NOTICE([SWIG runtime library directory is '$SWIG_LIB']) + fi + else + AC_MSG_WARN([cannot determine SWIG version]) + SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' + fi + fi + AC_SUBST([SWIG_LIB]) +]) + +# SWIG_ENABLE_CXX() +# +# Enable SWIG C++ support. This affects all invocations of $(SWIG). +AC_DEFUN([SWIG_ENABLE_CXX],[ + AC_REQUIRE([AC_PROG_SWIG]) + AC_REQUIRE([AC_PROG_CXX]) + SWIG="$SWIG -c++" +]) + +# SWIG_MULTI_MODULE_SUPPORT() +# +# Enable support for multiple modules. This effects all invocations +# of $(SWIG). You have to link all generated modules against the +# appropriate SWIG runtime library. If you want to build Python +# modules for example, use the SWIG_PYTHON() macro and link the +# modules against $(SWIG_PYTHON_LIBS). +AC_DEFUN([SWIG_MULTI_MODULE_SUPPORT],[ + AC_REQUIRE([AC_PROG_SWIG]) + SWIG="$SWIG -c" +]) + +# SWIG_PYTHON([use-shadow-classes = {no, yes}]) +# +# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS), +# $(SWIG_PYTHON_LIBS) and $(SWIG_PYTHON_OPT) output variables. +# $(SWIG_PYTHON_OPT) contains all necessary SWIG options to generate +# code for Python. Shadow classes are enabled unless the value of the +# optional first argument is exactly 'no'. If you need multi module +# support (provided by the SWIG_MULTI_MODULE_SUPPORT() macro) use +# $(SWIG_PYTHON_LIBS) to link against the appropriate library. It +# contains the SWIG Python runtime library that is needed by the type +# check system for example. +AC_DEFUN([SWIG_PYTHON],[ + AC_REQUIRE([AC_PROG_SWIG]) + AC_REQUIRE([AC_PYTHON_DEVEL]) + test "x$1" != "xno" || swig_shadow=" -noproxy" + AC_SUBST([SWIG_PYTHON_OPT],[-python$swig_shadow]) + AC_SUBST([SWIG_PYTHON_CPPFLAGS],[$PYTHON_CPPFLAGS]) + AC_SUBST([SWIG_PYTHON_LIBS],["-L$SWIG_LIB -lswigpy"]) +]) + + +dnl @synopsis AC_LIB_WAD +dnl +dnl This macro searches for installed WAD library. +dnl +AC_DEFUN([AC_LIB_WAD], +[ + AC_REQUIRE([AC_PYTHON_DEVEL]) + AC_ARG_ENABLE(wad, + AC_HELP_STRING([--enable-wad], [enable wad module]), + [ + case "${enableval}" in + no) ;; + *) if test "x${enableval}" = xyes; + then + check_wad="yes" + fi ;; + esac + ], []) + + if test -n "$check_wad"; + then + AC_CHECK_LIB(wadpy, _init, [WADPY=-lwadpy], [], $PYTHON_LDFLAGS $PYTHON_EXTRA_LIBS) + AC_SUBST(WADPY) + fi +]) diff --git a/adm/unix/config_files/ac_prog_esope.m4 b/adm/unix/config_files/ac_prog_esope.m4 new file mode 100755 index 000000000..4b9e42c23 --- /dev/null +++ b/adm/unix/config_files/ac_prog_esope.m4 @@ -0,0 +1,50 @@ +# Check availability of Med binary distribution +# +# Author : Anthony GEAY (CEA, 2005) +# + +AC_DEFUN([AC_PROG_ESOPE],[ +CHECK_MED + +AC_CHECKING(for Esope) + +srcdirea=`( cd $srcdir && pwd )` + +esope_ok=yes + +AC_ARG_WITH(esope, + [ --with-esope=EXEC esope executable ], + [ESOPE="$withval" + AC_MSG_RESULT("select $withval as esope executable") + ], [ + AC_PATH_PROG(ESOPE, esopv10_0) + ]) +if test "x$ESOPE" = "x" ; +then + ESOPE=$srcdirea/bin/esopv10_0 + AC_MSG_RESULT(use esope furnished in sources at location : $ESOPE) +fi +AC_SUBST(ESOPE) + +dnl --- To improve UNIX 32 +EFLAGS="ESOPE=2000000,NORME=TRADUCTEUR,FORT=UNIX32" +AC_SUBST(EFLAGS) + +AC_PATH_PROG(CPPFORESOPE, cpp) +if test "x$CPPFORESOPE" = "x" ; +then + esope_ok=no + AC_MSG_RESULT(cpp not found in PATH !!! - used by esope to generate Fortran files) +fi +AC_SUBST(CPPFORESOPE) + +CPPFORESOPEFLAGS="-Dunix32 -Dlinux ${MED_INCLUDES}" +AC_SUBST(CPPFORESOPEFLAGS) +dnl --- Segment directory +SEGMENTS_DIR="-I"$srcdirea/bin/SEGMENTS +AC_SUBST(SEGMENTS_DIR) + +AC_MSG_RESULT(for Esope: $esope_ok) + +])dnl + diff --git a/adm/unix/config_files/ac_python_devel.m4 b/adm/unix/config_files/ac_python_devel.m4 new file mode 100755 index 000000000..e0ac20c9c --- /dev/null +++ b/adm/unix/config_files/ac_python_devel.m4 @@ -0,0 +1,60 @@ +dnl @synopsis AC_PYTHON_DEVEL() +dnl +dnl Checks for Python and tries to get the include path to 'Python.h'. +dnl It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output variable. +dnl +dnl @authors Sebastian Huber , Alan W. Irwin +dnl , Rafael Laboissiere and +dnl Andrew Collier . +dnl +dnl +AC_DEFUN([AC_PYTHON_DEVEL],[ + # + # should allow for checking of python version here... + # + AC_REQUIRE([AM_PATH_PYTHON]) + + # Check for Python include path + AC_MSG_CHECKING([for Python include path]) + python_path=`echo $PYTHON | sed "s,/bin.*$,,"` + for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do + python_path=`find $i -type f -name Python.h -print | sed "1q"` + if test -n "$python_path" ; then + break + fi + done + python_path=`echo $python_path | sed "s,/Python.h$,,"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python include path]) + fi + AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path]) + + # Check for Python library path + AC_MSG_CHECKING([for Python library path]) + python_path=`echo $PYTHON | sed "s,/bin.*$,,"` + for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do + python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"` + if test -n "$python_path" ; then + break + fi + done + python_path=`echo $python_path | sed "s,/libpython.*$,,"` + AC_MSG_RESULT([$python_path]) + if test -z "$python_path" ; then + AC_MSG_ERROR([cannot find Python library path]) + fi + AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"]) + # + python_site=`echo $python_path | sed "s/config/site-packages/"` + AC_SUBST([PYTHON_SITE_PKG],[$python_site]) + # + # libraries which must be linked in when embedding + # + AC_MSG_CHECKING(python extra libraries) + PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ + conf = distutils.sysconfig.get_config_var; \ + print conf('LOCALMODLIBS')+' '+conf('LIBS')" + AC_MSG_RESULT($PYTHON_EXTRA_LIBS)` + AC_SUBST(PYTHON_EXTRA_LIBS) +]) diff --git a/adm/unix/config_files/check_cppunit.m4 b/adm/unix/config_files/check_cppunit.m4 new file mode 100755 index 000000000..78ec1b817 --- /dev/null +++ b/adm/unix/config_files/check_cppunit.m4 @@ -0,0 +1,64 @@ +# Check presence of "CPPUNIT" product presence +# +# Author : Anthony GEAY (CEA, 2006) +# + +AC_DEFUN([CHECK_CPPUNIT],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CPP])dnl + +AC_CHECKING(for CPPUNIT) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +cppunit_ok=no +AC_ARG_WITH(cppunit, + [AC_HELP_STRING([--with-cppunit=DIR],[cppunit directory path where cppunit is installed])], + [CPPUNITINSTDIR="$withval" + AC_MSG_RESULT("select $withval as path to cppunit") + ]) + +AC_SUBST(CPPUNIT_INCLUDES) +AC_SUBST(CPPUNIT_LIBS) +AC_SUBST(CPPUNIT_LIBS_DIR) +AC_SUBST(CPPUNITINSTDIR) + +CPPUNIT_INCLUDES="" +CPPUNIT_LIBS="" + +LOCAL_INCLUDES="" +LOCAL_LIBS="" + +if test "x$CPPUNITINSTDIR" = "x" +then + LOCAL_INCLUDES="" + LOCAL_LIBS_DIR="" +else + LOCAL_INCLUDES="-I$CPPUNITINSTDIR/include" + LOCAL_LIBS_DIR="$CPPUNITINSTDIR/lib" +fi + +dnl cppunit headers + +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES" +AC_LANG_CPLUSPLUS +AC_CHECK_HEADER(cppunit/ui/text/TestRunner.h,cppunit_ok=yes ,cppunit_ok=no) +CPPFLAGS="$CPPFLAGS_old" + +if test "x$cppunit_ok" = "xyes" +then + if test "x$LOCAL_INCLUDES" = "x" + then + CPPUNIT_INCLUDES="" + CPPUNIT_LIBS="-lcppunit" + CPPUNIT_LIBS_DIR="" + else + CPPUNIT_INCLUDES="$LOCAL_INCLUDES" + CPPUNIT_LIBS="-L$LOCAL_LIBS_DIR -lcppunit" + CPPUNIT_LIBS_DIR="$LOCAL_LIBS_DIR" + fi +fi +AC_LANG_RESTORE +AC_MSG_RESULT(for cppunit: $cppunit_ok) + +])dnl diff --git a/adm/unix/config_files/check_qt.m4 b/adm/unix/config_files/check_qt.m4 new file mode 100755 index 000000000..e8df7ee47 --- /dev/null +++ b/adm/unix/config_files/check_qt.m4 @@ -0,0 +1,154 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl + +AC_DEFUN([CHECK_QT],[ +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CPP])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for QT) +qt_ok=yes + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +if test "x$QTDIR" = "x" +then + AC_MSG_RESULT(please define QTDIR variable) + qt_ok=no +fi + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/moc + then + MOC=${QTDIR}/bin/moc + else + AC_PATH_PROG(MOC, moc) + fi + if test "x$MOC" = "x" + then + qt_ok=no + AC_MSG_RESULT(moc qt-compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(moc found) + fi +fi + +if test "x$qt_ok" = "xyes" +then + if test -f ${QTDIR}/bin/uic + then + UIC=${QTDIR}/bin/uic + else + AC_PATH_PROG(UIC, uic) + fi + if test "x$UIC" = "x" + then + qt_ok=no + AC_MSG_RESULT(uic qt-interface compiler not in PATH variable) + else + qt_ok=yes + AC_MSG_RESULT(uic found) + fi +fi + +AC_SUBST(QTDIR) +QT_ROOT=$QTDIR + +if test "x$qt_ok" = "xyes" +then + AC_MSG_CHECKING(include of qt headers) + + CPPFLAGS_old=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$QTDIR/include" + + AC_LANG_CPLUSPLUS + AC_CHECK_HEADER(qaction.h,qt_ok=yes ,qt_ok=no) + + CPPFLAGS=$CPPFLAGS_old + + if test "x$qt_ok" = "xno" + then + AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include) + AC_MSG_RESULT(QTDIR environment variable may be wrong) + else + AC_MSG_RESULT(yes) + QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" + QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT" + fi +fi + +if test "x$qt_ok" = "xyes" +then + AC_MSG_CHECKING(linking qt library) + LIBS_old=$LIBS + LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS" + + CXXFLAGS_old=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -I$QTDIR/include" + + AC_CACHE_VAL(salome_cv_lib_qt,[ + AC_TRY_LINK( +#include +, int n; + char **s; + QApplication a(n, s); + a.exec();, + eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no") + ]) + qt_ok="$salome_cv_lib_qt" + + if test "x$qt_ok" = "xno" + then + AC_MSG_RESULT(unable to link with qt library) + AC_MSG_RESULT(QTDIR environment variable may be wrong) + else + AC_MSG_RESULT(yes) + QT_LIBS="-L$QTDIR/lib -lqt-mt" + QT_MT_LIBS="-L$QTDIR/lib -lqt-mt" + fi + + LIBS=$LIBS_old + CXXFLAGS=$CXXFLAGS_old + +fi + +AC_SUBST(MOC) +AC_SUBST(UIC) + +AC_SUBST(QT_ROOT) +AC_SUBST(QT_INCLUDES) +AC_SUBST(QT_LIBS) +AC_SUBST(QT_MT_LIBS) + +AC_LANG_RESTORE + +AC_MSG_RESULT(for qt: $qt_ok) + +# Save cache +AC_CACHE_SAVE + +])dnl +dnl diff --git a/adm/unix/config_files/production.m4 b/adm/unix/config_files/production.m4 new file mode 100755 index 000000000..d5fa2a330 --- /dev/null +++ b/adm/unix/config_files/production.m4 @@ -0,0 +1,107 @@ +dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +dnl +dnl +dnl +dnl define macros : +dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION +dnl and +dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG +dnl +dnl version $Id$ +dnl author Patrick GOLDBRONN +dnl + +# AC_ENABLE_PRODUCTION +AC_DEFUN(AC_ENABLE_PRODUCTION, [dnl +define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(production, +changequote(<<, >>)dnl +<< --enable-production[=PKGS] build without debug information [default=>>AC_ENABLE_PRODUCTION_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_production=yes ;; +no) enable_production=no ;; +*) + enable_production=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_production=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl +if test "X$enable_production" = "Xyes"; then + FFLAGS="$FFLAGS -O3 " + CFLAGS="$CFLAGS -O3 " + CXXFLAGS="$CXXFLAGS -O3 " +else + FFLAGS="$FFLAGS" + CFLAGS="$CFLAGS" + CXXFLAGS="$CXXFLAGS" +fi +]) + +# AC_DISABLE_PRODUCTION - set the default flag to --disable-production +AC_DEFUN(AC_DISABLE_PRODUCTION, [AC_ENABLE_PRODUCTION(no)]) + +# AC_ENABLE_DEBUG +AC_DEFUN(AC_ENABLE_DEBUG, [dnl +define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE(debug, +changequote(<<, >>)dnl +<< --enable-debug[=PKGS] build without debug information [default=>>AC_ENABLE_DEBUG_DEFAULT], +changequote([, ])dnl +[p=${PACKAGE-default} +case "$enableval" in +yes) enable_debug=yes ;; +no) enable_debug=no ;; +*) + enable_debug=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_debug=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac], +enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl + +if test "X$enable_debug" = "Xyes"; then + FFLAGS="$FFLAGS -g " + CFLAGS="$CFLAGS -g " + CXXFLAGS="$CXXFLAGS -g " +else + FFLAGS="$FFLAGS" + CFLAGS="$CFLAGS" + CXXFLAGS="$CXXFLAGS" +fi +]) + +# AC_DISABLE_DEBUG - set the default flag to --disable-debug +AC_DEFUN(AC_DISABLE_DEBUG, [AC_ENABLE_DEBUG(no)]) + diff --git a/adm/unix/config_files/thread.m4 b/adm/unix/config_files/thread.m4 new file mode 100755 index 000000000..4724dbc61 --- /dev/null +++ b/adm/unix/config_files/thread.m4 @@ -0,0 +1,24 @@ +# Check presence of "CPPUNIT" product presence +# +# Author : Anthony GEAY (CEA, 2006) +# + +AC_DEFUN([CHECK_THREAD],[ + +AC_CHECKING(for THREADs) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +thread_ok=no + +AC_SUBST(THREAD_DEF) +if test `uname` = "Linux" +then + THREAD_DEF="-DYACS_PTHREAD" + AC_CHECK_HEADER(pthread.h,thread_ok=yes ,thread_ok=no) + thread_ok="yes" +fi + +AC_LANG_RESTORE +AC_MSG_RESULT(for THREADs: $thread_ok) + +])dnl diff --git a/adm/unix/make_begin.am b/adm/unix/make_begin.am new file mode 100755 index 000000000..eeec91183 --- /dev/null +++ b/adm/unix/make_begin.am @@ -0,0 +1,2 @@ + +EXTRA_DIST = $(wildcard $(srcdir)/*.hxx) $(wildcard $(srcdir)/*.h) diff --git a/adm/unix/make_end.am b/adm/unix/make_end.am new file mode 100755 index 000000000..9d769bc65 --- /dev/null +++ b/adm/unix/make_end.am @@ -0,0 +1,11 @@ + +SUFFIXES = + +# -------------------------------------------- +# *.i --> *wrap.cxx +# -------------------------------------------- + +SUFFIXES += .i WRAP.cxx + +.iWRAP.cxx : + $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) -o $@ $< diff --git a/build_configure b/build_configure new file mode 100755 index 000000000..a1aed8bb3 --- /dev/null +++ b/build_configure @@ -0,0 +1,62 @@ +#! /bin/sh + +# -- +# +PROJECT="YACS" + +# -- +# set VERSION from CVS_TAG_NAME + +CVS_TAG_NAME='$Name$' +VERSION=${CVS_TAG_NAME} +VERSION=`echo ${VERSION/'$Name:'/}` +VERSION=`echo ${VERSION/'$'/}` +if test X$VERSION = X ; then + VERSION=`date +"%F"` # -%H-%M +else + VERSION=`echo $VERSION | sed -e "s/V_//g"` + VERSION=`echo $VERSION | sed -e "s/_/./g"` +fi + +# -- +ORIG_DIR=`pwd` +run() { + local logfile=$ORIG_DIR/build_configure.log + printf "%-50s" "$1 ... " + eval $1 > $logfile 2>&1 + if test $? != 0 ; then + echo "[FAILED]" + echo "see file build_configure.log ..." + exit 1 + fi + echo "[ OK ]" +} + +# -- +# -- goto build_configure dir +CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` +cd ${CONF_DIR} + +# -- +# -- list all Makefile.am in Makefile.am.list +./rfind . Makefile.am > Makefile.am.list + +# -- +# -- configure.in construction +rm -f configure.in +touch configure.in +echo "AC_INIT(src)" >> configure.in +echo "RELEASE=$VERSION" >> configure.in +echo "PROJECT=$PROJECT" >> configure.in +cat configure.in.base >> configure.in +echo "AC_OUTPUT([ \\" >> configure.in +# echo " src/XDATA/xversion.py \\" >> configure.in +# echo " doc/xversion.tex \\" >> configure.in +sed -e 's,\.am, \\,' -e 's,\.\/,,' Makefile.am.list >> configure.in +echo "])" >> configure.in + +# -- +run "libtoolize" +run "aclocal -I adm/unix/config_files" +run "autoconf" +run "automake --add-missing --copy" diff --git a/configure.in.base b/configure.in.base new file mode 100644 index 000000000..41e7232f2 --- /dev/null +++ b/configure.in.base @@ -0,0 +1,16 @@ +# -- +# Copyright (C) CEA, EDF +# Author : Anthony Geay (CEA) +# -- + +AC_ENABLE_DEBUG(no) +AC_DISABLE_PRODUCTION +AC_SUBST(RELEASE) +AM_INIT_AUTOMAKE($PROJECT, $RELEASE) +AC_PROG_CXX +AM_PROG_LIBTOOL +CHECK_CPPUNIT +AC_PROG_SWIG(1.3.17) +SWIG_ENABLE_CXX +SWIG_PYTHON +CHECK_THREAD diff --git a/doc/opml.dtd b/doc/opml.dtd new file mode 100644 index 000000000..3f64c452d --- /dev/null +++ b/doc/opml.dtd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/opml.xslt b/doc/opml.xslt new file mode 100644 index 000000000..4a56aac51 --- /dev/null +++ b/doc/opml.xslt @@ -0,0 +1,57 @@ + + + + + + + + + + + +