]> SALOME platform Git repositories - modules/adao.git/blob - configure.ac
Salome HOME
fdfb80fea6ddbef3982907ef515dec65be840ce6
[modules/adao.git] / configure.ac
1 #  Copyright (C) 2010  CEA/DEN, 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([DATASSIM module], [0.1], [andre.ribes@edf.fr], [SalomeDATASSIM])
21 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
22 AC_CANONICAL_HOST
23 AC_CANONICAL_TARGET
24 AM_INIT_AUTOMAKE([-Wno-portability])
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=datassim
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 AC_LOCAL_INSTALL
73 dnl 
74 dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
75
76 AC_ENABLE_DEBUG(yes)
77 AC_DISABLE_PRODUCTION
78
79 echo ---------------------------------------------
80 echo testing libtool
81 echo ---------------------------------------------
82
83 dnl first, we set static to no!
84 dnl if we want it, use --enable-static
85 AC_ENABLE_STATIC(no)
86
87 AC_LIBTOOL_DLOPEN
88 AC_PROG_LIBTOOL
89
90 dnl Fix up the INSTALL macro if it s a relative path. We want the
91 dnl full-path to the binary instead.
92 case "$INSTALL" in
93    *install-sh*)
94       INSTALL='\${KERNEL_ROOT_DIR}'/adm_local/unix/config_files/install-sh
95       ;;
96 esac
97
98 echo
99 echo ---------------------------------------------
100 echo testing python
101 echo ---------------------------------------------
102 echo
103
104 CHECK_PYTHON
105
106 AM_PATH_PYTHON(2.4)
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 html generators
119 echo ---------------------------------------------
120 echo
121
122 CHECK_HTML_GENERATORS
123
124 echo
125 echo ---------------------------------------------
126 echo Testing Kernel
127 echo ---------------------------------------------
128 echo
129
130 CHECK_KERNEL
131
132 echo
133 echo ---------------------------------------------
134 echo Testing GUI
135 echo ---------------------------------------------
136 echo
137
138 CHECK_SALOME_GUI
139
140 echo
141 echo ---------------------------------------------
142 echo Summary
143 echo ---------------------------------------------
144 echo
145
146 echo Configure
147 variables="python_ok qt_ok doxygen_ok Kernel_ok"
148
149 for var in $variables
150 do
151    printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
152    eval echo \$$var
153 done
154
155 dnl We don t need to say when we re entering directories if we re using
156 dnl GNU make becuase make does it for us.
157 if test "X$GMAKE" = "Xyes"; then
158    AC_SUBST(SETX) SETX=":"
159 else
160    AC_SUBST(SETX) SETX="set -x"
161 fi
162 echo
163 echo ---------------------------------------------
164 echo generating Makefiles and configure files
165 echo ---------------------------------------------
166 echo
167
168 AC_OUTPUT_COMMANDS([ \
169       chmod +x ./bin/*; \
170 ])
171
172 # This list is initiated using autoscan and must be updated manually
173 # when adding a new file <filename>.in to manage. When you execute
174 # autoscan, the Makefile list is generated in the output file configure.scan.
175 # This could be helpfull to update de configuration.
176 AC_OUTPUT([ \
177   adm_local/Makefile \
178   adm_local/unix/Makefile \
179   src/Makefile \
180   src/DATASSIM/Makefile \
181   src/DATASSIMGUI/Makefile \
182   resources/Makefile \
183   Makefile \
184 ])