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