Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/yacs.git] / configure.in.base
1 # Copyright (C) 2006-2012  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # --
21 # Author : Anthony Geay (CEA)
22 # --
23 # -----------------------------------------------------------------------------
24 #
25 AC_INIT([Salome2 Project], [6.5.0], [paul.rascle@edf.fr], [SalomeYacs])
26 AM_INIT_AUTOMAKE([tar-pax])
27 AC_CONFIG_HEADER(yacs_config.h)
28
29 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
30 MODULE_NAME=yacs
31 AC_SUBST(MODULE_NAME)
32
33 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
34 AC_SUBST(SHORT_VERSION)
35 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
36 AC_SUBST(XVERSION)
37
38 RELEASE=$VERSION
39 AC_SUBST(RELEASE)
40
41 # This function return on stdout the absolute path of the filename in
42 # argument. Exemple:
43 # $ filename="../KERNEL_SRC/configure
44 # $ absfilename=`absolute_path $filename`
45 function absolute_path {
46     filename=$1
47     here=`pwd`
48     apath=`dirname $filename`
49     cd $apath
50     apath=`pwd`
51     cd $here
52     echo $apath
53 }
54
55 # Build directory, where the configure script is executed.
56 ROOT_BUILDDIR=`pwd`
57 # Source directory, where the configure script is located.
58 ROOT_SRCDIR=`absolute_path $0`
59
60 AC_SUBST(ROOT_SRCDIR)
61 AC_SUBST(ROOT_BUILDDIR)
62
63 echo
64 echo Source root directory : $ROOT_SRCDIR
65 echo Build  root directory : $ROOT_BUILDDIR
66
67 # -----------------------------------------------------------------------------
68
69 AC_ENABLE_DEBUG(yes)
70 AC_DISABLE_PRODUCTION
71
72 #Linker options
73 AC_CANONICAL_BUILD
74 AC_LINKER_OPTIONS
75
76 #Mandatory products
77 AC_PROG_CXX
78 AM_PROG_LIBTOOL
79
80 AC_CHECK_LIB(dl,dlopen)
81
82 ENABLE_PTHREADS
83
84 AM_PATH_PYTHON(2.3)
85 AC_PYTHON_DEVEL
86 python_ok=yes
87 CHECK_THREAD
88 AC_CHECK_OMNIORB
89 AC_CHECK_EXPAT
90 AC_CHECK_LIBXML
91 CHECK_BOOST
92
93 #Optional products
94 AC_PROG_SWIG(1.3.17)
95 SWIG_ENABLE_CXX
96 SWIG_PYTHON
97 CHECK_CPPUNIT
98 AC_CHECK_KERNEL
99 #CHECK_MSG2QM
100 CHECK_HTML_GENERATORS
101 CHECK_SPHINX
102
103 CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server)
104
105 I2_CHECK_QT4
106 I2_CHECK_QSCINTILLA
107
108 AM_CONDITIONAL([PYTHON_API], [test "x$swig_ok" == "xyes"])
109 AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"])
110 AM_CONDITIONAL([DSC_PORTS], [test -f $KERNEL_ROOT_DIR/idl/salome/DSC_Engines.idl])
111
112 AM_CONDITIONAL(WINDOWS, [ test ])
113
114 echo
115 echo
116 echo
117 echo "------------------------------------------------------------------------"
118 echo "$PACKAGE $VERSION"
119 echo "------------------------------------------------------------------------"
120 echo
121 echo "Configuration Options Summary:"
122 echo
123 echo "Mandatory products:"
124 echo "  Threads ................ : $thread_ok"
125 echo "  Boost .................. : $boost_ok"
126 echo "  OmniOrb (CORBA) ........ : $omniORB_ok"
127 echo "  OmniOrbpy (CORBA) ...... : $omniORBpy_ok"
128 echo "  Python ................. : $python_ok"
129 echo "  Expat .................. : $expat_ok"
130 echo "  libxml ................. : $libxml_ok"
131 echo
132 echo "Optional products:"
133 echo "  swig (python wrapper)... : $swig_ok"
134 echo "  SALOME KERNEL .......... : $Kernel_ok"
135 echo "  DSC extension .......... : $dsc_ok"
136 echo "  Cppunit (make check).... : $cppunit_ok"
137 echo "  Qt4 (graphic interface)  : $qt_ok"
138 echo "  QScintilla ............. : $qscintilla_ok"
139 #echo "  msq2qm ................. : $msg2qm_ok"
140 echo "  SALOME GUI ............. : $SalomeGUI_ok"
141 echo "  Sphinx (user doc) ...... : $sphinx_ok"
142 echo
143 echo "------------------------------------------------------------------------"
144 echo
145
146 if test "x$thread_ok" = "xno"; then
147   AC_MSG_ERROR([Thread is required],1)
148 fi
149 if test "x$omniORB_ok" = "xno"; then
150   AC_MSG_ERROR([OmniOrb is required],1)
151 fi
152 if test "x$python_ok" = "xno"; then
153   AC_MSG_ERROR([Python is required],1)
154 fi
155 if test "x$omniORBpy_ok" = "xno"; then
156   AC_MSG_ERROR([OmniOrbpy is required],1)
157 fi
158 if test "x$expat_ok" = "xno"; then
159   AC_MSG_ERROR([Expat is required],1)
160 fi
161 if test "x$libxml_ok" = "xno"; then
162   AC_MSG_ERROR([Libxml is required],1)
163 fi
164
165
166 AC_OUTPUT([ \
167   Makefile \
168   Demo/Makefile \
169   doc/Makefile \
170   idl/Makefile \
171   src/Makefile \
172   src/bases/Makefile \
173   src/bases/Test/Makefile \
174   src/engine/Makefile \
175   src/engine/Plugin/Makefile \
176   src/engine/Test/Makefile \
177   src/engine_swig/Makefile \
178   src/hmi/Makefile \
179   src/pyqt/Makefile \
180   src/runtime/Makefile \
181   src/runtime/Test/Makefile \
182   src/runtime_swig/Makefile \
183   src/genericgui/Makefile \
184   src/salomewrap/Makefile \
185   src/salomegui/Makefile \
186   src/salomegui_swig/Makefile \
187   src/salomeloader/Makefile \
188   src/salomeloader/testSalomeLoader.py \
189   src/wrappergen/Makefile \
190   src/wrappergen/src/Makefile \
191   src/yacsloader/Makefile \
192   src/yacsloader/Test/Makefile \
193   src/yacsloader/Test/YacsLoaderTest.sh \
194   src/yacsloader/Test/YacsLoaderInSessionTest.sh \
195   src/yacsloader/Test/display.sh \
196   src/yacsloader/Test/config_appli.xml \
197   src/yacsloader_swig/Makefile \
198   src/yacsloader_swig/Test/Makefile \
199   src/yacsloader_swig/Test/YacsLoaderTest.sh \
200   src/yacsloader_swig/Test/YacsLoaderInSessionTest.sh \
201   src/yacsloader_swig/Test/config_appli.xml \
202   src/yacsorb/Makefile \
203   src/salomegui/resources/YACSCatalog.xml \
204   src/salomegui/resources/SalomeApp.xml \
205   doc/Doxyfile \
206   doc/conf.py \
207 ])
208