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