Salome HOME
6ed6e43694d0a791d21aa3ba7adb7eb1f93b6cff
[samples/randomizer.git] / build_configure
1 #!/bin/bash
2 #  Copyright (C) 2005-2008  OPEN CASCADE
3 #
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.
8 #
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.
13 #
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
17 #
18 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 # Tool for updating list of .in file for the SALOME project 
21 # and regenerating configure script
22 # Author : 
23 # Modified by : Alexander BORODIN (OCN) - autotools usage
24 # Date : 10/10/2002
25 #
26 ORIG_DIR=`pwd`
27 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
28
29 ########################################################################
30 # Test if the KERNEL_ROOT_DIR is set correctly
31
32 if test ! -d "${KERNEL_ROOT_DIR}"; then
33     echo "failed : KERNEL_ROOT_DIR variable is not correct !"
34     exit
35 fi
36
37
38 ########################################################################
39 # Test if the GUI_ROOT_DIR is set correctly
40
41 if test ! -d "${GUI_ROOT_DIR}"; then
42     echo "failed : GUI_ROOT_DIR variable is not correct !"
43     exit
44 fi
45
46 cd ${CONF_DIR}
47 ABS_CONF_DIR=`pwd`
48
49 mkdir -p salome_adm/unix/config_files
50 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
51 #cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
52
53 cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
54
55 #cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
56
57 # remove KERNEL deprecated configure files
58 #for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
59 #  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
60 #    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
61 #    do
62 #      rm -f salome_adm/unix/config_files/${deprecated}
63 #      done
64
65
66 # ____________________________________________________________________
67 # aclocal creates the aclocal.m4 file from the standard macro and the
68 # custom macro embedded in the directory salome_adm/unix/config_files
69 # and KERNEL config_files directory.
70 # output:
71 #   aclocal.m4
72 #   autom4te.cache (directory)
73 echo "====================================================== aclocal"
74
75 aclocal -I adm_local/unix/config_files \
76         -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
77         -I ${GUI_ROOT_DIR}/adm_local/unix/config_files || exit 1
78
79 # ____________________________________________________________________
80 # libtoolize creates some configuration files (ltmain.sh,
81 # config.guess and config.sub). It only depends on the libtool
82 # version. The files are created in the directory specified with the
83 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
84 # output:
85 #   salome_adm/unix/config_files/config.guess
86 #   salome_adm/unix/config_files/config.sub
87 #   salome_adm/unix/config_files/ltmain.sh
88 #echo "====================================================== libtoolize"
89
90 libtoolize --force --copy --automake || exit 1
91
92 # ____________________________________________________________________
93 # autoconf creates the configure script from the file configure.ac (or
94 # configure.in if configure.ac doesn't exist)
95 # output:
96 #   configure
97 echo "====================================================== autoconf"
98
99 autoconf
100
101 # ____________________________________________________________________
102 # automake creates some scripts used in building process
103 # (install-sh, missing, ...). It only depends on the automake
104 # version. The files are created in the directory specified with the
105 # AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
106 # creates the Makefile.in files from the Makefile.am files.
107 # output:
108 #   salome_adm/unix/config_files/compile
109 #   salome_adm/unix/config_files/depcomp
110 #   salome_adm/unix/config_files/install-sh
111 #   salome_adm/unix/config_files/missing
112 #   salome_adm/unix/config_files/py-compile
113 #   Makefile.in (from Makefile.am)
114 echo "====================================================== automake"
115
116 automake --copy --gnu --add-missing