aboutsummaryrefslogtreecommitdiff
blob: 64c8bb2d8ec53eee9e2fcb05e7cf48b17e585618 (plain)
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
--- src5.1.3/MED_SRC_5.1.3/adm_local/unix/config_files/check_scotch.m4.orig	2009-09-27 23:07:31.245061430 +0200
+++ src5.1.3/MED_SRC_5.1.3/adm_local/unix/config_files/check_scotch.m4	2009-09-27 23:11:02.080868671 +0200
@@ -28,6 +28,10 @@
 
 SCOTCH_CPPFLAGS=""
 SCOTCH_LIBSUFFIX=""
+case "$build_cpu" in
+x86_64*)  SCOTCH_LIBSUFFIX="64" ;;
+*)        SCOTCH_LIBSUFFIX="" ;;
+esac
 SCOTCH_LIBS=""
 ENABLE_SCOTCH="no"
 
@@ -43,8 +47,8 @@
 LIBS_old=$LIBS
 
 if test "x${SCOTCHDIR}" != "x" ; then
-  SCOTCH_CPPFLAGS="-DENABLE_SCOTCH -I${SCOTCHDIR}"
-  SCOTCH_LIBS="-L${SCOTCHDIR}/bin -lscotch -lscotcherr"
+  SCOTCH_CPPFLAGS="-DENABLE_SCOTCH -I${SCOTCHDIR}/include/scotch"
+  SCOTCH_LIBS="-L${SCOTCHDIR}/lib${SCOTCH_LIBSUFFIX} -lscotch -lscotcherr"
 fi
 
 scotch_ok=no
@@ -57,14 +61,14 @@
 
 scotch_include_dir_ok=yes
 if test "x${SCOTCHDIR}" != "x" ; then
-  AC_CHECK_FILE(${SCOTCHDIR}/bin/scotch.h,
+  AC_CHECK_FILE(${SCOTCHDIR}/include/scotch/scotch.h,
                 scotch_include_dir_ok=yes,
                 scotch_include_dir_ok=no)
 fi
 
 if test "x${scotch_include_dir_ok}" = "xyes" ; then
   AC_TRY_COMPILE([#include <stdio.h>
-		  #include <bin/scotch.h>],
+		  #include <scotch.h>],
                  [SCOTCH_Graph* graph;
 		  SCOTCH_graphInit(graph)],
                  scotch_headers_ok=yes,
@@ -83,12 +87,12 @@
   AC_CHECKING(for SCOTCH binaries)
   scotch_lib_dir_ok=yes
   if test "x${SCOTCHDIR}" != "x" ; then
-    AC_CHECK_FILE(${SCOTCHDIR}/bin/libscotch.a,
+    AC_CHECK_FILE(${SCOTCHDIR}/lib${SCOTCH_LIBSUFFIX}/libscotch.a,
                   scotch_lib_dir_ok=yes,
                   scotch_lib_dir_ok=no)
     if test "x${scotch_lib_dir_ok}" = "xno" ; then
       SCOTCH_LIBSUFFIX=""
-      AC_CHECK_FILE(${SCOTCHDIR}/bin/libscotch.a,
+      AC_CHECK_FILE(${SCOTCHDIR}/lib${SCOTCH_LIBSUFFIX}/libscotch.a,
                     scotch_lib_dir_ok=yes,
                     scotch_lib_dir_ok=no)
     fi
@@ -96,7 +100,7 @@
   if test "x${scotch_lib_dir_ok}" = "xyes" ; then
     LIBS="${LIBS_old} ${SCOTCH_LIBS}"
     AC_TRY_LINK([#include <stdio.h>
-		#include <bin/scotch.h>],
+		#include <scotch.h>],
                   [SCOTCH_Graph* graph;
 		  SCOTCH_graphInit(graph)],
                 scotch_binaries_ok=yes,
@@ -105,7 +109,7 @@
       SCOTCH_LIBSUFFIX=""
       LIBS="${LIBS_old} ${SCOTCH_LIBS} "
       AC_TRY_LINK([#include <stdio.h>
-		   #include <bin/scotch.h>],
+		   #include <scotch.h>],
                   [SCOTCH_Graph* graph;
 		  SCOTCH_graphInit(graph)],
                   scotch_binaries_ok=yes,