|
Packit Service |
c5cf8c |
[#] start of __file__
|
|
Packit Service |
c5cf8c |
dnl MPICH_SUBCFG_AFTER=src/pmi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_DEFUN([PAC_SUBCFG_PREREQ_]PAC_SUBCFG_AUTO_SUFFIX,[
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_DEFUN([PAC_SUBCFG_BODY_]PAC_SUBCFG_AUTO_SUFFIX,[
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_CONDITIONAL([BUILD_PMI_SIMPLE],[test "x$pmi_name" = "xsimple"])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_COND_IF([BUILD_PMI_SIMPLE],[
|
|
Packit Service |
c5cf8c |
if test "$enable_pmiport" != "no" ; then
|
|
Packit Service |
c5cf8c |
enable_pmiport=yes
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_CHECK_HEADERS(unistd.h string.h stdlib.h sys/socket.h strings.h assert.h arpa/inet.h)
|
|
Packit Service |
c5cf8c |
dnl Use snprintf if possible when creating messages
|
|
Packit Service |
c5cf8c |
AC_CHECK_FUNCS(snprintf)
|
|
Packit Service |
c5cf8c |
if test "$ac_cv_func_snprintf" = "yes" ; then
|
|
Packit Service |
c5cf8c |
PAC_FUNC_NEEDS_DECL([#include <stdio.h>],snprintf)
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_CHECK_FUNCS(strncasecmp)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# PM's that need support for a port can set the environment variable
|
|
Packit Service |
c5cf8c |
# NEED_PMIPORT in their setup_pm script.
|
|
Packit Service |
c5cf8c |
if test "$NEED_PMIPORT" = "yes" -a "$enable_pmiport" != "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([The process manager requires the pmiport capability. Do not specify --disable-pmiport.])
|
|
Packit Service |
c5cf8c |
enable_pmiport=yes
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
if test "$enable_pmiport" = "yes" ; then
|
|
Packit Service |
c5cf8c |
# Check for the necessary includes and functions
|
|
Packit Service |
c5cf8c |
missing_headers=no
|
|
Packit Service |
c5cf8c |
AC_CHECK_HEADERS([ \
|
|
Packit Service |
c5cf8c |
sys/types.h \
|
|
Packit Service |
c5cf8c |
sys/param.h \
|
|
Packit Service |
c5cf8c |
sys/socket.h \
|
|
Packit Service |
c5cf8c |
netinet/in.h \
|
|
Packit Service |
c5cf8c |
netinet/tcp.h \
|
|
Packit Service |
c5cf8c |
sys/un.h \
|
|
Packit Service |
c5cf8c |
netdb.h \
|
|
Packit Service |
c5cf8c |
],,missing_headers=yes )
|
|
Packit Service |
c5cf8c |
missing_functions=no
|
|
Packit Service |
c5cf8c |
AC_SEARCH_LIBS(socket,socket,,[missing_functions=yes])
|
|
Packit Service |
c5cf8c |
AC_SEARCH_LIBS(gethostbyname,nsl,,[missing_functions=yes])
|
|
Packit Service |
c5cf8c |
AC_SEARCH_LIBS(setsockopt,,,[missing_functions=yes])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if test "$missing_functions" = "no" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(USE_PMI_PORT,1,[Define if access to PMI information through a port rather than just an fd is allowed])
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
AC_MSG_ERROR([Cannot build simple PMI with support for an IP port because of missing functions])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Check for socklen_t . If undefined, define it as int
|
|
Packit Service |
c5cf8c |
# (note the conditional inclusion of sys/socket.h)
|
|
Packit Service |
c5cf8c |
AC_CACHE_CHECK([whether socklen_t is defined (in sys/socket.h if present)],
|
|
Packit Service |
c5cf8c |
pac_cv_have_socklen_t,[
|
|
Packit Service |
c5cf8c |
AC_TRY_COMPILE([
|
|
Packit Service |
c5cf8c |
#include <sys/types.h>
|
|
Packit Service |
c5cf8c |
#ifdef HAVE_SYS_SOCKET_H
|
|
Packit Service |
c5cf8c |
#include <sys/socket.h>
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
]
|
|
Packit Service |
c5cf8c |
typedef struct { double a; int b; } socklen_t;,[socklen_t a;a.a=1.0;],pac_cv_have_socklen_t=no,pac_cv_have_socklen_t=yes)])
|
|
Packit Service |
c5cf8c |
if test "$pac_cv_have_socklen_t" = no ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(socklen_t,int,[Define if socklen_t is not defined])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
# Check for h_addr or h_addr_list
|
|
Packit Service |
c5cf8c |
AC_CACHE_CHECK([whether struct hostent contains h_addr_list],
|
|
Packit Service |
c5cf8c |
pac_cv_have_haddr_list,[
|
|
Packit Service |
c5cf8c |
AC_TRY_COMPILE([
|
|
Packit Service |
c5cf8c |
#include <netdb.h>],[struct hostent hp;hp.h_addr_list[0]=0;],
|
|
Packit Service |
c5cf8c |
pac_cv_have_haddr_list=yes,pac_cv_have_haddr_list=no)])
|
|
Packit Service |
c5cf8c |
if test "$pac_cv_have_haddr_list" = "yes" ; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE(HAVE_H_ADDR_LIST,1,[Define if struct hostent contains h_addr_list])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
PAC_C_GNU_ATTRIBUTE
|
|
Packit Service |
c5cf8c |
])dnl end COND_IF
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
])dnl end BODY macro
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
[#] end of __file__
|