File: ompi_interix.m4

package info (click to toggle)
openmpi 1.6.5-9.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 91,628 kB
  • ctags: 44,305
  • sloc: ansic: 408,966; cpp: 44,454; sh: 27,828; makefile: 10,486; asm: 3,882; python: 1,239; lex: 805; perl: 549; csh: 253; fortran: 232; f90: 126; tcl: 12
file content (56 lines) | stat: -rw-r--r-- 1,855 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
dnl -*- shell-script -*-
dnl
dnl Copyright (c)      2008 The University of Tennessee and The University
dnl                         of Tennessee Research Foundation.  All rights
dnl                         reserved.
dnl $COPYRIGHT$
dnl 
dnl Additional copyrights may follow
dnl 
dnl $HEADER$
dnl

######################################################################
#
# OMPI_INTERIX
#
# Detect if the environment is SUA/SFU (i.e. Interix) and modify
# the compiling environment accordingly.
#
# USAGE:
#   OMPI_INTERIX()
#
######################################################################
AC_DEFUN([OMPI_INTERIX],[

    AC_MSG_CHECKING(for Interix environment)
    AC_TRY_COMPILE([],
                   [#if !defined(__INTERIX)
                    #error Normal Unix environment
                    #endif],
                   is_interix=yes,
                   is_interix=no)
    AC_MSG_RESULT([$is_interix])
    if test "$is_interix" = "yes"; then

        ompi_show_subtitle "Interix detection"

        if ! test -d /usr/include/port; then
            AC_MSG_WARN([Compiling Open MPI under Interix require an up-to-date])
            AC_MSG_WARN([version of libport. Please ask your system administrator])
            AC_MSG_WARN([to install it (pkg_update -L libport).])
            AC_MSG_ERROR([*** Cannot continue])
        fi
        #
        # These are the minimum requirements for Interix ...
        #
        AC_MSG_WARN([    -lport was added to the linking flags])
        LDFLAGS="-lport $LDFLAGS"
        AC_MSG_WARN([    -D_ALL_SOURCE -D_USE_LIBPORT was added to the compilation flags])
        CFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CFLAGS"
        CPPFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CPPFLAGS"
        CXXFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CXXFLAGS"

    fi

])