-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfigure.ac
151 lines (139 loc) · 5.52 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
AC_INIT([hpcperfstats], [2.3.5], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability])
AC_PROG_CC
AM_PROG_CC_C_O
AC_ARG_ENABLE([rabbitmq],
[ --enable-rabbitmq Build the rabbitmq version (default is true)],
[case "${enableval}" in
yes) AC_SEARCH_LIBS([amqp_new_connection], [rabbitmq], [have_rabbitmq=yes],
[AC_MSG_ERROR([Unable to find librabbitmq.so!])])
if test "x${have_rabbitmq}" = xyes; then
AC_CHECK_HEADERS([amqp.h], [rabbitmq=true],
[AC_MSG_ERROR([Unable to find amqp.h!])])
fi
;;
no) rabbitmq=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-rabbitmq]) ;;
esac],
[AC_SEARCH_LIBS([amqp_new_connection], [rabbitmq], [have_rabbitmq=yes],
[AC_MSG_ERROR([Unable to find librabbitmq.so!])])
if test "x${have_rabbitmq}" = xyes; then
AC_CHECK_HEADERS([amqp.h], [rabbitmq=true],
[AC_MSG_ERROR([Unable to find amqp.h!])])
fi
])
AM_CONDITIONAL([RABBITMQ], [test x$rabbitmq = xtrue])
AC_ARG_ENABLE([hardware],
[ --enable-hardware Enable processor hardware counter support (default is true)],
[case "${enableval}" in
yes) hardware=true ;;
no) hardware=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-hardware]) ;;
esac],
[hardware=true])
AM_CONDITIONAL([HARDWARE], [test x$hardware = xtrue])
AC_ARG_ENABLE([infiniband],
[ --enable-infiniband Enable Infiniband support (default is true)],
[case "${enableval}" in
yes) AC_SEARCH_LIBS([mad_rpc_open_port], [ibmad], [have_ib=yes],
[AC_MSG_ERROR([Unable to find libibmad.so!])])
if test "x${have_ib}" = xyes; then
AC_CHECK_HEADERS([infiniband/umad.h infiniband/mad.h], [infiniband=true],
[AC_MSG_ERROR([Unable to find umad.h or mad.h on this system!])])
fi
;;
no) infiniband=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-infiniband]) ;;
esac],
[AC_SEARCH_LIBS([mad_rpc_open_port], [ibmad], [have_ib=yes],
[AC_MSG_ERROR([Unable to find libibmad.so!])])
if test "x${have_ib}" = xyes; then
AC_CHECK_HEADERS([infiniband/umad.h infiniband/mad.h], [infiniband=true],
[AC_MSG_ERROR([Unable to find umad.h or mad.h on this system!])])
fi
])
AM_CONDITIONAL([INFINIBAND], [test x$infiniband = xtrue])
AC_ARG_ENABLE([lustre],
[ --enable-lustre Enable Lustre support (default is true)],
[case "${enableval}" in
yes) lustre=true ;;
no) lustre=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-lustre]) ;;
esac],
[lustre=true])
AM_CONDITIONAL([LUSTRE], [test x$lustre = xtrue])
AC_ARG_ENABLE([mic],
[ --enable-mic Enable Intel MIC (Xeon Phi) support (default is false)],
[case "${enableval}" in
yes) mic=true
AC_SEARCH_LIBS([mic_open_device], [micmgmt], [have_mic=yes],
[AC_MSG_ERROR([Unable to find libmicmgmt.so!])])
;;
no) mic=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-mic]) ;;
esac],
[mic=false])
AM_CONDITIONAL([MIC], [test x$mic = xtrue])
AC_ARG_ENABLE([gpu],
[ --enable-gpu Enable Nvidia GPU support (default is false)],
[case "${enableval}" in
yes) gpu=true
AC_SEARCH_LIBS([nvmlInit], [nvidia-ml], [have_gpu=yes],
[AC_MSG_ERROR([Unable to find libnvidia-ml.so!])])
if test "x${have_gpu}" = xyes; then
AC_CHECK_HEADERS([nvml.h], [gpu=true],
[AC_MSG_ERROR([Unable to find nvml.h on this system!])])
fi
;;
no) gpu=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gpu]) ;;
esac],
[gpu=false])
AM_CONDITIONAL([GPU], [test x$gpu = xtrue])
AC_ARG_ENABLE([opa],
[ --enable-opa Enable Intel Omnipath Fabric support (default is false)],
[case "${enableval}" in
yes) opa=true
AC_SEARCH_LIBS([iba_fstatus_msg], [public])
AC_SEARCH_LIBS([oib_pa_client_init], [oib_utils], [have_opa=yes],
[AC_MSG_ERROR([Unable to find liboib_utils.a!])], [ -libmad -libumad -libverbs -lpublic -lpthread ])
if test "x${have_opa}" = xyes; then
AC_CHECK_HEADERS([oib_utils.h], [opa=true],
[AC_MSG_ERROR([Unable to find oib_utils.h on this system!])])
fi
AC_SEARCH_LIBS([ibv_create_cq], [ibverbs])
AC_SEARCH_LIBS([umad_set_addr], [ibumad])
AC_SEARCH_LIBS([mad_rpc_open_port], [ibmad])
;;
no) opa=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-opa]) ;;
esac],
[opa=false])
AM_CONDITIONAL([OPA], [test x$opa = xtrue])
AC_ARG_ENABLE([debug],
[ --enable-debug Turn on debugging (default is false)],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
AC_SEARCH_LIBS([ev_run], [ev], [libev=yes], [AC_MSG_ERROR([Failed to find lib libev.so])])
AC_CHECK_HEADERS([ev.h], [ev=true], [AC_MSG_ERROR([Failed to find header ev.h])])
PKG_PROG_PKG_CONFIG
AC_ARG_WITH([systemduserunitdir],
[AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files])],,
[with_systemduserunitdir=auto])
AS_IF([test "x$with_systemduserunitdir" = "xyes" -o "x$with_systemduserunitdir" = "xauto"], [
def_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)
AS_IF([test "x$def_systemduserunitdir" = "x"],
[AS_IF([test "x$with_systemduserunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
with_systemduserunitdir=no],
[with_systemduserunitdir="$def_systemduserunitdir"])])
AS_IF([test "x$with_systemduserunitdir" != "xno"],
[AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemduserunitdir" != "xno"])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT