Salome HOME
Removed unused files and improved clean_configure script
[samples/genericsolver.git] / configure.ac
1 #  Copyright (C) 2009-2010 EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # $Id$
20 #
21
22 AC_INIT([Salome GENERICSOLVER module],[5.1.5],[webmaster.salome@opencascade.com],[SalomeGENERICSOLVER])
23 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
24 AC_CANONICAL_HOST
25 AC_CANONICAL_TARGET
26 AM_INIT_AUTOMAKE
27
28 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
29 AC_SUBST(XVERSION)
30
31 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
32 MODULE_NAME=genericsolver
33 AC_SUBST(MODULE_NAME)
34
35 dnl
36 dnl Initialize source and build root directories
37 dnl
38
39 ROOT_BUILDDIR=`pwd`
40 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
41 cd $ROOT_SRCDIR
42 ROOT_SRCDIR=`pwd`
43 cd $ROOT_BUILDDIR
44
45 AC_SUBST(ROOT_SRCDIR)
46 AC_SUBST(ROOT_BUILDDIR)
47
48 echo
49 echo Source root directory : $ROOT_SRCDIR
50 echo Build  root directory : $ROOT_BUILDDIR
51 echo
52 echo
53
54 AC_CHECK_PROG(SHELL,sh)
55 AC_SUBST(SHELL)
56
57 echo
58 echo ---------------------------------------------
59 echo testing make
60 echo ---------------------------------------------
61 echo
62
63 AC_PROG_MAKE_SET
64 AC_PROG_INSTALL
65
66 AC_ENABLE_DEBUG(yes)
67 AC_DISABLE_PRODUCTION
68
69 dnl Fix up the INSTALL macro if it s a relative path. We want the
70 dnl full-path to the binary instead.
71 case "$INSTALL" in
72    *install-sh*)
73       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
74       ;;
75 esac
76
77 echo
78 echo ---------------------------------------------
79 echo testing python
80 echo ---------------------------------------------
81 echo
82
83 CHECK_PYTHON
84
85 AM_PATH_PYTHON(2.3)
86
87 echo
88 echo ---------------------------------------------
89 echo testing omniORB
90 echo ---------------------------------------------
91 echo
92
93 CHECK_OMNIORB
94
95 echo
96 echo ---------------------------------------------
97 echo default ORB : omniORB
98 echo ---------------------------------------------
99 echo
100
101 DEFAULT_ORB=omniORB
102 CHECK_CORBA
103
104 AC_SUBST_FILE(CORBA)
105 corba=make_$ORB
106 CORBA=adm_local/unix/$corba
107
108 echo
109 echo ---------------------------------------------
110 echo testing QT
111 echo ---------------------------------------------
112 echo
113
114 CHECK_QT
115
116 echo
117 echo ---------------------------------------------
118 echo Testing Kernel
119 echo ---------------------------------------------
120 echo
121
122 CHECK_KERNEL
123
124 echo
125 echo ---------------------------------------------
126 echo Testing GUI
127 echo ---------------------------------------------
128 echo
129
130 CHECK_SALOME_GUI
131
132 echo
133 echo ---------------------------------------------
134 echo Testing full GUI
135 echo ---------------------------------------------
136 echo
137
138 CHECK_CORBA_IN_GUI
139 if test "x${CORBA_IN_GUI}" != "xyes"; then
140   echo "failed : For configure GENERICSOLVER module necessary full GUI !"
141   exit
142 fi
143
144
145
146 echo
147 echo ---------------------------------------------
148 echo Summary
149 echo ---------------------------------------------
150 echo
151
152 echo Configure
153 variables="python_ok omniORB_ok qt_ok Kernel_ok"
154
155 for var in $variables
156 do
157    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
158    eval echo \$$var
159 done
160
161 echo
162 echo "Default ORB   : $DEFAULT_ORB"
163 echo
164
165 dnl We don t need to say when we re entering directories if we re using
166 dnl GNU make becuase make does it for us.
167 if test "X$GMAKE" = "Xyes"; then
168    AC_SUBST(SETX) SETX=":"
169 else
170    AC_SUBST(SETX) SETX="set -x"
171 fi
172 echo
173 echo ---------------------------------------------
174 echo generating Makefiles and configure files
175 echo ---------------------------------------------
176 echo
177
178 AC_CONFIG_COMMANDS([default-1],[[ \
179       chmod +x ./bin/*; \
180 ]],[[]])
181
182 # This list is initiated using autoscan and must be updated manually
183 # when adding a new file <filename>.in to manage. When you execute
184 # autoscan, the Makefile list is generated in the output file configure.scan.
185 # This could be helpful to update de configuration.
186 AC_CONFIG_FILES([ \
187   salome_adm/unix/SALOMEconfig.h \
188   adm_local/Makefile \
189   adm_local/unix/Makefile \
190   adm_local/unix/config_files/Makefile \
191   src/Makefile \
192   src/GENERICSOLVER/Makefile \
193   src/GENERICSOLVERGUI/Makefile \
194   resources/Makefile \
195   resources/GENERICSOLVERCatalog.xml \
196   idl/Makefile \
197   Makefile \
198 ])
199 AC_OUTPUT