Whamcloud - gitweb
LU-5090 build: restore enable-mpitest option 84/10384/4
authorJames Simmons <uja.ornl@gmail.com>
Wed, 21 May 2014 14:37:21 +0000 (10:37 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 30 May 2014 03:56:00 +0000 (03:56 +0000)
Originally the enable-mpitests configure option was deeply
embedded in the liblustre configuration test. With the
removal of liblibustre this option got accidentally removed.
This patch restores this option.

Change-Id: I92ab1d3f187f579dca4bb6825a5bf1e80dbbee06
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10384
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build.m4
lustre/autoconf/lustre-core.m4

index cbcd90d..aa75c04 100644 (file)
@@ -643,6 +643,7 @@ LB_CONFIG_DOCS
 LB_CONFIG_UTILS
 LB_CONFIG_TESTS
 LC_CONFIG_CLIENT
 LB_CONFIG_UTILS
 LB_CONFIG_TESTS
 LC_CONFIG_CLIENT
+LB_CONFIG_MPITESTS
 LB_CONFIG_SERVERS
 
 # two macros for cmd3
 LB_CONFIG_SERVERS
 
 # two macros for cmd3
index e14184d..0ed0ee1 100644 (file)
@@ -1597,6 +1597,49 @@ AC_MSG_RESULT([$enable_client])
 ]) # LC_CONFIG_CLIENT
 
 #
 ]) # LC_CONFIG_CLIENT
 
 #
+# --enable-mpitests
+#
+AC_DEFUN([LB_CONFIG_MPITESTS], [
+AC_ARG_ENABLE([mpitests],
+       AC_HELP_STRING([--enable-mpitests==yes|no|mpicc wrapper],
+                      [include mpi tests]), [
+               enable_mpitests=yes
+               case $enableval in
+               yes)
+                       MPICC_WRAPPER=mpicc
+                       ;;
+               no)
+                       enable_mpitests=no
+                       ;;
+               *)
+                       MPICC_WRAPPER=$enableval
+                       ;;
+               esac
+       ], [
+               enable_mpitests="yes"
+               MPICC_WRAPPER=mpicc
+       ])
+
+       if test x$enable_mpitests != xno; then
+               oldcc=$CC
+               CC=$MPICC_WRAPPER
+               AC_CACHE_CHECK([whether mpitests can be built],
+                               lb_cv_mpi_tests, [
+               AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+                       #include <mpi.h>
+                       int main(void) {
+                               int flag;
+                               MPI_Initialized(&flag);
+                               return 0;
+                       }
+               ])], [], [enable_mpitests="no"])
+               ])
+               CC=$oldcc
+       fi
+       AC_SUBST(MPICC_WRAPPER)
+]) # LB_CONFIG_MPITESTS
+
+#
 # LC_CONFIG_QUOTA
 #
 # whether to enable quota support global control
 # LC_CONFIG_QUOTA
 #
 # whether to enable quota support global control