Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/visu.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 # 29/03/2007: Mikhail PONIKAROV - OCN
12 # Reorganization for uage of autotools
13
14 ORIG_DIR=`pwd`
15 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
16
17 # ____________________________________________________________________
18 # Test if the KERNEL_ROOT_DIR is set correctly
19 if test ! -d "${KERNEL_ROOT_DIR}"; then
20     echo "failed : KERNEL_ROOT_DIR variable is not correct !"
21     exit
22 fi
23 # Test if the GUI_ROOT_DIR is set correctly
24 if test ! -d "${GUI_ROOT_DIR}"; then
25     echo "failed : GUI_ROOT_DIR variable is not correct !"
26     exit
27 fi
28 # Test if the MED_ROOT_DIR is set correctly
29 if test ! -d "${MED_ROOT_DIR}"; then
30     echo "failed : MED_ROOT_DIR variable is not correct !"
31     exit
32 fi
33
34 cd ${CONF_DIR}
35 ABS_CONF_DIR=`pwd`
36
37 mkdir -p salome_adm/unix/config_files
38 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
39 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
40
41 # remove KERNEL deprecated configure files
42 #for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
43 #  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig \
44 #  ac_cxx_typename.m4 check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4
45 #do
46 #  rm  salome_adm/unix/config_files/${deprecated}
47 #done
48
49 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
50
51 # ____________________________________________________________________
52 # aclocal creates the aclocal.m4 file from the standard macro and the
53 # custom macro embedded in the directory salome_adm/unix/config_files
54 # and KERNEL config_files directory.
55 # output:
56 #   aclocal.m4
57 #   autom4te.cache (directory)
58 echo "====================================================== aclocal"
59
60 aclocal -I adm_local/unix/config_files \
61         -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
62         -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
63         -I ${MED_ROOT_DIR}/adm_local/unix/config_files || exit 1
64
65 # ____________________________________________________________________
66 # libtoolize creates some configuration files (ltmain.sh,
67 # config.guess and config.sub). It only depends on the libtool
68 # version. The files are created in the directory specified with the
69 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
70 # output:
71 #   salome_adm/unix/config_files/config.guess
72 #   salome_adm/unix/config_files/config.sub
73 #   salome_adm/unix/config_files/ltmain.sh
74 #echo "====================================================== libtoolize"
75
76 libtoolize --force --copy --automake || exit 1
77
78 # ____________________________________________________________________
79 # make link to KERNEL configuration files to
80 #ln -sf ${KERNEL_ROOT_DIR}/salome_adm .
81
82 # ____________________________________________________________________
83 # autoconf creates the configure script from the file configure.ac (or
84 # configure.in if configure.ac doesn't exist)
85 # output:
86 #   configure
87 echo "====================================================== autoconf"
88
89 autoconf
90
91 # ____________________________________________________________________
92 # automake creates some scripts used in building process
93 # (install-sh, missing, ...). It only depends on the automake
94 # version. The files are created in the directory specified with the
95 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
96 # creates the Makefile.in files from the Makefile.am files.
97 # output:
98 #   salome_adm/unix/config_files/compile
99 #   salome_adm/unix/config_files/depcomp
100 #   salome_adm/unix/config_files/install-sh
101 #   salome_adm/unix/config_files/missing
102 #   salome_adm/unix/config_files/py-compile
103 #   Makefile.in (from Makefile.am)
104 echo "====================================================== automake"
105
106 automake --copy --gnu --add-missing