Commit 3de6b28c authored by Philip Carns's avatar Philip Carns
Browse files

update configure so that --with-mpi argument overrides whatever mpicc is

found in path


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@233 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 88360c8f
...@@ -3191,7 +3191,23 @@ fi ...@@ -3191,7 +3191,23 @@ fi
# Extract the first word of "mpicc", so it can be a program name with args.
# Check whether --with-mpi or --without-mpi was given.
if test "${with_mpi+set}" = set; then
withval="$with_mpi"
if test x$withval = xyes; then
{ { echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5
echo "$as_me: error: --with-mpi must be given a pathname" >&2;}
{ (exit 1); exit 1; }; }
else
MPICC="${withval}/bin/mpicc"
HAVE_MPICC="yes"
fi
fi;
if test x$HAVE_MPICC != xyes; then
# Extract the first word of "mpicc", so it can be a program name with args.
set dummy mpicc; ac_word=$2 set dummy mpicc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5 echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
...@@ -3227,24 +3243,9 @@ else ...@@ -3227,24 +3243,9 @@ else
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
if test x$HAVE_MPICC != xyes; then if test x$HAVE_MPICC = xyes; then
MPICC=mpicc
# Check whether --with-mpi or --without-mpi was given. fi
if test "${with_mpi+set}" = set; then
withval="$with_mpi"
if test x$withval = xyes; then
{ { echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5
echo "$as_me: error: --with-mpi must be given a pathname" >&2;}
{ (exit 1); exit 1; }; }
else
MPICC="${withval}/bin/mpicc"
GOT_MPICC="1"
fi
fi;
else
GOT_MPICC="1"
MPICC=mpicc
fi fi
...@@ -3306,9 +3307,9 @@ fi; ...@@ -3306,9 +3307,9 @@ fi;
saveCC="$CC" saveCC="$CC"
CC="$MPICC" CC="$MPICC"
if test x$GOT_MPICC != x1; then if test x$HAVE_MPICC != "xyes"; then
{ { echo "$as_me:$LINENO: error: must provide --with-mpi=<path> argument to configure." >&5 { { echo "$as_me:$LINENO: error: must provide --with-mpi=<path> argument to configure if mpicc is not in path." >&5
echo "$as_me: error: must provide --with-mpi=<path> argument to configure." >&2;} echo "$as_me: error: must provide --with-mpi=<path> argument to configure if mpicc is not in path." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
if test x$GOT_ALIGNMENT != x1; then if test x$GOT_ALIGNMENT != x1; then
......
...@@ -13,20 +13,21 @@ AC_PROG_INSTALL ...@@ -13,20 +13,21 @@ AC_PROG_INSTALL
CHECK_ZLIB CHECK_ZLIB
AC_CHECK_PROG(HAVE_MPICC, mpicc, yes, no) AC_ARG_WITH(mpi,
[ --with-mpi=<dir> Location of the MPI installation],
if test x$withval = xyes; then
AC_MSG_ERROR(--with-mpi must be given a pathname)
else
MPICC="${withval}/bin/mpicc"
HAVE_MPICC="yes"
fi
)
if test x$HAVE_MPICC != xyes; then if test x$HAVE_MPICC != xyes; then
AC_ARG_WITH(mpi, AC_CHECK_PROG(HAVE_MPICC, mpicc, yes, no)
[ --with-mpi=<dir> Location of the MPI installation], if test x$HAVE_MPICC = xyes; then
if test x$withval = xyes; then MPICC=mpicc
AC_MSG_ERROR(--with-mpi must be given a pathname) fi
else
MPICC="${withval}/bin/mpicc"
GOT_MPICC="1"
fi
)
else
GOT_MPICC="1"
MPICC=mpicc
fi fi
AC_SUBST(MPICC) AC_SUBST(MPICC)
...@@ -65,8 +66,8 @@ AC_ARG_WITH(log-path, ...@@ -65,8 +66,8 @@ AC_ARG_WITH(log-path,
saveCC="$CC" saveCC="$CC"
CC="$MPICC" CC="$MPICC"
if test x$GOT_MPICC != x1; then if test x$HAVE_MPICC != "xyes"; then
AC_MSG_ERROR(must provide --with-mpi=<path> argument to configure.) AC_MSG_ERROR(must provide --with-mpi=<path> argument to configure if mpicc is not in path.)
fi fi
if test x$GOT_ALIGNMENT != x1; then if test x$GOT_ALIGNMENT != x1; then
AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.) AC_MSG_ERROR(must provide --with-mem-align=<num> argument to configure.)
......
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