source: trunk/autoconf/mpi.m4 @ 471

Last change on this file since 471 was 471, checked in by kulshres, 5 years ago

merge branch 'master' of 'gitclone' into 'svn'

The following commits were merged:

commit 6e104d84715fd2ba2926f8c99f3ebe51a7d49f4a
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 19 18:58:40 2014 +0100

get make test to work again

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit a937e606f3e0e1c2172affffc4d42455cafc89c3
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 19 18:50:01 2014 +0100

simplify linking with colpack

based on the conversation with Jean Utke, we don't need to store
COLPACK_CFLAGS/COLPACK_LIBS etc. Once the check passes in configure
everything is already set up.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 9e63d3b2f653139a1a7bfe8fa1963c93e9640b62
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 19 18:22:45 2014 +0100

don't use stubs library for real compilation

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit cb1deda1f278fc9150ab5a11eecef15f8f76cb7b
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 19 18:13:27 2014 +0100

change LDFLAGS for configure

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 8a02c2d81b286b0869ec7ff207c2238001c29fe3
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Feb 17 19:33:54 2014 +0100

try to deal with non -fPIC mpi libraries

don't use mpicc in the linking step for lib@adolclib@.so
shared libraries cannot be linked with static libraries
mpicc/mpicxx is required to link any user programmes anyway.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 76e70c141f223e36035492c5742075110449bbd9
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Feb 17 14:19:06 2014 +0100

allow user to call the resulting library whatever they want

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File size: 2.1 KB
Line 
1AC_DEFUN([MPI_CONF_PRE],
2[
3AC_PREREQ(2.59)
4
5# MPI root directory
6AC_ARG_WITH(mpi_root,
7[AC_HELP_STRING([--with-mpi-root=MPIROOT],
8                [absolute path to the MPI root directory])])
9
10if test x"$with_mpi_root" != "x";
11then
12  if test x"$adolc_ampi_support" = "xno";
13  then
14    AC_MSG_ERROR([if --with-mpi-root is set one  must also --enable_ampi])
15  fi
16  MPIROOT="$with_mpi_root"
17fi
18
19AC_ARG_WITH(mpicc,
20[AC_HELP_STRING([--with-mpicc=MPICC],
21                [name of the MPI C++ compiler to use (default mpicc)])])
22
23if test x"$with_mpicc" != "x";
24then
25  if test x"$adolc_ampi_support" = "xno";
26  then
27    AC_MSG_ERROR([if --with-mpicc is set one  must also --enable-ampi])
28  fi
29  MPICC="$with_mpicc"
30else
31  MPICC="mpicc"
32fi
33
34if test x"$with_mpi_root" != "x";
35then
36  MPICC="$with_mpi_root/bin/$MPICC"
37fi
38
39
40AC_ARG_WITH(mpicxx,
41[AC_HELP_STRING([--with-mpicxx=MPICXX],
42                [name of the MPI C++ compiler to use (default mpicxx)])])
43
44if test x"$with_mpicxx" != "x";
45then
46  if test x"$adolc_ampi_support" = "xno";
47  then
48    AC_MSG_ERROR([if --with-mpicxx is set one  must also --enable-ampi])
49  fi
50  MPICXX="$with_mpicxx"
51else
52  MPICXX="mpicxx"
53fi
54
55if test x"$with_mpi_root" != "x";
56then
57  MPICXX="$with_mpi_root/bin/$MPICXX"
58fi
59
60saveCC="$CC"
61saveCXX="$CXX"
62AC_SUBST(saveCC)
63AC_SUBST(saveCXX)
64
65if test x"$adolc_ampi_support" = "xyes";
66then
67  CC="$MPICC"
68  CXX="$MPICXX"
69fi
70
71])
72
73AC_DEFUN([MPI_CONF_POST],
74[
75AC_PREREQ(2.59)
76
77if test x"$adolc_ampi_support" = "xyes";
78then
79
80  AC_MSG_CHECKING([Linking of MPI C programs])
81  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <mpi.h>],
82               [MPI_Init(0,0)])],
83               [AC_MSG_RESULT([ok])],
84               [AC_MSG_RESULT([no])
85               AC_MSG_FAILURE([MPI C compiler is required by $PACKAGE])])
86
87fi
88
89if test x"$adolc_ampi_support" = "xyes";
90then
91
92  AC_LANG_PUSH([C++])
93  AC_MSG_CHECKING([Linking of MPI C++ programs])
94  AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <mpi.h>],
95               [MPI_Init(0,0)])],
96               [AC_MSG_RESULT([ok])],
97               [AC_MSG_RESULT([no])
98               AC_MSG_FAILURE([MPI C++ compiler is required by $PACKAGE])])
99  AC_LANG_POP([C++])
100fi
101
102])
Note: See TracBrowser for help on using the repository browser.