]> SALOME platform Git repositories - samples/genericsolver.git/blob - configure.ac
Salome HOME
a3b2bf9a4934f87519892a23c59ef7a06cfca8e4
[samples/genericsolver.git] / configure.ac
1 #  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
6 #  This library is free software; you can redistribute it and/or
7 #  modify it under the terms of the GNU Lesser General Public
8 #  License as published by the Free Software Foundation; either
9 #  version 2.1 of the License.
10 #
11 #  This library is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 #  Lesser General Public License for more details.
15 #
16 #  You should have received a copy of the GNU Lesser General Public
17 #  License along with this library; if not, write to the Free Software
18 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 # Author : Marc Tajchman (CEA)
23 # Date : 28/06/2001
24 # Modified by : Patrick GOLDBRONN (CEA)
25 # Modified by : Marc Tajchman (CEA)
26 # Modified by : Renaud Barate (EDF)
27 #
28 AC_INIT([Salome2 Project GENERICSOLVER module], [5.1.4], [webmaster.salome@opencascade.com], [SalomeGENERICSOLVER])
29 AC_CONFIG_AUX_DIR(salome_adm/unix/config_files)
30 AC_CANONICAL_HOST
31 AC_CANONICAL_TARGET
32 AM_INIT_AUTOMAKE
33
34 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
35 AC_SUBST(XVERSION)
36
37 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
38 MODULE_NAME=genericsolver
39 AC_SUBST(MODULE_NAME)
40
41 dnl
42 dnl Initialize source and build root directories
43 dnl
44
45 ROOT_BUILDDIR=`pwd`
46 ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
47 cd $ROOT_SRCDIR
48 ROOT_SRCDIR=`pwd`
49 cd $ROOT_BUILDDIR
50
51 AC_SUBST(ROOT_SRCDIR)
52 AC_SUBST(ROOT_BUILDDIR)
53
54 echo
55 echo Source root directory : $ROOT_SRCDIR
56 echo Build  root directory : $ROOT_BUILDDIR
57 echo
58 echo
59
60 AC_CHECK_PROG(SHELL,sh)
61 AC_SUBST(SHELL)
62
63 if test -z "$AR"; then
64    AC_CHECK_PROGS(AR,ar xar,:,$PATH)
65 fi
66 AC_SUBST(AR)
67
68 dnl Export the AR macro so that it will be placed in the libtool file
69 dnl correctly.
70 export AR
71
72 echo
73 echo ---------------------------------------------
74 echo testing make
75 echo ---------------------------------------------
76 echo
77
78 AC_PROG_MAKE_SET
79 AC_PROG_INSTALL
80 dnl 
81 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
82
83 AC_ENABLE_DEBUG(yes)
84 AC_DISABLE_PRODUCTION
85
86 echo ---------------------------------------------
87 echo testing libtool
88 echo ---------------------------------------------
89
90 dnl first, we set static to no!
91 dnl if we want it, use --enable-static
92 AC_ENABLE_STATIC(no)
93
94 AC_LIBTOOL_DLOPEN
95 AC_PROG_LIBTOOL
96
97 dnl Fix up the INSTALL macro if it s a relative path. We want the
98 dnl full-path to the binary instead.
99 case "$INSTALL" in
100    *install-sh*)
101       INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
102       ;;
103 esac
104
105 echo
106 echo ---------------------------------------------
107 echo testing python
108 echo ---------------------------------------------
109 echo
110
111 CHECK_PYTHON
112
113 AM_PATH_PYTHON(2.3)
114
115 echo
116 echo ---------------------------------------------
117 echo testing omniORB
118 echo ---------------------------------------------
119 echo
120
121 CHECK_OMNIORB
122
123 echo
124 echo ---------------------------------------------
125 echo default ORB : omniORB
126 echo ---------------------------------------------
127 echo
128
129 DEFAULT_ORB=omniORB
130 CHECK_CORBA
131
132 AC_SUBST_FILE(CORBA)
133 corba=make_$ORB
134 CORBA=adm_local/unix/$corba
135
136 echo
137 echo ---------------------------------------------
138 echo testing QT
139 echo ---------------------------------------------
140 echo
141
142 CHECK_QT
143
144 echo
145 echo ---------------------------------------------
146 echo Testing Kernel
147 echo ---------------------------------------------
148 echo
149
150 CHECK_KERNEL
151
152 echo
153 echo ---------------------------------------------
154 echo Testing GUI
155 echo ---------------------------------------------
156 echo
157
158 CHECK_SALOME_GUI
159
160 echo
161 echo ---------------------------------------------
162 echo Testing full GUI
163 echo ---------------------------------------------
164 echo
165
166 CHECK_CORBA_IN_GUI
167 if test "x${CORBA_IN_GUI}" != "xyes"; then
168   echo "failed : For configure GENERICSOLVER module necessary full GUI !"
169   exit
170 fi
171
172
173
174 echo
175 echo ---------------------------------------------
176 echo Summary
177 echo ---------------------------------------------
178 echo
179
180 echo Configure
181 variables="python_ok omniORB_ok qt_ok Kernel_ok"
182
183 for var in $variables
184 do
185    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
186    eval echo \$$var
187 done
188
189 echo
190 echo "Default ORB   : $DEFAULT_ORB"
191 echo
192
193 dnl We don t need to say when we re entering directories if we re using
194 dnl GNU make becuase make does it for us.
195 if test "X$GMAKE" = "Xyes"; then
196    AC_SUBST(SETX) SETX=":"
197 else
198    AC_SUBST(SETX) SETX="set -x"
199 fi
200 echo
201 echo ---------------------------------------------
202 echo generating Makefiles and configure files
203 echo ---------------------------------------------
204 echo
205
206 AC_OUTPUT_COMMANDS([ \
207       chmod +x ./bin/*; \
208 ])
209
210 # This list is initiated using autoscan and must be updated manually
211 # when adding a new file <filename>.in to manage. When you execute
212 # autoscan, the Makefile list is generated in the output file configure.scan.
213 # This could be helpfull to update de configuration.
214 AC_OUTPUT([ \
215   salome_adm/unix/SALOMEconfig.h \
216   adm_local/Makefile \
217   adm_local/unix/Makefile \
218   adm_local/unix/config_files/Makefile \
219   bin/VERSION \
220   bin/runAppli \
221   bin/Makefile \
222   doc/Makefile \
223   src/Makefile \
224   src/GENERICSOLVER/Makefile \
225   src/GENERICSOLVERGUI/Makefile \
226   resources/Makefile \
227   resources/GENERICSOLVERCatalog.xml \
228   idl/Makefile \
229   Makefile \
230 ])