forked from openshmem-org/osss-gasnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
192 lines (162 loc) · 5.12 KB
/
configure.ac
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# For license: see LICENSE file at top-level
AC_PREREQ([2.69])
AC_INIT([OSSS/SBU Reference Implementation],
[1.0],
[anthony.curtis@stonybrook.edu],
[],
[https://bitbucket.org/sbuopenshmem/osss-openshmem])
AC_SUBST([SHMEM_MAJOR_VERSION], 1)
AC_SUBST([SHMEM_MINOR_VERSION], 4)
AC_SUBST([SHMEM_MAX_NAME_LEN], 64)
AC_SUBST([SHMEM_VENDOR_STRING], ['AC_PACKAGE_NAME'])
config_flags="$*"
AC_DEFINE_UNQUOTED([CONFIG_FLAGS],["$config_flags"],[Flags passed to configure])
AC_CONFIG_SRCDIR([autogen.sh])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
dnl AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])
# C/C++
AC_PROG_CC_C99
AC_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CXX_C_O
AC_PROG_CXXCPP
AC_PROG_INSTALL
# Fortran-specific checks
AC_PROG_FC
AC_PROG_FC_C_O
AC_FC_LIBRARY_LDFLAGS
AC_FC_MAIN
AC_FC_DUMMY_MAIN
AC_FC_WRAPPERS
# Checks for libraries.
# for building shared libraries
LT_INIT
m4_include([config/m4/pmix.m4])
m4_include([config/m4/ucx.m4])
# Feature checks
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [Enable library debug @<:@default=no@:>@]),
AS_IF([test "x$enableval" = "xyes"],
AC_DEFINE([ENABLE_DEBUG], [1], [Enable debug])
),
[])
AC_ARG_ENABLE([experimental],
AS_HELP_STRING([--enable-experimental],
[Enable non-standard extensions @<:@default=no@:>@]))
AS_IF([test "x$enable_experimental" = "xyes"],
[AC_DEFINE([ENABLE_EXPERIMENTAL], [1], [Enable non-standard extensions])
AC_SUBST([ENABLE_EXPERIMENTAL], [1])],
[AC_SUBST([ENABLE_EXPERIMENTAL], [0])]
)
AM_CONDITIONAL([ENABLE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
AC_ARG_ENABLE([pshmem],
AS_HELP_STRING([--enable-pshmem],
[Enable Profiling interface @<:@default=no@:>@]))
AS_IF([test "x$enable_pshmem" = "xyes"],
[AC_DEFINE([ENABLE_PSHMEM], [1], [Enable profiling interface])
AC_SUBST([ENABLE_PSHMEM], [1])],
[AC_SUBST([ENABLE_PSHMEM], [0])]
)
AM_CONDITIONAL([ENABLE_PSHMEM], [test "x$enable_pshmem" = "xyes"])
#
# disabled by default
#
AC_ARG_ENABLE([fortran],
AS_HELP_STRING([--enable-fortran],
[Enable Fortran API support @<:@default=no@:>@]))
AS_IF([test "x$enable_fortran" = "xyes"],
[AC_DEFINE([ENABLE_FORTRAN], [1], [Enable Fortran API])
AC_SUBST([ENABLE_FORTRAN], [1])],
[AC_SUBST([ENABLE_FORTRAN], [0])]
)
AM_CONDITIONAL([ENABLE_FORTRAN], [test "x$enable_fortran" = "xyes"])
#
# address translation
#
AC_ARG_ENABLE([fixed-addresses],
AS_HELP_STRING([--enable-fixed-addresses],
[Symmetric addresses are identical everywhere @<:@default=no@:>@]))
AS_IF([test "x$enable_fixed_addresses" = "xyes"],
[AC_DEFINE([ENABLE_FIXED_ADDRESSES], [1], [Enable fixed symmetric addressesI])
AC_SUBST([ENABLE_FIXED_ADDRESSES], [1])],
[AC_SUBST([ENABLE_FIXED_ADDRESSES], [0])]
)
AM_CONDITIONAL([ENABLE_FIXED_ADDRESSES], [test "x$enable_fixed_addresses" = "xyes"])
#
# enabled by default
#
AC_ARG_ENABLE([cxx],
AS_HELP_STRING([--disable-cxx],
[Support C++ compiler? @<:@default=yes@:>@]))
AS_IF([test "x$enable_cxx" != "xno"],
[AC_DEFINE([ENABLE_CXX], [1], [Enable C++ compiler])
AC_SUBST([ENABLE_CXX], [1])],
[AC_SUBST([ENABLE_CXX], [0])]
)
AM_CONDITIONAL([ENABLE_CXX], [test "x$enable_cxx" != "xno"])
# static and shared library detection
AS_IF([test "x$enable_static" = "xyes"],
[AC_DEFINE([ENABLE_STATIC], [1], [Enable static libraries])]
)
AS_IF([test "x$enable_shared" = "xyes"],
[AC_DEFINE([ENABLE_SHARED], [1], [Enable shared libraries])]
)
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h unistd.h string.h time.h sys/time.h sys/utsname.h sys/types.h fcntl.h stddef.h sys/param.h assert.h stdarg.h stdbool.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
# AC_FUNC_MALLOC
# AC_FUNC_REALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([atexit gettimeofday gethostname uname getpagesize memset])
AM_INIT_AUTOMAKE
now="`date`"
AC_DEFINE_UNQUOTED([CONFIG_BUILD_DATE],["$now"],[When this package was compiled])
host="`hostname`"
AC_DEFINE_UNQUOTED([CONFIG_BUILD_HOST],["$host"],[Where this package was compiled])
#
# check for pthreads and how to set it up
#
m4_include([config/m4/ax_pthread.m4])
AX_PTHREAD
AC_SUBST([PTHREAD_CC])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_LIBS])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([man/Makefile
man/oshcc.1 man/oshcxx.1 man/oshfort.1
man/oshrun.1 man/osh_info.1 man/osh_intro.1
])
AC_CONFIG_FILES([include/Makefile
include/shmem/defs.h
include/shmem/depr.h
include/shmem/api.h
include/shmem.h
include/pshmem.h include/pshmemx.h
include/shmemx.h include/null-shmemx.h
include/shmem/defs.fh
include/shmem.fh include/pshmem.fh
include/shmemx.fh include/pshmemx.fh
])
AC_CONFIG_FILES([pkgconfig/Makefile
pkgconfig/osss-ucx.pc
])
AC_CONFIG_FILES([src/Makefile
src/version.h
])
AC_CONFIG_FILES([src/shmemc/Makefile
src/shmemc/oshcc src/shmemc/oshcxx src/shmemc/oshfort
src/shmemc/oshrun
])
AC_CONFIG_FILES([src/shmemu/Makefile
])
AC_OUTPUT