Salome HOME
merge from master
[tools/sat_salome.git] / products / patches / medcoupling-7.8.0-m4-files.patch
1 diff -rupN MEDCOUPLING_ori/adm_local/CMakeLists.txt MEDCOUPLING_new/adm_local/CMakeLists.txt
2 --- MEDCOUPLING_ori/adm_local/CMakeLists.txt    1970-01-01 01:00:00.000000000 +0100
3 +++ MEDCOUPLING_new/adm_local/CMakeLists.txt    2017-01-04 16:00:47.096478000 +0100
4 @@ -0,0 +1,20 @@
5 +# Copyright (C) 2012-2016  CEA/DEN, EDF R&D
6 +#
7 +# This library is free software; you can redistribute it and/or
8 +# modify it under the terms of the GNU Lesser General Public
9 +# License as published by the Free Software Foundation; either
10 +# version 2.1 of the License, or (at your option) any later version.
11 +#
12 +# This library is distributed in the hope that it will be useful,
13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 +# Lesser General Public License for more details.
16 +#
17 +# You should have received a copy of the GNU Lesser General Public
18 +# License along with this library; if not, write to the Free Software
19 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 +#
21 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 +#
23 +
24 +ADD_SUBDIRECTORY(unix)
25 diff -rupN MEDCOUPLING_ori/adm_local/unix/CMakeLists.txt MEDCOUPLING_new/adm_local/unix/CMakeLists.txt
26 --- MEDCOUPLING_ori/adm_local/unix/CMakeLists.txt       1970-01-01 01:00:00.000000000 +0100
27 +++ MEDCOUPLING_new/adm_local/unix/CMakeLists.txt       2017-01-04 16:00:47.099483000 +0100
28 @@ -0,0 +1,20 @@
29 +# Copyright (C) 2012-2016  CEA/DEN, EDF R&D
30 +#
31 +# This library is free software; you can redistribute it and/or
32 +# modify it under the terms of the GNU Lesser General Public
33 +# License as published by the Free Software Foundation; either
34 +# version 2.1 of the License, or (at your option) any later version.
35 +#
36 +# This library is distributed in the hope that it will be useful,
37 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
38 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
39 +# Lesser General Public License for more details.
40 +#
41 +# You should have received a copy of the GNU Lesser General Public
42 +# License along with this library; if not, write to the Free Software
43 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
44 +#
45 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
46 +#
47 +
48 +ADD_SUBDIRECTORY(config_files)
49 diff -rupN MEDCOUPLING_ori/adm_local/unix/config_files/check_MEDCOUPLING.m4 MEDCOUPLING_new/adm_local/unix/config_files/check_MEDCOUPLING.m4
50 --- MEDCOUPLING_ori/adm_local/unix/config_files/check_MEDCOUPLING.m4    1970-01-01 01:00:00.000000000 +0100
51 +++ MEDCOUPLING_new/adm_local/unix/config_files/check_MEDCOUPLING.m4    2017-01-04 16:00:47.105477000 +0100
52 @@ -0,0 +1,71 @@
53 +dnl Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
54 +dnl
55 +dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
56 +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
57 +dnl
58 +dnl This library is free software; you can redistribute it and/or
59 +dnl modify it under the terms of the GNU Lesser General Public
60 +dnl License as published by the Free Software Foundation; either
61 +dnl version 2.1 of the License, or (at your option) any later version.
62 +dnl
63 +dnl This library is distributed in the hope that it will be useful,
64 +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
65 +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
66 +dnl Lesser General Public License for more details.
67 +dnl
68 +dnl You should have received a copy of the GNU Lesser General Public
69 +dnl License along with this library; if not, write to the Free Software
70 +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
71 +dnl
72 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
73 +dnl
74 +
75 +# Check availability of MEDCOUPLING binary distribution
76 +#
77 +# Author : Roman NIKOLAEV (OPEN CASCADE, 2016)
78 +#
79 +
80 +AC_DEFUN([CHECK_MEDCOUPLING],[
81 +AC_REQUIRE([AC_LINKER_OPTIONS])dnl
82 +
83 +AC_CHECKING(for MEDCOUPLING)
84 +
85 +MEDCOUPLING_ok=no
86 +
87 +MEDCOUPLING_LDFLAGS=""
88 +MEDCOUPLING_CXXFLAGS=""
89 +
90 +AC_ARG_WITH(medcoupling,
91 +           [  --with-medcoupling=DIR root directory path of MEDCOUPLING installation ],
92 +           MEDCOUPLING_DIR="$withval",MEDCOUPLING_DIR="")
93 +
94 +if test "x${MEDCOUPLING_DIR}" == "x" ; then
95 +  AC_MSG_RESULT(for \${MEDCOUPLING_ROOT_DIR}: ${MEDCOUPLING_ROOT_DIR})
96 +
97 +   # --with-medcoupling option is not used
98 +   if test "x${MEDCOUPLING_ROOT_DIR}" != "x" ; then
99 +    # MEDCOUPLING_ROOT_DIR environment variable defined
100 +      MEDCOUPLING_DIR=${MEDCOUPLING_ROOT_DIR}
101 +   fi
102 +
103 +fi
104 +
105 +if test -f ${MEDCOUPLING_DIR}/include/InterpKernelValue.hxx ; then
106 +   AC_MSG_RESULT(Using MEDCOUPLING module distribution in ${MEDCOUPLING_DIR})
107 +   MEDCOUPLING_ok=yes
108 +
109 +   AC_SUBST(MEDCOUPLING_ROOT_DIR)
110 +
111 +   MEDCOUPLING_LDFLAGS=-L${MEDCOUPLING_DIR}/lib${LIB_LOCATION_SUFFIX}
112 +   MEDCOUPLING_CXXFLAGS=-I${MEDCOUPLING_DIR}/include
113 +
114 +   AC_SUBST(MEDCOUPLING_LDFLAGS)
115 +   AC_SUBST(MEDCOUPLING_CXXFLAGS)
116 +
117 +else
118 +   AC_MSG_WARN("Cannot find MCOUPLING module sources")
119 +fi
120 +
121 +AC_MSG_RESULT(for MEDCOUPLING: $MEDCOUPLING_ok)
122 +
123 +])dnl
124 diff -rupN MEDCOUPLING_ori/adm_local/unix/config_files/check_parmetis.m4 MEDCOUPLING_new/adm_local/unix/config_files/check_parmetis.m4
125 --- MEDCOUPLING_ori/adm_local/unix/config_files/check_parmetis.m4       1970-01-01 01:00:00.000000000 +0100
126 +++ MEDCOUPLING_new/adm_local/unix/config_files/check_parmetis.m4       2017-01-04 16:00:47.108474000 +0100
127 @@ -0,0 +1,225 @@
128 +dnl Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
129 +dnl
130 +dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
131 +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
132 +dnl
133 +dnl This library is free software; you can redistribute it and/or
134 +dnl modify it under the terms of the GNU Lesser General Public
135 +dnl License as published by the Free Software Foundation; either
136 +dnl version 2.1 of the License, or (at your option) any later version.
137 +dnl
138 +dnl This library is distributed in the hope that it will be useful,
139 +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
140 +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
141 +dnl Lesser General Public License for more details.
142 +dnl
143 +dnl You should have received a copy of the GNU Lesser General Public
144 +dnl License along with this library; if not, write to the Free Software
145 +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
146 +dnl
147 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
148 +dnl
149 +
150 +#for a future use...see further down AC_DEFUN([CHECK_PARMETISV4]
151 +
152 +#for use with ParMETIS V3
153 +AC_DEFUN([CHECK_PARMETIS],[
154 +AC_REQUIRE([AC_PROG_CC])dnl
155 +AC_REQUIRE([AC_PROG_CPP])dnl
156 +AC_REQUIRE([CHECK_MPI])dnl
157 +
158 +AC_CHECKING(for ParMETIS V3 Library)
159 +
160 +AC_LANG_SAVE
161 +AC_LANG_C
162 +
163 +PARMETIS_CPPFLAGS=""
164 +PARMETIS_LIBS=""
165 +ENABLE_PARMETIS="no"
166 +
167 +AC_CHECKING(for ParMETIS location)
168 +AC_ARG_WITH(parmetis,
169 +            [  --with-parmetis=DIR      root directory path to ParMETIS library installation ],
170 +            [PARMETISDIR="$withval"
171 +             AC_MSG_RESULT("select $withval as path to ParMETIS library")])
172 +
173 +if test "x${PARMETISDIR}" == "x" ; then
174 +  AC_MSG_RESULT(for \${PARMETIS_ROOT_DIR}: ${PARMETIS_ROOT_DIR})
175 +   # --with-parmetis option is not used
176 +   if test "x${PARMETIS_ROOT_DIR}" != "x" ; then
177 +      PARMETISDIR=${PARMETIS_ROOT_DIR}
178 +   fi
179 +fi
180 +
181 +AC_MSG_RESULT(\$PARMETISDIR = ${PARMETISDIR})
182 +
183 +CPPFLAGS_old="${CPPFLAGS}"
184 +LIBS_old=$LIBS
185 +
186 +if test "x${PARMETISDIR}" != "x" ; then
187 +  PARMETIS_CPPFLAGS="-DMED_ENABLE_PARMETIS -I${PARMETISDIR} ${MPI_INCLUDES}"
188 +  PARMETIS_LIBS="-L${PARMETISDIR} -lparmetis -lmetis ${MPI_LIBS}"
189 +fi
190 +
191 +parmetis_ok=no
192 +parmetis_headers_ok=no
193 +parmetis_binaries_ok=no
194 +
195 +dnl ParMETIS headers
196 +AC_CHECKING(for ParMETIS headers)
197 +CPPFLAGS="${CPPFLAGS_old} ${PARMETIS_CPPFLAGS}"
198 +
199 +parmetis_include_dir_ok=yes
200 +if test "x${PARMETISDIR}" != "x" ; then
201 +  AC_CHECK_FILE(${PARMETISDIR}/parmetis.h,
202 +                parmetis_include_dir_ok=yes,
203 +                parmetis_include_dir_ok=no)
204 +fi
205 +
206 +if test "x${parmetis_include_dir_ok}" = "xyes" ; then
207 +  AC_TRY_COMPILE([#include <parmetis.h>],
208 +                 [ParMETIS_V3_PartGeom(0,0,0,0,0)],
209 +                 parmetis_headers_ok=yes,
210 +                 parmetis_headers_ok=no)
211 +fi
212 +
213 +if test "x${parmetis_headers_ok}" = "xyes" ; then
214 +  AC_MSG_RESULT(\$PARMETIS_CPPFLAGS = ${PARMETIS_CPPFLAGS})
215 +fi
216 +AC_MSG_RESULT(for ParMETIS headers: $parmetis_headers_ok)
217 +
218 +if test "x${parmetis_headers_ok}" = "xyes" ; then
219 +  dnl ParMETIS binaries
220 +  AC_CHECKING(for ParMETIS binaries)
221 +  parmetis_lib_dir_ok=yes
222 +  AC_CHECK_FILE(${PARMETISDIR}/libparmetis.a,
223 +                parmetis_lib_dir_ok=yes,
224 +                parmetis_lib_dir_ok=no)
225 +
226 +  if test "x${parmetis_lib_dir_ok}" = "xyes" ; then
227 +    LIBS="${LIBS_old} ${PARMETIS_LIBS}"
228 +    AC_TRY_LINK([#include <parmetis.h>],
229 +                [ParMETIS_V3_PartGeom(0,0,0,0,0)],
230 +                parmetis_binaries_ok=yes,
231 +                parmetis_binaries_ok=no)
232 +  fi
233 +fi
234 +
235 +if test "x${parmetis_binaries_ok}" = "xyes" ; then
236 +  AC_MSG_RESULT(\$PARMETIS_LIBS = ${PARMETIS_LIBS})
237 +fi
238 +AC_MSG_RESULT(for ParMETIS binaries: $parmetis_binaries_ok)
239 +
240 +CPPFLAGS="${CPPFLAGS_old}"
241 +LIBS="${LIBS_old}"
242 +
243 +if test "x${parmetis_headers_ok}" = "xyes" ; then
244 +  if test "x${parmetis_binaries_ok}" = "xyes" ; then
245 +    parmetis_ok=yes
246 +    ENABLE_PARMETIS="yes"
247 +    # ParMETIS includes METIS, so we redefine METIS cppflags and libs
248 +    # And metis.h #include parmetis.h + mpi.h
249 +    metis_ok=yes
250 +    ENABLE_METIS="yes"
251 +    METISDIR=${PARMETISDIR}
252 +    METIS_CPPFLAGS="-DMED_ENABLE_METIS -I${METISDIR}/METISLib ${PARMETIS_CPPFLAGS}"
253 +    METIS_LIBS="-L${METISDIR} -lmetis ${MPI_LIBS}"
254 +  fi
255 +fi
256 +
257 +AC_MSG_RESULT(for ParMETIS: $parmetis_ok)
258 +
259 +AC_SUBST(ENABLE_PARMETIS)
260 +AC_SUBST(PARMETIS_CPPFLAGS)
261 +AC_SUBST(PARMETIS_LIBS)
262 +AC_SUBST(ENABLE_METIS)
263 +AC_SUBST(METIS_CPPFLAGS)
264 +AC_SUBST(METIS_LIBS)
265 +
266 +AC_LANG_RESTORE
267 +
268 +])dnl
269 +
270 +#for a future use...
271 +AC_DEFUN([CHECK_PARMETISV4],[
272 +AC_REQUIRE([AC_PROG_CC])dnl
273 +AC_REQUIRE([AC_PROG_CPP])dnl
274 +AC_REQUIRE([CHECK_MPI])dnl
275 +
276 +AC_CHECKING(for ParMETIS V4 Library)
277 +
278 +AC_LANG_SAVE
279 +AC_LANG_C
280 +
281 +PARMETIS_CPPFLAGS=""
282 +PARMETIS_LIBS=""
283 +ENABLE_PARMETIS="no"
284 +
285 +AC_CHECKING(for ParMETIS location)
286 +AC_ARG_WITH(parmetis,
287 +            [  --with-parmetis=DIR      root directory path to ParMETIS library installation ],
288 +            [PARMETISDIR="$withval"
289 +             AC_MSG_RESULT("select $withval as path to ParMETIS library")])
290 +
291 +AC_MSG_RESULT(\$PARMETISDIR = ${PARMETISDIR})
292 +
293 +CPPFLAGS_old="${CPPFLAGS}"
294 +LIBS_old=$LIBS
295 +
296 +if test "x${PARMETISDIR}" != "x" ; then
297 +  PARMETIS_CPPFLAGS="-DMED_ENABLE_PARMETIS -I${PARMETISDIR}/include ${MPI_INCLUDES}"
298 +  PARMETIS_LIBS="-L${PARMETISDIR}/lib -lparmetis -lmetis ${MPI_LIBS}"
299 +fi
300 +
301 +parmetis_ok=no
302 +parmetis_headers_ok=no
303 +parmetis_binaries_ok=no
304 +
305 +dnl ParMETIS headers
306 +AC_CHECKING(for ParMETIS headers)
307 +CPPFLAGS="${CPPFLAGS_old} ${PARMETIS_CPPFLAGS}"
308 +
309 +parmetis_include_dir_ok=yes
310 +if test "x${PARMETISDIR}" != "x" ; then
311 +  AC_CHECK_FILE(${PARMETISDIR}/include/parmetis.h,
312 +                parmetis_headers_ok=yes,
313 +                parmetis_headers_ok=no)
314 +fi
315 +
316 +if test "x${parmetis_headers_ok}" = "xyes" ; then
317 +  AC_MSG_RESULT(\$PARMETIS_CPPFLAGS = ${PARMETIS_CPPFLAGS})
318 +fi
319 +AC_MSG_RESULT(for ParMETIS headers: $parmetis_headers_ok)
320 +
321 +if test "x${parmetis_headers_ok}" = "xyes" ; then
322 +  dnl ParMETIS binaries
323 +  AC_CHECKING(for ParMETIS binaries)
324 +  AC_CHECK_FILE(${PARMETISDIR}/lib/libparmetis.a,
325 +                parmetis_binaries_ok=yes,
326 +                parmetis_binaries_ok=no)
327 +fi
328 +
329 +if test "x${parmetis_binaries_ok}" = "xyes" ; then
330 +  AC_MSG_RESULT(\$PARMETIS_LIBS = ${PARMETIS_LIBS})
331 +fi
332 +AC_MSG_RESULT(for ParMETIS binaries: $parmetis_binaries_ok)
333 +
334 +CPPFLAGS="${CPPFLAGS_old}"
335 +LIBS="${LIBS_old}"
336 +
337 +if test "x${parmetis_headers_ok}" = "xyes" ; then
338 +  if test "x${parmetis_binaries_ok}" = "xyes" ; then
339 +    parmetis_ok=yes
340 +    ENABLE_PARMETIS="yes"
341 +  fi
342 +fi
343 +
344 +AC_MSG_RESULT(for ParMETIS: $parmetis_ok)
345 +
346 +AC_SUBST(ENABLE_PARMETIS)
347 +AC_SUBST(PARMETIS_CPPFLAGS)
348 +AC_SUBST(PARMETIS_LIBS)
349 +
350 +AC_LANG_RESTORE
351 +
352 +])dnl
353 diff -rupN MEDCOUPLING_ori/adm_local/unix/config_files/check_scotch.m4 MEDCOUPLING_new/adm_local/unix/config_files/check_scotch.m4
354 --- MEDCOUPLING_ori/adm_local/unix/config_files/check_scotch.m4 1970-01-01 01:00:00.000000000 +0100
355 +++ MEDCOUPLING_new/adm_local/unix/config_files/check_scotch.m4 2017-01-04 16:00:47.110484000 +0100
356 @@ -0,0 +1,155 @@
357 +dnl Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
358 +dnl
359 +dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
360 +dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
361 +dnl
362 +dnl This library is free software; you can redistribute it and/or
363 +dnl modify it under the terms of the GNU Lesser General Public
364 +dnl License as published by the Free Software Foundation; either
365 +dnl version 2.1 of the License, or (at your option) any later version.
366 +dnl
367 +dnl This library is distributed in the hope that it will be useful,
368 +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
369 +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
370 +dnl Lesser General Public License for more details.
371 +dnl
372 +dnl You should have received a copy of the GNU Lesser General Public
373 +dnl License along with this library; if not, write to the Free Software
374 +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
375 +dnl
376 +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
377 +dnl
378 +
379 +AC_DEFUN([CHECK_SCOTCH],[
380 +
381 +AC_CHECKING(for scotch)
382 +
383 +AC_LANG_SAVE
384 +AC_LANG_C
385 +
386 +dnl
387 +dnl default values
388 +dnl
389 +SCOTCH_CPPFLAGS="SCOTCH_CPPFLAGS_NOT_DEFINED"
390 +SCOTCH_LIBS="SCOTCH_LIBS_NOT_FOUND"
391 +SCOTCH_LIBSUFFIX="-not-defined"
392 +
393 +ENABLE_SCOTCH="no"
394 +
395 +AC_CHECKING(for scotch location)
396 +
397 +AC_ARG_WITH(scotch,
398 +            [  --with-scotch=DIR      root directory path to SCOTCH library installation ],
399 +            [SCOTCHDIR="$withval"
400 +             AC_MSG_RESULT([Select $withval as path to SCOTCH library])])
401 +
402 +if test "x${SCOTCHDIR}" == "x" ; then
403 +  AC_MSG_RESULT(for \${SCOTCH_ROOT_DIR}: ${SCOTCH_ROOT_DIR})
404 +   # --with-scotch option is not used
405 +   if test "x${SCOTCH_ROOT_DIR}" != "x" ; then
406 +      SCOTCHDIR=${SCOTCH_ROOT_DIR}
407 +   fi
408 +fi
409 +
410 +if test "x${SCOTCHDIR}" = "x" ; then
411 +  AC_MSG_WARN(SCOTCHDIR is not specified)
412 +  AC_MSG_NOTICE(Trying native scotch...)
413 +  SCOTCHDIR=/usr
414 +fi
415 +
416 +CPPFLAGS_old="${CPPFLAGS}"
417 +LIBS_old=$LIBS
418 +
419 +scotch_ok=no
420 +scotch_headers_ok=no
421 +scotch_binaries_ok=no
422 +
423 +dnl
424 +dnl SCOTCH headers
425 +dnl
426 +AC_CHECKING(for SCOTCH headers)
427 +
428 +for d in ${SCOTCHDIR}/include ${SCOTCHDIR}/include/scotch ${SCOTCHDIR}/bin ${SCOTCHDIR} ; do
429 +  dnl
430 +  dnl check scotch.h file availability
431 +  dnl
432 +  AC_CHECK_FILE([${d}/scotch.h],
433 +                [scotch_include_dir_ok=yes],
434 +                [scotch_include_dir_ok=no])
435 +
436 +  if test "x${scotch_include_dir_ok}" = "xyes" ; then
437 +    LOCAL_INCLUDES="-DMED_ENABLE_SCOTCH -I${d} ${MPI_INCLUDES}"
438 +    CPPFLAGS="${CPPFLAGS_old} ${LOCAL_INCLUDES} -std=c99"
439 +    AC_TRY_COMPILE([
440 +      #include <stdio.h>
441 +      #include <scotch.h>
442 +      ],
443 +      [SCOTCH_Graph* graph; SCOTCH_graphInit(graph)],
444 +      [scotch_headers_ok=yes],
445 +      [scotch_headers_ok=no])
446 +    if test "x${scotch_headers_ok}" = "xyes" ; then
447 +      break;
448 +    fi
449 +  fi
450 +done
451 +
452 +dnl
453 +dnl result for headers
454 +dnl
455 +AC_MSG_RESULT(for scotch headers: $scotch_headers_ok)
456 +
457 +dnl
458 +dnl SCOTCH libraries
459 +dnl
460 +if test "x${scotch_headers_ok}" = "xyes" ; then
461 +  AC_CHECKING(for scotch libraries)
462 +
463 +  for d in ${SCOTCHDIR}/lib ${SCOTCHDIR}/lib64 ${SCOTCHDIR}/lib/scotch ${SCOTCHDIR}/lib64/scotch ${SCOTCHDIR}/bin ${SCOTCHDIR} ; do
464 +    LOCAL_LIBS="-L${d} -lscotch -lscotcherr"
465 +    LIBS="${LIBS_old} ${LOCAL_LIBS}"
466 +    AC_TRY_LINK([
467 +      #include <stdio.h>
468 +      #include <scotch.h>
469 +      ],
470 +      [SCOTCH_Graph* graph; SCOTCH_graphInit(graph)],
471 +      [scotch_binaries_ok=yes],
472 +      [scotch_binaries_ok=no])
473 +    if test "x${scotch_binaries_ok}" = "xyes" ; then
474 +      break;
475 +    fi
476 +  done
477 +fi
478 +
479 +dnl
480 +dnl result for libraries
481 +dnl
482 +AC_MSG_RESULT(for scotch libraries: $scotch_binaries_ok)
483 +
484 +dnl
485 +dnl summary
486 +dnl
487 +if test "x${scotch_binaries_ok}" = "xyes" ; then
488 +  SCOTCH_CPPFLAGS=${LOCAL_INCLUDES}
489 +  SCOTCH_LIBS=${LOCAL_LIBS}
490 +  SCOTCH_LIBSUFFIX=""
491 +  ENABLE_SCOTCH="yes"
492 +  scotch_ok=yes
493 +  AC_MSG_RESULT(\$SCOTCH_CPPFLAGS  = ${SCOTCH_CPPFLAGS})
494 +  AC_MSG_RESULT(\$SCOTCH_LIBS      = ${SCOTCH_LIBS})
495 +  AC_MSG_RESULT(\$SCOTCH_LIBSUFFIX = ${SCOTCH_LIBSUFFIX})
496 +fi
497 +AC_MSG_RESULT(for scotch: $scotch_ok)
498 +
499 +CPPFLAGS="${CPPFLAGS_old}"
500 +LIBS="${LIBS_old}"
501 +
502 +AC_SUBST(SCOTCH_CPPFLAGS)
503 +AC_SUBST(SCOTCH_LIBSUFFIX)
504 +AC_SUBST(SCOTCH_LIBS)
505 +AC_SUBST(ENABLE_SCOTCH)
506 +
507 +AC_LANG_RESTORE
508 +
509 +])dnl
510 +
511 +
512 diff -rupN MEDCOUPLING_ori/adm_local/unix/config_files/CMakeLists.txt MEDCOUPLING_new/adm_local/unix/config_files/CMakeLists.txt
513 --- MEDCOUPLING_ori/adm_local/unix/config_files/CMakeLists.txt  1970-01-01 01:00:00.000000000 +0100
514 +++ MEDCOUPLING_new/adm_local/unix/config_files/CMakeLists.txt  2017-01-04 16:00:47.102538000 +0100
515 @@ -0,0 +1,29 @@
516 +# Copyright (C) 2012-2016  CEA/DEN, EDF R&D
517 +#
518 +# This library is free software; you can redistribute it and/or
519 +# modify it under the terms of the GNU Lesser General Public
520 +# License as published by the Free Software Foundation; either
521 +# version 2.1 of the License, or (at your option) any later version.
522 +#
523 +# This library is distributed in the hope that it will be useful,
524 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
525 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
526 +# Lesser General Public License for more details.
527 +#
528 +# You should have received a copy of the GNU Lesser General Public
529 +# License along with this library; if not, write to the Free Software
530 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
531 +#
532 +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
533 +#
534 +
535 +SET(dist_admlocalm4_DATA
536 +    check_MEDCOUPLING.m4
537 +    check_parmetis.m4
538 +    check_scotch.m4
539 +)
540 +
541 +FOREACH(f ${dist_admlocalm4_DATA})
542 +  SET(DEST adm_local/unix/config_files)
543 +  INSTALL(FILES ${f} DESTINATION ${DEST})
544 +ENDFOREACH(f ${dist_admlocalm4_DATA})
545 diff -rupN MEDCOUPLING_ori/CMakeLists.txt MEDCOUPLING_new/CMakeLists.txt
546 --- MEDCOUPLING_ori/CMakeLists.txt      2017-01-17 09:39:14.489728365 +0100
547 +++ MEDCOUPLING_new/CMakeLists.txt      2017-01-04 16:25:17.608100119 +0100
548 @@ -214,6 +214,7 @@ IF(WIN32)
549  ENDIF(WIN32)
550  
551  ADD_SUBDIRECTORY(src)
552 +ADD_SUBDIRECTORY(adm_local)
553  ADD_SUBDIRECTORY(cmake_files)
554  
555  IF(MEDCOUPLING_BUILD_DOC)