|
Packit Service |
c5cf8c |
[#] start of __file__
|
|
Packit Service |
c5cf8c |
dnl MPICH_SUBCFG_BEFORE=src/pm/util
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl _BODY handles the former role of configure in the subsystem
|
|
Packit Service |
c5cf8c |
AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# the pm_names variable is set by the top level configure
|
|
Packit Service |
c5cf8c |
build_remshell=no
|
|
Packit Service |
c5cf8c |
for pm_name in $pm_names ; do
|
|
Packit Service |
c5cf8c |
if test "X$pm_name" = "Xremshell" ; then
|
|
Packit Service |
c5cf8c |
build_remshell=yes
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
AM_CONDITIONAL([BUILD_PM_REMSHELL],[test "X$build_remshell" = "Xyes"])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# first_pm_name is set by the top level configure
|
|
Packit Service |
c5cf8c |
AM_CONDITIONAL([PRIMARY_PM_REMSHELL],[test "X$first_pm_name" = "Xremshell"])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_COND_IF([BUILD_PM_REMSHELL],[
|
|
Packit Service |
c5cf8c |
AC_MSG_NOTICE([RUNNING CONFIGURE FOR src/pm/remshell])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Check that we are using the simple PMI implementation
|
|
Packit Service |
c5cf8c |
# (Selecting multiple PMs may require incompatible PMI implementations
|
|
Packit Service |
c5cf8c |
# (e.g., remshell and SMPD).
|
|
Packit Service |
c5cf8c |
if test -z "$PM_REQUIRES_PMI" ; then
|
|
Packit Service |
c5cf8c |
PM_REQUIRES_PMI=simple
|
|
Packit Service |
c5cf8c |
elif test "$PM_REQUIRES_PMI" != "simple" ; then
|
|
Packit Service |
c5cf8c |
echo "remshell requires the simple PMI implementation; $PM_REQUIRES_PMI has already been selected"
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# tell src/pm/util to configure itself
|
|
Packit Service |
c5cf8c |
build_pm_util=yes
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_ARG_ENABLE([allowport],
|
|
Packit Service |
c5cf8c |
[AS_HELP_STRING([--enable-allowport],
|
|
Packit Service |
c5cf8c |
[Turn on use of a port for communicating with the processes started by mpiexec])],
|
|
Packit Service |
c5cf8c |
[],
|
|
Packit Service |
c5cf8c |
[enable_allowport=yes])
|
|
Packit Service |
c5cf8c |
AC_ARG_ENABLE([onsig],
|
|
Packit Service |
c5cf8c |
[AS_HELP_STRING([--enable-onsig],
|
|
Packit Service |
c5cf8c |
[Control the handling of processes that signal
|
|
Packit Service |
c5cf8c |
(e.g., SEGV) using ptrace. Disabled by default])],
|
|
Packit Service |
c5cf8c |
[],
|
|
Packit Service |
c5cf8c |
[enable_onsig=no])
|
|
Packit Service |
c5cf8c |
AC_ARG_ENABLE([newsession],
|
|
Packit Service |
c5cf8c |
[AS_HELP_STRING([--enable-newsession],
|
|
Packit Service |
c5cf8c |
[Create a new process group session if standard
|
|
Packit Service |
c5cf8c |
in is not connected to a terminal])],
|
|
Packit Service |
c5cf8c |
[],
|
|
Packit Service |
c5cf8c |
[enable_newsession=yes])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl check for library functions
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
dnl Check for special compile characteristics
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
dnl Is there libnsl needed for gethostbyname?
|
|
Packit Service |
c5cf8c |
dnl AC_SEARCH_LIBS(gethostbyname,nsl)
|
|
Packit Service |
c5cf8c |
AC_SEARCH_LIBS([socketpair],[socket])
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
dnl Check for a specific header
|
|
Packit Service |
c5cf8c |
AC_CHECK_HEADERS([sys/types.h signal.h sys/ptrace.h])
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
dnl Check for functions. This invokes another test if the function is
|
|
Packit Service |
c5cf8c |
dnl found. The braces around the second test are essential.
|
|
Packit Service |
c5cf8c |
dnl AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])
|
|
Packit Service |
c5cf8c |
AC_CHECK_FUNCS([strsignal])
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
dnl Check for signal handlers
|
|
Packit Service |
c5cf8c |
AC_CHECK_FUNCS([sigaction signal sigset])
|
|
Packit Service |
c5cf8c |
sigaction_ok=no
|
|
Packit Service |
c5cf8c |
if test "$ac_cv_func_sigaction" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_CACHE_CHECK([for struct sigaction],pac_cv_struct_sigaction,[
|
|
Packit Service |
c5cf8c |
AC_TRY_COMPILE([#include <signal.h>],[
|
|
Packit Service |
c5cf8c |
struct sigaction act; sigaddset( &act.sa_mask, SIGINT );],
|
|
Packit Service |
c5cf8c |
pac_cv_struct_sigaction="yes",pac_cv_struct_sigaction="no")])
|
|
Packit Service |
c5cf8c |
if test "$pac_cv_struct_sigaction" = "no" ; then
|
|
Packit Service |
c5cf8c |
AC_CACHE_CHECK([for struct sigaction with _POSIX_SOURCE],
|
|
Packit Service |
c5cf8c |
pac_cv_struct_sigaction_needs_posix,[
|
|
Packit Service |
c5cf8c |
AC_TRY_COMPILE([#define _POSIX_SOURCE
|
|
Packit Service |
c5cf8c |
#include <signal.h>],[
|
|
Packit Service |
c5cf8c |
struct sigaction act; sigaddset( &act.sa_mask, SIGINT );],
|
|
Packit Service |
c5cf8c |
pac_cv_struct_sigaction_needs_posix="yes",
|
|
Packit Service |
c5cf8c |
pac_cv_struct_sigaction_needs_posix="no")])
|
|
Packit Service |
c5cf8c |
if test "$pac_cv_struct_sigaction_needs_posix" = "yes" ; then
|
|
Packit Service |
c5cf8c |
sigaction_ok=yes
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
sigaction_ok=yes
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
# Decide on the signal handler to use
|
|
Packit Service |
c5cf8c |
if test "$ac_cv_func_sigaction" = "yes" -a "$sigaction_ok" = "yes" ; then
|
|
Packit Service |
c5cf8c |
# FIXME DJG: where should this get set?
|
|
Packit Service |
c5cf8c |
if test "$pac_struct_sigaction_needs_posix" = yes ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(NEEDS_POSIX_FOR_SIGACTION,1,[Define if _POSIX_SOURCE needed to get sigaction])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_DEFINE(USE_SIGACTION,1,[Define if sigaction should be used to set signals])
|
|
Packit Service |
c5cf8c |
elif test "$ac_cv_func_signal" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(USE_SIGNAL,1,[Define if signal should be used to set signals])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
if test "$enable_allowport" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(MPIEXEC_ALLOW_PORT,1,[Define if a port may be used to communicate with the processes])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# some of these may be redundant with the upper level code, although the caching
|
|
Packit Service |
c5cf8c |
# should detect it and make the performance impact a non-issue
|
|
Packit Service |
c5cf8c |
AC_CHECK_HEADERS([string.h sys/time.h unistd.h stdlib.h sys/socket.h wait.h errno.h])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_CHECK_FUNCS([ptrace])
|
|
Packit Service |
c5cf8c |
# It isn't enough to find ptrace. We also need the ptrace
|
|
Packit Service |
c5cf8c |
# parameters, which some systems, such as IRIX, do not define.
|
|
Packit Service |
c5cf8c |
if test "$ac_cv_func_ptrace" = yes ; then
|
|
Packit Service |
c5cf8c |
AC_CACHE_CHECK([for ptrace named parameters],
|
|
Packit Service |
c5cf8c |
[pac_cv_has_ptrace_parms],[
|
|
Packit Service |
c5cf8c |
AC_TRY_COMPILE([
|
|
Packit Service |
c5cf8c |
#include <sys/types.h>
|
|
Packit Service |
c5cf8c |
#include <sys/ptrace.h>],[int i = PTRACE_CONT;],[pac_cv_has_ptrace_parms=yes],
|
|
Packit Service |
c5cf8c |
[pac_cv_has_ptrace_parms=no])])
|
|
Packit Service |
c5cf8c |
if test "$pac_cv_has_ptrace_parms" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE([HAVE_PTRACE_CONT],[],[Define if ptrace parameters available])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl The test for getsid etc is in src/pm/util (see the subconfigure.m4 there)
|
|
Packit Service |
c5cf8c |
dnl AC_CHECK_FUNCS([setsid isatty getsid])
|
|
Packit Service |
c5cf8c |
if test "$enable_newsession" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE([USE_NEW_SESSION],[1],[Define if mpiexec should create a new process group session])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_PATH_PROG([SSH],[ssh])
|
|
Packit Service |
c5cf8c |
AC_PATH_PROG([RSH],[rsh])
|
|
Packit Service |
c5cf8c |
if test -z "$SSH" && test -n "$RSH" ; then
|
|
Packit Service |
c5cf8c |
remshell="$RSH"
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
remshell="$SSH"
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_DEFINE_UNQUOTED(DEFAULT_MACHINES_PATH,"$eval_datadir:.",[Define the search path for machines files])
|
|
Packit Service |
c5cf8c |
AC_DEFINE_UNQUOTED(DEFAULT_REMOTE_SHELL,"$remshell",[Define the default remote shell program to use])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
])dnl end AM_COND_IF(BUILD_PM_REMSHELL,...)
|
|
Packit Service |
c5cf8c |
])dnl end _BODY
|
|
Packit Service |
c5cf8c |
dnl
|
|
Packit Service |
c5cf8c |
[#] end of __file__
|