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