Commit c904d6e0 authored by Philip Carns's avatar Philip Carns

attempt to detect lib name for profile confs

parent bdbe35ed
......@@ -621,6 +621,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
MPICH_LIB_OLD
DARSHAN_VERSION
DISABLE_LDPRELOAD
CP_WRAPPERS
......@@ -4250,6 +4251,19 @@ $as_echo "#define __D_MPI_REQUEST MPI_Request" >>confdefs.h
fi
# attempt to detect librarly naming convention in mpi compiler script
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for old (pre-3.1.1) style MPICH library naming convention" >&5
$as_echo_n "checking for old (pre-3.1.1) style MPICH library naming convention... " >&6; }
if $CC -show foo.c -o foo |grep lmpich >& /dev/null; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
MPICH_LIB_OLD=1
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
MPICH_LIB_OLD=0
fi
DARSHAN_VERSION="2.3.1-pre1"
......@@ -4259,6 +4273,7 @@ DARSHAN_VERSION="2.3.1-pre1"
ac_config_files="$ac_config_files Makefile darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl darshan-config share/craype-1.x/darshan-module share/craype-2.x/darshan-module lib/pkgconfig/darshan-runtime.pc share/mpi-profile/darshan-cc.conf share/mpi-profile/darshan-cxx.conf share/mpi-profile/darshan-f.conf"
cat >confcache <<\_ACEOF
......
......@@ -287,6 +287,14 @@ AC_CHECK_TYPE([MPIO_Request],
AC_DEFINE(__D_MPI_REQUEST, MPI_Request, Generalized request type for MPI-IO)
,[#include <mpi.h>])
# attempt to detect librarly naming convention in mpi compiler script
AC_MSG_CHECKING(for old (pre-3.1.1) style MPICH library naming convention)
AS_IF([$CC -show foo.c -o foo |grep lmpich >& /dev/null],
AC_MSG_RESULT(yes)
MPICH_LIB_OLD=1,
AC_MSG_RESULT(no)
MPICH_LIB_OLD=0)
DARSHAN_VERSION="AC_PACKAGE_VERSION"
AC_SUBST(darshan_lib_path)
......@@ -296,6 +304,7 @@ AC_SUBST(__CP_LOG_PATH)
AC_SUBST(CP_WRAPPERS)
AC_SUBST(DISABLE_LDPRELOAD)
AC_SUBST(DARSHAN_VERSION)
AC_SUBST(MPICH_LIB_OLD)
AC_OUTPUT(Makefile
darshan-mk-log-dirs.pl
darshan-gen-cc.pl
......
......@@ -4,9 +4,14 @@
DARSHAN_PREFIX=@prefix@
MPICH_LIB_OLD=@MPICH_LIB_OLD@
# Libraries (and paths) to include before the MPI library
export PROFILE_PRELIB="-lmpichcxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
if [ $MPICH_LIB_OLD -eq 1 ]; then
export PROFILE_PRELIB="-lmpichcxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
else
export PROFILE_PRELIB="-lmpicxx `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
fi
# Libraries to include after the MPI library
export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
......
......@@ -4,9 +4,14 @@
DARSHAN_PREFIX=@prefix@
MPICH_LIB_OLD=@MPICH_LIB_OLD@
# Libraries (and paths) to include before the MPI library
export PROFILE_PRELIB="-lfmpich `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
if [ $MPICH_LIB_OLD -eq 1 ]; then
export PROFILE_PRELIB="-lfmpich `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
else
export PROFILE_PRELIB="-lmpifort `$DARSHAN_PREFIX/bin/darshan-config --pre-ld-flags`"
fi
# Libraries to include after the MPI library
export PROFILE_POSTLIB=`$DARSHAN_PREFIX/bin/darshan-config --post-ld-flags`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment