1 # Copyright (C) 2009-2013 EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 from string import Template
23 from compat import Template,set
27 <prerequisites path="${prerequisites}"/>
34 application=Template(application)
39 rm -f aclocal.m4 adm_local/ltmain.sh
41 echo "Running aclocal..." ;
42 aclocal --force -I adm_local || exit 1
43 echo "Running autoheader..." ; autoheader --force -I adm_local || exit 1
44 echo "Running autoconf..." ; autoconf --force || exit 1
45 echo "Running libtoolize..." ; libtoolize --copy --force || exit 1
46 echo "Running automake..." ; automake --add-missing --copy || exit 1
49 mainMakefile="""include $$(top_srcdir)/adm_local/make_common_starter.am
50 SUBDIRS = idl resources src ${docsubdir}
51 ACLOCAL_AMFLAGS = -I adm_local
53 mainMakefile=Template(mainMakefile)
56 AC_INIT(${module}, 1.0)
57 AC_CONFIG_AUX_DIR(adm_local)
59 AM_CONFIG_HEADER(${module}_config.h)
61 dnl Check Salome Install
63 if test "x$$Kernel_ok" = "xno"; then
64 AC_MSG_ERROR([You must define a correct KERNEL_ROOT_DIR or use the --with-kernel= configure option !])
67 dnl Check Salome modules Install
88 echo "------------------------------------------------------------------------"
89 echo "$$PACKAGE $$VERSION"
90 echo "------------------------------------------------------------------------"
92 echo "Configuration Options Summary:"
94 echo " Threads ................ : $$threads_ok"
95 echo " OmniOrb (CORBA) ........ : $$omniORB_ok"
96 echo " OmniOrbpy (CORBA) ...... : $$omniORBpy_ok"
97 echo " Python ................. : $$python_ok"
98 echo " SALOME KERNEL .......... : $$Kernel_ok"
99 echo " PaCO++ ................. : $$PaCO_ok"
100 echo " MPI .................... : $$mpi_ok"
101 echo " Code Aster ............. : $$Aster_ok"
104 echo "------------------------------------------------------------------------"
107 if test "x$$threads_ok" = "xno"; then
108 AC_MSG_ERROR([Thread is required],1)
110 if test "x$$python_ok" = "xno"; then
111 AC_MSG_ERROR([Python is required],1)
113 if test "x$$omniORB_ok" = "xno"; then
114 AC_MSG_ERROR([OmniOrb is required],1)
116 if test "x$$omniORBpy_ok" = "xno"; then
117 AC_MSG_ERROR([OmniOrbpy is required],1)
119 if test "x$$Kernel_ok" = "xno"; then
120 AC_MSG_ERROR([SALOME KERNEL is required],1)
135 configure=Template(configure)
138 if test "x$$PaCO_ok" = "xno"; then
139 AC_MSG_ERROR([PaCO++ is required],1)
144 # Standard directory for installation
145 salomeincludedir = $$(includedir)/salome
146 libdir = $$(prefix)/lib/salome
147 bindir = $$(prefix)/bin/salome
148 salomescriptdir = $$(bindir)
149 salomepythondir = $$(prefix)/lib/python$$(PYTHON_VERSION)/site-packages/salome
151 # Directory for installing idl files
152 salomeidldir = $$(prefix)/idl/salome
154 # Directory for installing resource files
155 salomeresdir = $$(prefix)/share/salome/resources/$${MODULE_NAME}
157 # Directories for installing admin files
158 admlocaldir = $$(prefix)/adm_local
159 admlocalunixdir = $$(admlocaldir)/unix
160 admlocalm4dir = $$(admlocaldir)/unix/config_files
162 # Shared modules installation directory
163 sharedpkgpythondir =$$(pkgpythondir)/shared_modules
165 # Documentation directory
166 salomedocdir = $$(prefix)/share/doc/salome/gui/$${MODULE_NAME}
168 IDL_INCLUDES = -I$$(KERNEL_ROOT_DIR)/idl/salome
169 KERNEL_LIBS= -L$$(KERNEL_ROOT_DIR)/lib/salome -lSalomeContainer -lOpUtil -lSalomeDSCContainer -lSalomeDSCSuperv -lSalomeDatastream -lSalomeDSCSupervBasic -lCalciumC
170 KERNEL_INCLUDES= -I$$(KERNEL_ROOT_DIR)/include/salome $$(OMNIORB_INCLUDES) ${other_includes}
172 SALOME_LIBS= $${KERNEL_LIBS}
173 SALOME_IDL_LIBS= -L$$(KERNEL_ROOT_DIR)/lib/salome -lSalomeIDLKernel
174 SALOME_INCLUDES= $${KERNEL_INCLUDES}
177 makecommon=Template(makecommon)
180 include $$(top_srcdir)/adm_local/make_common_starter.am
181 DATA_INST = ${module}Catalog.xml
182 salomeres_DATA = $${DATA_INST}
183 EXTRA_DIST = $${DATA_INST}
185 resMakefile=Template(resMakefile)
188 AC_DEFUN([CHECK_SPHINX],[
190 AC_CHECKING(for sphinx doc generator)
193 dnl where is sphinx ?
194 AC_PATH_PROG(SPHINX,sphinx-build)
195 if test "x$SPHINX" = "x"
197 AC_MSG_WARN(sphinx not found)
201 dnl Can I load ths sphinx module ?
202 dnl This code comes from the ax_python_module macro.
207 PYTHON_NAME=`basename $PYTHON`
208 AC_MSG_CHECKING($PYTHON_NAME module: sphinx)
209 $PYTHON -c "import sphinx" 2>/dev/null
213 eval AS_TR_CPP(HAVE_PYMOD_sphinx)=yes
216 eval AS_TR_CPP(HAVE_PYMOD_sphinx)=no
220 AM_CONDITIONAL(SPHINX_IS_OK, [test x"$sphinx_ok" = xyes])