Salome HOME
aebf911563479386322fb2f23973c6bce88d1456
[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], [7.0.0], [paul.rascle@edf.fr], [SalomeYacs])
26 AC_CONFIG_AUX_DIR(adm/unix/config_files)
27 AM_INIT_AUTOMAKE([tar-pax])
28 AC_CONFIG_HEADER(yacs_config.h)
29
30 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
31 MODULE_NAME=yacs
32 AC_SUBST(MODULE_NAME)
33
34 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
35 AC_SUBST(SHORT_VERSION)
36 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
37 AC_SUBST(XVERSION)
38
39 RELEASE=$VERSION
40 AC_SUBST(RELEASE)
41
42 # This function return on stdout the absolute path of the filename in
43 # argument. Exemple:
44 # $ filename="../KERNEL_SRC/configure
45 # $ absfilename=`absolute_path $filename`
46 function absolute_path {
47     filename=$1
48     here=`pwd`
49     apath=`dirname $filename`
50     cd $apath
51     apath=`pwd`
52     cd $here
53     echo $apath
54 }
55
56 # Build directory, where the configure script is executed.
57 ROOT_BUILDDIR=`pwd`
58 # Source directory, where the configure script is located.
59 ROOT_SRCDIR=`absolute_path $0`
60
61 AC_SUBST(ROOT_SRCDIR)
62 AC_SUBST(ROOT_BUILDDIR)
63
64 echo
65 echo Source root directory : $ROOT_SRCDIR
66 echo Build  root directory : $ROOT_BUILDDIR
67
68 # -----------------------------------------------------------------------------
69
70 AC_ENABLE_DEBUG(yes)
71 AC_DISABLE_PRODUCTION
72
73 #Linker options
74 AC_CANONICAL_BUILD
75 AC_LINKER_OPTIONS
76
77 #Mandatory products
78 AC_PROG_CXX
79 AM_PROG_LIBTOOL
80
81 AC_CHECK_LIB(dl,dlopen)
82
83 ENABLE_PTHREADS
84
85 AM_PATH_PYTHON(2.3)
86 AC_PYTHON_DEVEL
87 python_ok=yes
88 CHECK_THREAD
89 AC_CHECK_OMNIORB
90 AC_CHECK_EXPAT
91 AC_CHECK_LIBXML
92 CHECK_BOOST
93
94 #Optional products
95 AC_PROG_SWIG(1.3.17)
96 SWIG_ENABLE_CXX
97 SWIG_PYTHON
98 CHECK_CPPUNIT
99 AC_CHECK_KERNEL
100 #CHECK_MSG2QM
101 CHECK_HTML_GENERATORS
102 CHECK_SPHINX
103
104 CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server)
105
106 I2_CHECK_QT4
107 I2_CHECK_QSCINTILLA
108
109 AM_CONDITIONAL([PYTHON_API], [test "x$swig_ok" == "xyes"])
110 AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"])
111 AM_CONDITIONAL([DSC_PORTS], [test -f $KERNEL_ROOT_DIR/idl/salome/DSC_Engines.idl])
112
113 AM_CONDITIONAL(WINDOWS, [ test ])
114
115 echo
116 echo
117 echo
118 echo "------------------------------------------------------------------------"
119 echo "$PACKAGE $VERSION"
120 echo "------------------------------------------------------------------------"
121 echo
122 echo "Configuration Options Summary:"
123 echo
124 echo "Mandatory products:"
125 echo "  Threads ................ : $thread_ok"
126 echo "  Boost .................. : $boost_ok"
127 echo "  OmniOrb (CORBA) ........ : $omniORB_ok"
128 echo "  OmniOrbpy (CORBA) ...... : $omniORBpy_ok"
129 echo "  Python ................. : $python_ok"
130 echo "  Expat .................. : $expat_ok"
131 echo "  libxml ................. : $libxml_ok"
132 echo
133 echo "Optional products:"
134 echo "  swig (python wrapper)... : $swig_ok"
135 echo "  SALOME KERNEL .......... : $Kernel_ok"
136 echo "  DSC extension .......... : $dsc_ok"
137 echo "  Cppunit (make check).... : $cppunit_ok"
138 echo "  Qt4 (graphic interface)  : $qt_ok"
139 echo "  QScintilla ............. : $qscintilla_ok"
140 #echo "  msq2qm ................. : $msg2qm_ok"
141 echo "  SALOME GUI ............. : $SalomeGUI_ok"
142 echo "  Sphinx (user doc) ...... : $sphinx_ok"
143 echo
144 echo "------------------------------------------------------------------------"
145 echo
146
147 if test "x$thread_ok" = "xno"; then
148   AC_MSG_ERROR([Thread is required],1)
149 fi
150 if test "x$omniORB_ok" = "xno"; then
151   AC_MSG_ERROR([OmniOrb is required],1)
152 fi
153 if test "x$python_ok" = "xno"; then
154   AC_MSG_ERROR([Python is required],1)
155 fi
156 if test "x$omniORBpy_ok" = "xno"; then
157   AC_MSG_ERROR([OmniOrbpy is required],1)
158 fi
159 if test "x$expat_ok" = "xno"; then
160   AC_MSG_ERROR([Expat is required],1)
161 fi
162 if test "x$libxml_ok" = "xno"; then
163   AC_MSG_ERROR([Libxml is required],1)
164 fi
165
166
167 AC_OUTPUT([ \
168   Makefile \
169   Demo/Makefile \
170   doc/Makefile \
171   idl/Makefile \
172   src/Makefile \
173   src/bases/Makefile \
174   src/bases/Test/Makefile \
175   src/engine/Makefile \
176   src/engine/Plugin/Makefile \
177   src/engine/Test/Makefile \
178   src/engine_swig/Makefile \
179   src/hmi/Makefile \
180   src/pyqt/Makefile \
181   src/runtime/Makefile \
182   src/runtime/Test/Makefile \
183   src/runtime_swig/Makefile \
184   src/genericgui/Makefile \
185   src/salomewrap/Makefile \
186   src/salomegui/Makefile \
187   src/salomegui_swig/Makefile \
188   src/salomeloader/Makefile \
189   src/salomeloader/testSalomeLoader.py \
190   src/wrappergen/Makefile \
191   src/wrappergen/src/Makefile \
192   src/yacsloader/Makefile \
193   src/yacsloader/Test/Makefile \
194   src/yacsloader/Test/YacsLoaderTest.sh \
195   src/yacsloader/Test/YacsLoaderInSessionTest.sh \
196   src/yacsloader/Test/display.sh \
197   src/yacsloader/Test/config_appli.xml \
198   src/yacsloader_swig/Makefile \
199   src/yacsloader_swig/Test/Makefile \
200   src/yacsloader_swig/Test/YacsLoaderTest.sh \
201   src/yacsloader_swig/Test/YacsLoaderInSessionTest.sh \
202   src/yacsloader_swig/Test/config_appli.xml \
203   src/yacsorb/Makefile \
204   src/salomegui/resources/YACSCatalog.xml \
205   src/salomegui/resources/SalomeApp.xml \
206   doc/Doxyfile \
207   doc/conf.py \
208 ])
209