summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in107
1 files changed, 70 insertions, 37 deletions
diff --git a/configure.in b/configure.in
index b0479f8..5ee4e88 100644
--- a/configure.in
+++ b/configure.in
@@ -1933,6 +1933,7 @@ if test -n "$PARALLEL"; then
RUNPARALLEL=""
fi
+dnl ----------------------------------------------------------------------
dnl Block the MPI_Get_count code since it does not work
dnl dnl Check whether MPI_Get_count actually works correctly on this
dnl dnl platform.
@@ -1959,7 +1960,75 @@ dnl ],
dnl AC_MSG_RESULT(no),
dnl AC_MSG_RESULT(yes)
dnl CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS",AC_MSG_RESULT(no))
-dnl
+dnl ----------------------------------------------------------------------
+
+ dnl --------------------------------------------------------------------
+ dnl Do we want MPE instrumentation feature on?
+ dnl
+ dnl This must be done after enable-parallel is checked since it depends
+ dnl on a mpich compiler.
+ dnl
+ AC_SUBST(MPE) MPE=yes
+ AC_ARG_WITH([mpe],
+ [AC_HELP_STRING([--with-mpe=DIR],
+ [Use MPE instrumentation [default=no]])],,
+ [withval=no])
+
+ case "X-$withval" in
+ X-|X-no|X-none)
+ AC_MSG_CHECKING([for MPE])
+ AC_MSG_RESULT([suppressed])
+ unset MPE
+ ;;
+ X-yes)
+ AC_CHECK_HEADERS([mpe.h],, [unset MPE])
+ AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE])
+ ;;
+ *)
+ case "$withval" in
+ *,*)
+ mpe_inc="`echo $withval | cut -f1 -d,`"
+ mpe_lib="`echo $withval | cut -f2 -d, -s`"
+ ;;
+ *)
+ if test -n "$withval"; then
+ mpe_inc="$withval/include"
+ mpe_lib="$withval/lib"
+ fi
+ ;;
+ esac
+
+ dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+ dnl can mess some compilers up.
+ if test "X$mpe_inc" = "X/usr/include"; then
+ mpe_inc=""
+ fi
+ if test "X$mpe_lib" = "X/usr/lib"; then
+ mpe_lib=""
+ fi
+
+ if test -n "$mpe_inc"; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$mpe_inc"
+ AC_CHECK_HEADERS([mpe.h],, [CPPFLAGS="$saved_CPPFLAGS"; unset MPE])
+ else
+ AC_CHECK_HEADERS([mpe.h],, [unset MPE])
+ fi
+
+ if test -n "$mpe_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$mpe_lib"
+ AC_CHECK_LIB([mpe], [MPE_Init_log],,
+ [LDFLAGS="$saved_LDFLAGS"; unset MPE])
+ else
+ AC_CHECK_LIB([mpe], [MPE_Init_log],, [unset MPE])
+ fi
+ ;;
+ esac
+
+ if test "X-$MPE" = "X-yes"; then
+ AC_DEFINE([HAVE_MPE], [1], [Define if we have MPE support])
+ fi
dnl ----------------------------------------------------------------------
dnl Check if they would like the "Flexible parallel" functions compiled in
@@ -1980,42 +2049,6 @@ dnl fi
fi
dnl ----------------------------------------------------------------------
-dnl Do we want MPE instrumentation feature on?
-dnl This must be done after enable-parallel is checked since it depends on
-dnl a mpich compiler.
-dnl
-AC_SUBST(MPE) MPE=yes
-AC_ARG_ENABLE([mpe],
- [AC_HELP_STRING([--enable-mpe],
- [Enable MPE instrumentation [default=no]])],,
- [enableval=no])
-
-AC_MSG_CHECKING([for MPE instrumentation])
-case "X-$enableval" in
- X-|X-no|X-none)
- AC_MSG_RESULT(no)
- unset MPE
- ;;
-
- X-yes)
- AC_MSG_RESULT(yes)
-
- dnl Check if MPE library is available
- AC_CHECK_LIB(mpe,main,, unset MPE)
- ;;
-
- *)
- AC_MSG_RESULT(error)
- AC_MSG_ERROR(\'$enableval\' is not a valid MPE value)
- unset MPE
- ;;
-esac
-
-if test "X-$MPE" = "X-yes"; then
- AC_DEFINE(HAVE_MPE, 1, [Define if we have MPE support])
-fi
-
-dnl ----------------------------------------------------------------------
dnl Turn on internal I/O filters by setting macros in header files
dnl Internal I/O filters are contained entirely within the library and do
dnl not depend on external headers or libraries. The shuffle filter is