]> SALOME platform Git repositories - plugins/ghs3dplugin.git/blob - build_configure
Salome HOME
Fix compilation pb on Debina 4.0 (64bit)
[plugins/ghs3dplugin.git] / build_configure
1 #!/bin/bash
2
3 #
4 # Tool for updating list of .in file for the SALOME project 
5 # and regenerating configure script
6 #
7 # Author : Marc Tajchman - CEA
8 # Date : 10/10/2002
9 # $Header$
10 #
11
12 ORIG_DIR=`pwd`
13 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
14 GHS3DPLUGIN_WITH_GUI="yes"
15
16 for option
17 do
18   case $option in
19       -with-ihm | --with-ihm)
20           GHS3DPLUGIN_WITH_GUI="yes"
21           break;;
22       -without-ihm | --without-ihm | -with-ihm=no | --with-ihm=no)
23           GHS3DPLUGIN_WITH_GUI="no"
24           break;;
25   esac
26 done
27
28 ########################################################################
29 # Test if the KERNEL_ROOT_DIR is set correctly
30
31 if test ! -d "${KERNEL_ROOT_DIR}"; then
32     echo "failed : KERNEL_ROOT_DIR variable is not correct !"
33     exit
34 fi
35
36 # Test if the KERNEL_SRC is set correctly
37
38 #if test ! -d "${KERNEL_SRC}"; then
39 #    echo "failed : KERNEL_SRC variable is not correct !"
40 #    exit
41 #fi
42
43 ########################################################################
44 # Test if the GUI_ROOT_DIR is set correctly
45
46 if test ! -d "${GUI_ROOT_DIR}"; then
47     echo "failed : GUI_ROOT_DIR variable is not correct !"
48     exit
49 fi
50
51 ########################################################################
52 # Test if the GEOM_ROOT_DIR is set correctly
53
54 if test ! -d "${GEOM_ROOT_DIR}"; then
55     echo "failed : GEOM_ROOT_DIR variable is not correct !"
56     exit
57 fi
58
59 ########################################################################
60 # Test if the MED_ROOT_DIR is set correctly
61
62 if test ! -d "${MED_ROOT_DIR}"; then
63     echo "failed : MED_ROOT_DIR variable is not correct !"
64     exit
65 fi
66
67 ########################################################################
68 # Test if the SMESH_ROOT_DIR is set correctly
69
70 if test ! -d "${SMESH_ROOT_DIR}"; then
71     echo "failed : SMESH_ROOT_DIR variable is not correct !"
72     exit
73 fi
74
75 cd ${CONF_DIR}
76 ABS_CONF_DIR=`pwd`
77
78 #######################################################################
79 # Update configure.ac script: to set GHS3DPLUGIN_WITH_GUI variable
80 sed -e s/GHS3DPLUGIN_WITH_GUI=[a-z]*/GHS3DPLUGIN_WITH_GUI=${GHS3DPLUGIN_WITH_GUI}/g configure.ac > configure.tmp
81 mv -f configure.tmp configure.ac
82
83 mkdir -p salome_adm/unix/config_files
84 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
85 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
86
87 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
88
89 #cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
90 #cp -f ${GEOM_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
91 #cp -f ${SMESH_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
92
93 # remove KERNEL deprecated configure files
94 #for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
95 #  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
96 #    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
97 #    do
98 #      rm -f salome_adm/unix/config_files/${deprecated}
99 #      done
100
101
102 # ____________________________________________________________________
103 # aclocal creates the aclocal.m4 file from the standard macro and the
104 # custom macro embedded in the directory salome_adm/unix/config_files
105 # and KERNEL config_files directory.
106 # output:
107 #   aclocal.m4
108 #   autom4te.cache (directory)
109 echo "====================================================== aclocal"
110
111 if test ${GHS3DPLUGIN_WITH_GUI} = yes; then
112   aclocal -I adm_local/unix/config_files \
113           -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
114           -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
115           -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
116           -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
117           -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
118 else
119   aclocal -I adm_local/unix/config_files \
120           -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
121           -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
122           -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
123           -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files || exit 1
124 fi
125
126 # ____________________________________________________________________
127 # libtoolize creates some configuration files (ltmain.sh,
128 # config.guess and config.sub). It only depends on the libtool
129 # version. The files are created in the directory specified with the
130 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
131 # output:
132 #   salome_adm/unix/config_files/config.guess
133 #   salome_adm/unix/config_files/config.sub
134 #   salome_adm/unix/config_files/ltmain.sh
135 #echo "====================================================== libtoolize"
136
137 libtoolize --force --copy --automake || exit 1
138
139 # ____________________________________________________________________
140 # autoconf creates the configure script from the file configure.ac (or
141 # configure.in if configure.ac doesn't exist)
142 # output:
143 #   configure
144 echo "====================================================== autoconf"
145
146 autoconf
147
148 # ____________________________________________________________________
149 # automake creates some scripts used in building process
150 # (install-sh, missing, ...). It only depends on the automake
151 # version. The files are created in the directory specified with the
152 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
153 # creates the Makefile.in files from the Makefile.am files.
154 # output:
155 #   salome_adm/unix/config_files/compile
156 #   salome_adm/unix/config_files/depcomp
157 #   salome_adm/unix/config_files/install-sh
158 #   salome_adm/unix/config_files/missing
159 #   salome_adm/unix/config_files/py-compile
160 #   Makefile.in (from Makefile.am)
161 echo "====================================================== automake"
162
163 automake --copy --gnu --add-missing