Skip to content

Commit

Permalink
Add MPICH2 with pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
snoweye committed Jul 30, 2018
1 parent 1c32658 commit a21eb54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2018-07-29: Ver. 0.3-7
* Add "pkg-config" to "configure.ac".
* Check "OpenMPI" and "MPICH2" with "pkg-config"

2018-05-18: Ver. 0.3-6
* Move "rlecuyer" to Imports.

Expand Down
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ if test -z "${MPI_INCLUDE_PATH}" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config knows about MPICH" >&5
$as_echo_n "checking if pkg-config knows about MPICH... " >&6; }
if "${PKG_CONFIG}" --exists mpich2; then
if "${PKG_CONFIG}" --exists mpich; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
Expand All @@ -2486,9 +2486,12 @@ $as_echo "yes" >&6; }
TMP_LIB_DIRS=`"${PKG_CONFIG}" --libs mpich`
echo ">> TMP_LIB_DIRS = ${TMP_LIB_DIRS}"
TMP_LIB_PATH=`"${PKG_CONFIG}" --variable=libdir mpich`
echo ">> TMP_LIB_PATH = ${TMP_LIB_PATH}"
if test "$TMP_INC_DIRS" != "" -a "$TMP_LIB_DIRS" != "" ; then
TMP_INC=${TMP_INC_DIRS}
TMP_LIB=${TMP_LIB_DIRS}
TMP_LIB="-L${TMP_LIB_PATH} ${TMP_LIB_DIRS}"
fi
if test "$TMP_INC" != "" -a "$TMP_LIB" != "" ; then
Expand Down
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ if test -z "${MPI_INCLUDE_PATH}" ; then
AC_MSG_CHECKING([if pkg-config knows about MPICH])

dnl I assume pkg-config only works in MPICH2
if "${PKG_CONFIG}" --exists mpich2; then
if "${PKG_CONFIG}" --exists mpich; then
AC_MSG_RESULT([yes])

TMP_INC_DIRS=`"${PKG_CONFIG}" --cflags mpich`
Expand All @@ -221,9 +221,12 @@ if test -z "${MPI_INCLUDE_PATH}" ; then
TMP_LIB_DIRS=`"${PKG_CONFIG}" --libs mpich`
echo ">> TMP_LIB_DIRS = ${TMP_LIB_DIRS}"

TMP_LIB_PATH=`"${PKG_CONFIG}" --variable=libdir mpich`
echo ">> TMP_LIB_PATH = ${TMP_LIB_PATH}"

if test "$TMP_INC_DIRS" != "" -a "$TMP_LIB_DIRS" != "" ; then
TMP_INC=${TMP_INC_DIRS}
TMP_LIB=${TMP_LIB_DIRS}
TMP_LIB="-L${TMP_LIB_PATH} ${TMP_LIB_DIRS}"
fi

if test "$TMP_INC" != "" -a "$TMP_LIB" != "" ; then
Expand Down

0 comments on commit a21eb54

Please sign in to comment.