-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
467 lines (393 loc) · 14.8 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# Process this file with autoconf to produce a configure script.
## Initialize Autoconf & defined package name...
##Lors de la sortie d'une nouvelle release mettre à jour les champs suivants
##Mettre à jour le numéro de package
AC_INIT([MED Fichier],[4.1.1],[[email protected]],[med])
##Lors de la sortie d'une nouvelle release mettre à jour les champs suivants
##Ne pas oubliez de modifier -version-info x:y:z dans src/Makefile.am tools/medimport/Makefile.am
## (c'est maintenant centralisé ci-dessous dans la section libtool)
##Modifiez si necessaire les numéros de versions dans la documentation
##Ne pas oublier d'utiliser la dernière version des autotools
##Mettre à jour le ChangeLog et le README
##Mettre à jour l'algo. et la table de versionement des APIs internes (en C et en F)
##Mettre à jour les tests de compatibilité dans MEDfileCompatibility (chgt de majeur/mineur)
MED_NUM_MAJEUR=4
MED_NUM_MINEUR=1
MED_NUM_RELEASE=1
#Mettre à jour à chaque nouvelle release de version 4 pour prendre en compte les dernières évolutions des versions med-3 (après intégration des developpements de la version 3 dans la version 4)
#Mettre à jour CMakeLists.txt.in également
MED_3_LATEST_MINOR=3
MED_40_LATEST_RELEASE=1
AC_SUBST(MED_NUM_MAJEUR)
AC_SUBST(MED_NUM_MINEUR)
AC_SUBST(MED_NUM_RELEASE)
AC_SUBST(MED_3_LATEST_MINOR)
AC_SUBST(MED_40_LATEST_RELEASE)
# info libtool/versioning:
# 3. If the library source code has changed at all since the last
# update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
# 4. If any interfaces have been added, removed, or changed since the
# last update, increment CURRENT, and set REVISION to 0.
# 5. If any interfaces have been added since the last public release,
# then increment AGE.
# 6. If any interfaces have been removed or changed since the last
# public release, then set AGE to 0.
#
# A la mise à jour du mineur de la bibliothèque med, on a x+1:0:z+1 pour la version libtool
# ce qui permet aux programmes liés à l'ancienne bibliothèque de mineur-1
# d'utiliser la nouvelle bibliothèque pour lire/modifier les anciens fichiers
# et en créer de nouveaux en version mineur courante.
# Les anciennes bibliothèques refuseront de lire un fichier dont le mineur est supérieur à celui
# de la bibliothèque
#
#MAJ : Changer le versionement libtool et mettre à jour celui de cmake
MED_LIBTOOL_MAJ=12
MED_LIBTOOL_MIN=1
MED_LIBTOOL_REL=1
AC_SUBST(MED_LIBTOOL_MAJ)
AC_SUBST(MED_LIBTOOL_MIN)
AC_SUBST(MED_LIBTOOL_REL)
#Libtool version propose an abstraction of .so versionement whatever the unix is
#CMake must use the numbers generated by libtool not the numbers given to libtool
#Don't try to have the same numbers below and before this comment
#Don't use med-fichier product number for .so numbers, this is a nonsense
#The .so numbers defined for CMake are for Linux
MED_CMAKE_SO_MAJ=11
MED_CMAKE_SO_MIN=1
MED_CMAKE_SO_REL=1
dnl MED_CMAKE_SO_VERSION="11.1.1"
AC_SUBST(MED_CMAKE_SO_MAJ)
AC_SUBST(MED_CMAKE_SO_MIN)
AC_SUBST(MED_CMAKE_SO_REL)
dnl AC_SUBST(MED_CMAKE_SO_VERSION)
#MAJ : Changer le versionement libtool et mettre à jour celui de cmake
MEDIMPORT_LIBTOOL_MAJ=4
MEDIMPORT_LIBTOOL_MIN=0
MEDIMPORT_LIBTOOL_REL=4
AC_SUBST(MEDIMPORT_LIBTOOL_MAJ)
AC_SUBST(MEDIMPORT_LIBTOOL_MIN)
AC_SUBST(MEDIMPORT_LIBTOOL_REL)
#Libtool version propose an abstraction of .so versionement whatever the unix is
#CMake must use the numbers generated by libtool not the numbers given to libtool
#Don't try to have the same numbers below and before this comment
#Don't use med-fichier product number for .so numbers, this a nonsense
#The .so numbers defined for CMake are for Linux
MEDIMPORT_CMAKE_SO_MAJ=0
MEDIMPORT_CMAKE_SO_MIN=4
MEDIMPORT_CMAKE_SO_REL=0
dnl MEDIMPORT_CMAKE_SO_VERSION="0.3.0"
AC_SUBST(MEDIMPORT_CMAKE_SO_MAJ)
AC_SUBST(MEDIMPORT_CMAKE_SO_MIN)
AC_SUBST(MEDIMPORT_CMAKE_SO_REL)
dnl AC_SUBST(MEDIMPORT_CMAKE_SO_VERSION)
#Une modification de HDF_VERSION_NUM
#demande une modification du test de version ds
#med_check_hdf5.m4
HDF_VERSION_REF=5-1.10.2
HDF_VERSION_MAJOR_REF=1
HDF_VERSION_MINOR_REF=10
HDF_VERSION_RELEASE_REF=2
AC_SUBST(HDF_VERSION_REF)
AC_SUBST(HDF_VERSION_MAJOR_REF)
AC_SUBST(HDF_VERSION_MINOR_REF)
AC_SUBST(HDF_VERSION_RELEASE_REF)
#This the swig version prefered by this version of medfichier
#If we can't find at least this version, we will try older ones
m4_define([M4MED_SWIG_VERSION_REF],[3.0.8])
m4_define([M4MED_SWIG_MIN_VERSION_REF],[2.0.8])
MED_SWIG_VERSION_REF=M4MED_SWIG_VERSION_REF
MED_SWIG_MIN_VERSION_REF=M4MED_SWIG_MIN_VERSION_REF
AC_SUBST(MED_SWIG_VERSION_REF)
AC_SUBST(MED_SWIG_MIN_VERSION_REF)
#This the python version prefered by this version of medfichier
#If we can't find at least this version, we will try python version ref.
m4_define([M4MED_PYTHON_VERSION_REF],[3.0])
m4_define([M4MED_PYTHON3_VERSION_REF],[3.0])
m4_define([M4MED_PYTHON2_VERSION_REF],[2.7])
MED_PYTHON_VERSION_REF=M4MED_PYTHON_VERSION_REF
MED_PYTHON3_VERSION_REF=M4MED_PYTHON3_VERSION_REF
MED_PYTHON2_VERSION_REF=M4MED_PYTHON2_VERSION_REF
AC_SUBST(MED_PYTHON_VERSION_REF)
AC_SUBST(MED_PYTHON3_VERSION_REF)
AC_SUBST(MED_PYTHON2_VERSION_REF)
## Require Automake 1.7.9 or better.
## AM_INIT_AUTOMAKE(1.7.9)
## Guess we have a correct src directory by verifying we get the following file
AC_CONFIG_SRCDIR(src/ci/MEDmeshCr.c)
## Use the config directory for libtool stuff ...
AC_CONFIG_AUX_DIR(config)
AC_SUBST(ac_aux_dir)
AC_CONFIG_MACRO_DIR([config])
## Initialize Automake
AM_INIT_AUTOMAKE([dist-bzip2 tar-ustar serial-tests])
##
AC_CONFIG_HEADERS([include/med_config.h])
dnl Ne pas activer ici (cross compiling)
dnl AC_CHECK_SIZEOF_FORTRAN(integer)
dnl AC_CHECK_SIZEOF_FORTRAN(integer*4)
dnl AC_CHECK_SIZEOF_FORTRAN(integer*8)
## Check For HDF5
## Check if HDF5 is parallel or not before choosing the compilers to use
## if HDF5 is parallel we try to use the frontends mpi compilers
MED_CHECK_HDF5
## -> MED_ENABLE_PMED
## --> AX_PROG_CC_MPI
## --> MED_CHECK_F90
## -->AX_PROG_FC_MPI
## Configure le choix du compilateur Fortran 90 et active les tests correspondants
AM_CONDITIONAL([WITHF90],[ test -n "$FC" ])
AC_SUBST(FC)
AC_ARG_VAR([FTLDFLAGS],[Fortran specific flags for linking fortran tests])
AC_ARG_VAR([FTLIBS],[Fortran specific flags for linking fortran tests])
## Check if user want to disable explicit error messages
MED_CHECK_MESGERR
## Check For MED2.x Objects Not Readable By New3.x API
MED_ENABLE_CHECK23
## Check For installing test programs or not
MED_ENABLE_INSTALLTEST
# Checks for programs.
test "x$ac_cv_prog_cc_c99" = "xno" || AC_DEFINE(HAVE_CC_C99,[1],[The C99 capabilities of C compiler.])
MED_CHECK_F77
if test x"$enable_fortran" = xyes; then
AC_F77_WRAPPERS
AC_F77_LIBRARY_LDFLAGS
MED_CHECK_TYPEOF_HIDT
fi
## Choose default med_int type between {int,long}
MED_CHECK_TYPEOF_MEDINT
AX_PROG_CXX_MPI(test "x$mpi_wanted_test" = "xyes")
CXX_DIRNAME=`AS_DIRNAME(["$CXX"])`
CXX_BASENAME=`AS_BASENAME(["$CXX"])`
AC_CHECK_PROG([CXXOK],[$CXX_BASENAME],[yes],[no],[$PATH$PATH_SEPARATOR$CXX_DIRNAME$PATH_SEPARATOR],[])
if test "X$CXXOK" = "Xno"; then
AC_MSG_ERROR([Can't find a valid CXX compiler, please verify your env. var. PATH])
fi
dnl Il n'est pas necessaire de tester si le compilateur est en mode c++11
dnl car depuis swig-2.0.12 les itérateurs et nvlles méthodes des containers c++11 sont gérés
dnl et les wrappers sont gérés en 3.0.9.
dnl Si l'utilisateur défini un autre swig, ex 2.0.8, il regénère les wrappers...
dnl AX_CXX_COMPILE_STDCXX(11)
## Provide MED2.3 API symbols
MED_ENABLE_API23
# Libtool
LT_INIT([win32-dll])
## LOOKING FOR diff program
AC_CHECK_PROG([DIFF],[diff],[yes],[no],[],[])
if test "X$DIFF" = "Xno"; then
AC_MSG_ERROR([Can't find diff command, please verify your env. var. PATH])
fi
## LOOKING FOR sed program
AC_CHECK_PROG([SED],[sed],[yes],[no],[],[])
if test "X$SED" = "Xno"; then
AC_MSG_ERROR([Can't find sed command, please verify your env. var. PATH])
fi
## LOOKING FOR awk program
AC_PROG_AWK
if test "X$AWK" = "X"; then
AC_MSG_ERROR([Can't find awk command, please verify your env. var. PATH])
fi
## Check for ln -s
AC_PROG_LN_S
## Check for cp
AC_PATH_PROG([CP],[cp],[],[$PATH])
if test "X$CP" = "X"; then
AC_MSG_WARN([I don't find cp command in your PATH! - You coudn't use make check ! -])
fi
AC_SUBST(CP)
## Check for tk interpreter : we don't check version
## (for next realese :-)
AC_PATH_PROG([WISH],[wish],[],[$PATH])
if test "X$WISH" = "X"; then
AC_MSG_WARN([I don't find TK interpreter in your PATH! - You coudn't use graphical dump ! -])
fi
AC_SUBST(WISH)
# Checks for header files.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
AC_CHECK_HEADERS_ONCE([sys/time.h])
AC_CHECK_HEADERS([malloc.h sys/timeb.h])
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([sys/types.h pwd.h unistd.h])
AC_CHECK_FUNCS([getpwuid geteuid cuserid])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl AC_TYPE_INT32_T
dnl AC_TYPE_INT64_T
MED_CHECK_TYPEOF_INT64
# Checks for library functions.
##AC_FUNC_MALLOC
AC_CHECK_FUNCS([ftime gettimeofday])
#Check For Swig
#Swig is not needed for users as long as they don't do
# a <make distclean> and they don't use HDF //
#If swig is enabled then CHECK_SWIG check for a python devel
MED_CHECK_SWIG(MED_SWIG_VERSION_REF)
#MED_CHECK_SWIG
#MED_CHECK_SWIG([3.0.8],[/my_swig_path])
#Activer l'utilisation de l'API python (python devel non obligatoire si swig n'est pas utilisé).
MED_CHECK_PYTHON
# Initialize Autotest
# Transmet les inforamtions de configurations
# aux différents groupes de tests
# génère atconfig et atlocal à partir d'atlocal.in (on crée aussi un atconfig.in)
# Les deux fichiers générés sont utililisés par le script testsuite généré
AC_CONFIG_TESTDIR([tests/python])
AC_CONFIG_TESTDIR([tests/usecases/python])
## Configure Doxygen
## TODO : Créer une macro spécifique.
AC_SUBST_FILE(DOXYMEDFILE)
DOXYMEDFILE=$srcdir/doc/dox/MEDfile.als
AC_SUBST_FILE(DOXYMEDMESH)
DOXYMEDMESH=$srcdir/doc/dox/MEDmesh.als
AC_SUBST_FILE(DOXYMEDSUPPORTMESH)
DOXYMEDSUPPORTMESH=$srcdir/doc/dox/MEDsupportMesh.als
AC_SUBST_FILE(DOXYMEDFILTER)
DOXYMEDFILTER=$srcdir/doc/dox/MEDfilter.als
AC_SUBST_FILE(DOXYMEDLIBRARY)
DOXYMEDLIBRARY=$srcdir/doc/dox/MEDlibrary.als
AC_SUBST_FILE(DOXYMEDFIELD)
DOXYMEDFIELD=$srcdir/doc/dox/MEDfield.als
AC_SUBST_FILE(DOXYMEDFAMILY)
DOXYMEDFAMILY=$srcdir/doc/dox/MEDfamily.als
AC_SUBST_FILE(DOXYMEDEQUIVALENCE)
DOXYMEDEQUIVALENCE=$srcdir/doc/dox/MEDequivalence.als
AC_SUBST_FILE(DOXYMEDLINK)
DOXYMEDLINK=$srcdir/doc/dox/MEDlink.als
AC_SUBST_FILE(DOXYMEDJOINT)
DOXYMEDJOINT=$srcdir/doc/dox/MEDjoint.als
AC_SUBST_FILE(DOXYMEDLOCALIZATION)
DOXYMEDLOCALIZATION=$srcdir/doc/dox/MEDlocalization.als
AC_SUBST_FILE(DOXYMEDINTERP)
DOXYMEDINTERP=$srcdir/doc/dox/MEDinterp.als
AC_SUBST_FILE(DOXYMEDSTRUCTELEMENT)
DOXYMEDSTRUCTELEMENT=$srcdir/doc/dox/MEDstructElement.als
AC_SUBST_FILE(DOXYMEDPARAMETER)
DOXYMEDPARAMETER=$srcdir/doc/dox/MEDparameter.als
AC_SUBST_FILE(DOXYMEDPROFILE)
DOXYMEDPROFILE=$srcdir/doc/dox/MEDprofile.als
AC_SUBST_FILE(DOXYALIASES)
DOXYALIASES=./doc/dox/aliases.als
LT_OUTPUT
## Process a configuration summary
MED_SUMMARY
AC_CONFIG_FILES([Makefile
config/Makefile
include/2.3.6/Makefile
include/2.3.6/med.h
include/2.3.6/med23v30.h
include/2.3.6/med_utils.h
include/Makefile
include/H5public_extract.h
include/med.h
include/med_parameter.hf
include/med_utils.h
src/libmed4.settings
src/Makefile
src/ci/Makefile
src/fi/Makefile
src/cfi/Makefile
src/misc/Makefile
src/hdfi/Makefile
src/2.3.6/Makefile
src/2.3.6/ci/Makefile
src/2.3.6/fi/Makefile
src/2.3.6/cfi/Makefile
src/2.3.6/misc/Makefile
src/2.3.6/hdfi/Makefile
tests/Makefile
tests/python/Makefile
tests/python/atlocal
tests/c/Makefile
tests/c/dumps.ref/Makefile
tests/c/4.0.1/Makefile
tests/c/4.0.1/dumps.ref/Makefile
tests/c/3.2.1/Makefile
tests/c/3.2.1/dumps.ref/Makefile
tests/c/3.1.0/Makefile
tests/c/3.1.0/dumps.ref/Makefile
tests/c/3.0.8/Makefile
tests/c/3.0.8/dumps.ref/Makefile
tests/c/2.3.1/Makefile
tests/c/2.3.1/dumps.ref/Makefile
tests/c/2.3.2/Makefile
tests/c/2.3.2/dumps.ref/Makefile
tests/c/2.3.6/Makefile
tests/c/2.3.6/dumps.ref/Makefile
tests/c/2.3.1v3.0/Makefile
tests/c/2.3.1v3.0/dumps.ref/Makefile
tests/c/2.3.2v3.0/Makefile
tests/c/2.3.2v3.0/dumps.ref/Makefile
tests/c/2.3v3.0/Makefile
tests/c/2.3v3.0/dumps.ref/Makefile
tests/f/Makefile
tests/f/dumps.ref/Makefile
tests/f/3.2.1/Makefile
tests/f/3.2.1/dumps.ref/Makefile
tests/f/3.1.0/Makefile
tests/f/3.1.0/dumps.ref/Makefile
tests/f/3.0.8/Makefile
tests/f/3.0.8/dumps.ref/Makefile
tests/f/2.3.1/Makefile
tests/f/2.3.1/dumps.ref/Makefile
tests/f/2.3.2/Makefile
tests/f/2.3.2/dumps.ref/Makefile
tests/f/2.3.6/Makefile
tests/f/2.3.6/dumps.ref/Makefile
tests/f/2.3v3.0/Makefile
tests/f/2.3v3.0/dumps.ref/Makefile
tests/f/2.3.1v3.0/Makefile
tests/f/2.3.1v3.0/dumps.ref/Makefile
tests/f/2.3.2v3.0/Makefile
tests/f/2.3.2v3.0/dumps.ref/Makefile
tests/parallel/Makefile
tests/parallel/dumps.ref/Makefile
tests/parallel/f/Makefile
tests/usecases/Makefile
tests/usecases/c/Makefile
tests/usecases/c/dumps.ref/Makefile
tests/usecases/f/Makefile
tests/usecases/f/dumps.ref/Makefile
tests/usecases/python/Makefile
tests/usecases/python/atlocal
tests/unittests/Makefile
tests/unittests/c/Makefile
tests/unittests/c/dumps.ref/Makefile
tests/unittests/c/MEDinterp/Makefile
tests/unittests/c/MEDinterp/dumps.ref/Makefile
tests/unittests/c/MEDmesh/Makefile
tests/unittests/c/MEDmesh/dumps.ref/Makefile
tests/unittests/f/Makefile
tests/unittests/f/dumps.ref/Makefile
tools/Makefile
tools/mdump/Makefile
tools/mdump/xmdump2
tools/mdump/xmdump3
tools/mdump/xmdump4
tools/medconforme/Makefile
tools/medimport/Makefile
tools/medimport/include/Makefile
tools/medimport/2.3.1/Makefile
tools/medimport/2.1.x/Makefile
tools/medimport/2.3.6/Makefile
tools/medimport/3.0.0/Makefile
tools/medimport/3.1.0/Makefile
tools/medimport/3.2.0/Makefile
tools/medimport/4.0.0/Makefile
doc/Makefile
doc/dox/Makefile
doc/dox/aliases.als
doc/dox/Doxyfile.cfg
doc/gif/Makefile
doc/html/Makefile
doc/html/root.html
doc/html.dox/Makefile
doc/jpg/Makefile
doc/png/Makefile
doc/odt/Makefile
python/Makefile
src/CMakeLists.txt
tools/medimport/CMakeLists.txt
CMakeLists.txt])
AC_OUTPUT
cat src/libmed4.settings