File: mpich-pkg-config.patch

package info (click to toggle)
rmpi 0.7-3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 892 kB
  • sloc: ansic: 1,611; sh: 38; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download
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
Description: Try to find mpich with pkg-config if pkg-config did not find openmpi
Author: Adrian Bunk <bunk@debian.org>

--- rmpi-0.7-2.orig/configure.ac
+++ rmpi-0.7-2/configure.ac
@@ -96,6 +96,11 @@ if test -z "$MPI_ROOT" ; then
 fi
 
 if test -z "$MPI_ROOT" ; then
+	#Use pkg-config to find mpich
+	PKG_CHECK_MODULES([MPICH],[mpich],[MPITYPE="MPICH" MPI_ROOT="NONEED"],[:])
+fi
+
+if test -z "$MPI_ROOT" ; then
   for d in /opt/lib /usr/lib /usr /usr/lib/x86_64-linux-gnu/openmpi \
           /usr/local/lib /usr/local /usr/lib64/mpi/gcc/openmpi; do
     if test -f $d/include/mpi.h && test -d $d/lib/openmpi; then
@@ -303,7 +308,12 @@ case "$MPITYPE" in
     PKG_LIBS="-L${MPI_LIBPATH} -lmpi -llam ${MPI_LIBS}"
     ;;
   MPICH)
-    PKG_LIBS="-L${MPI_LIBPATH} -lmpich -lmpl -lopa ${MPI_LIBS}"
+    if test "$MPI_ROOT" = "NONEED"; then
+		PKG_CPPFLAGS="${MPICH_CFLAGS}"
+		PKG_LIBS="${MPICH_LIBS}"
+    else
+		PKG_LIBS="-L${MPI_LIBPATH} -lmpich -lmpl -lopa ${MPI_LIBS}"
+    fi
     ;;
   MPICH2)
     PKG_LIBS="-L${MPI_LIBPATH} -lmpich -lmpl -lopa ${MPI_LIBS}"