2 # Copyright (C) 2007-2008 CEA/DEN, EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 # File : build_configure
22 # Author : Vadim SANDLER, Open CASCADE S.A.S (vadim.sandler@opencascade.com)
26 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
27 BLSURFPLUGIN_WITH_GUI="yes"
29 ########################################################################
30 # Test if the KERNEL_ROOT_DIR is set correctly
32 if test ! -d "${KERNEL_ROOT_DIR}"; then
33 echo "failed : KERNEL_ROOT_DIR variable is not correct !"
37 # Test if the KERNEL_SRC is set correctly
39 #if test ! -d "${KERNEL_SRC}"; then
40 # echo "failed : KERNEL_SRC variable is not correct !"
47 -with-gui | --with-gui)
48 BLSURFPLUGIN_WITH_GUI="yes"
50 -without-gui | --without-gui | -with-gui=no | --with-gui=no)
51 BLSURFPLUGIN_WITH_GUI="no"
56 ########################################################################
57 # Test if the GUI_ROOT_DIR is set correctly
59 if test ${BLSURFPLUGIN_WITH_GUI} = yes; then
60 if test ! -d "${GUI_ROOT_DIR}"; then
61 echo "failed : GUI_ROOT_DIR variable is not correct !"
66 ########################################################################
67 # Test if the MED_ROOT_DIR is set correctly
69 if test ! -d "${MED_ROOT_DIR}"; then
70 echo "failed : MED_ROOT_DIR variable is not correct !"
74 ########################################################################
75 # Test if the GEOM_ROOT_DIR is set correctly
77 if test ! -d "${GEOM_ROOT_DIR}"; then
78 echo "failed : GEOM_ROOT_DIR variable is not correct !"
82 ########################################################################
83 # Test if the SMESH_ROOT_DIR is set correctly
85 if test ! -d "${SMESH_ROOT_DIR}"; then
86 echo "failed : SMESH_ROOT_DIR variable is not correct !"
93 #######################################################################
94 # Update configure.ac script: to set BLSURFPLUGIN_WITH_GUI variable
95 sed -e s/BLSURFPLUGIN_WITH_GUI=[a-z]*/BLSURFPLUGIN_WITH_GUI=${BLSURFPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
96 mv -f configure.tmp configure.ac
98 mkdir -p salome_adm/unix/config_files
99 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
100 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
102 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
104 #cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
105 #cp -f ${MED_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
106 #cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
107 #cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
109 # remove KERNEL deprecated configure files
110 #for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
111 # check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
112 # check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
114 # rm -f salome_adm/unix/config_files/${deprecated}
118 # ____________________________________________________________________
119 # aclocal creates the aclocal.m4 file from the standard macro and the
120 # custom macro embedded in the directory salome_adm/unix/config_files
121 # and KERNEL config_files directory.
124 # autom4te.cache (directory)
125 echo "====================================================== aclocal"
127 if test ${BLSURFPLUGIN_WITH_GUI} = yes; then
128 aclocal -I adm_local/unix/config_files \
129 -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
130 -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
131 -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
132 -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
133 -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
135 aclocal -I adm_local/unix/config_files \
136 -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
137 -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
138 -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
139 -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
142 # ____________________________________________________________________
143 # libtoolize creates some configuration files (ltmain.sh,
144 # config.guess and config.sub). It only depends on the libtool
145 # version. The files are created in the directory specified with the
146 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
148 # salome_adm/unix/config_files/config.guess
149 # salome_adm/unix/config_files/config.sub
150 # salome_adm/unix/config_files/ltmain.sh
151 #echo "====================================================== libtoolize"
153 libtoolize --force --copy --automake || exit 1
155 # ____________________________________________________________________
156 # autoconf creates the configure script from the file configure.ac (or
157 # configure.in if configure.ac doesn't exist)
160 echo "====================================================== autoconf"
164 # ____________________________________________________________________
165 # automake creates some scripts used in building process
166 # (install-sh, missing, ...). It only depends on the automake
167 # version. The files are created in the directory specified with the
168 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
169 # creates the Makefile.in files from the Makefile.am files.
171 # salome_adm/unix/config_files/compile
172 # salome_adm/unix/config_files/depcomp
173 # salome_adm/unix/config_files/install-sh
174 # salome_adm/unix/config_files/missing
175 # salome_adm/unix/config_files/py-compile
176 # Makefile.in (from Makefile.am)
177 echo "====================================================== automake"
179 automake --copy --gnu --add-missing