From c490600c8c63a183e1069d13e77aaa57207e48a1 Mon Sep 17 00:00:00 2001 From: knarf Date: Mon, 8 Apr 2013 02:40:06 +0000 Subject: Check that compiler wrapper supports library information output before using it - mostly important for non-OpenMPI implemenations git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/MPI/trunk@22 043a8217-7a68-40fe-abfd-36aa7d4fa6a8 --- configure.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.sh b/configure.sh index 5ade474..83088bc 100755 --- a/configure.sh +++ b/configure.sh @@ -194,9 +194,12 @@ fi # use mpic++ if available if [ -x ${MPI_DIR}/bin/mpic++ ]; then - : ${MPI_LIBS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:libs) '')"} - : ${MPI_LIB_DIRS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:libdirs) '' | sed -e 's+\( \|^\)/lib\( \|$\)++g;s+\( \|^\)/lib64\( \|$\)++g;s+\( \|^\)/usr/lib\( \|$\)++g;s+\( \|^\)/usr/lib64\( \|$\)++g;s+\( \|^\)/usr/local/lib\( \|$\)++g;s+\( \|^\)/usr/local/lib64\( \|$\)++g')"} - : ${MPI_INC_DIRS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:incdirs) '' | sed -e 's+\( \|^\)/include\( \|$\)++g;s+\( \|^\)/use/include\( \|$\)++g;s+\( \|^\)/usr/local/include\( \|$\)++g')"} + ${MPI_DIR}/bin/mpic++ --showme:libs > /dev/null 2>&1 + if [ $? == 0 ]; then + : ${MPI_LIBS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:libs) '')"} + : ${MPI_LIB_DIRS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:libdirs) '' | sed -e 's+\( \|^\)/lib\( \|$\)++g;s+\( \|^\)/lib64\( \|$\)++g;s+\( \|^\)/usr/lib\( \|$\)++g;s+\( \|^\)/usr/lib64\( \|$\)++g;s+\( \|^\)/usr/local/lib\( \|$\)++g;s+\( \|^\)/usr/local/lib64\( \|$\)++g')"} + : ${MPI_INC_DIRS="$(echo '' $(${MPI_DIR}/bin/mpic++ --showme:incdirs) '' | sed -e 's+\( \|^\)/include\( \|$\)++g;s+\( \|^\)/use/include\( \|$\)++g;s+\( \|^\)/usr/local/include\( \|$\)++g')"} + fi fi if [ "${MPI_DIR}" != '/usr' -a "${MPI_DIR}" != '/usr/local' ]; then -- cgit v1.2.3