-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfigure.ac
More file actions
53 lines (39 loc) · 1.41 KB
/
configure.ac
File metadata and controls
53 lines (39 loc) · 1.41 KB
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
AC_INIT([sisci-nccl], [0.1], [pci-support@dolphinics.com])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AM_PROG_AR
AC_PROG_CC
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_ARG_WITH([dis],
AC_HELP_STRING([--with-dis=PATH], [Path to DIS installation]),
[DIS_HOME="$withval"],
[DIS_HOME="/opt/DIS"])
AS_IF([test -d $DIS_HOME/lib64], [dis_libdir="lib64"], [dis_libdir="lib"])
CFLAGS="-I$DIS_HOME/include -I$DIS_HOME/include/dis $CFLAGS"
LDFLAGS="-L$DIS_HOME/$dis_libdir $LDFLAGS"
AC_ARG_WITH([cuda],
AC_HELP_STRING([--with-dis=PATH], [Path to CUDA installation]),
[CUDA_HOME="$withval"],
[CUDA_HOME="/usr/local/cuda"])
AS_IF([test -d $CUDA_HOME/lib64], [cuda_libdir="lib64"], [cuda_libdir="lib"])
CFLAGS="-I$CUDA_HOME/include $CFLAGS"
LDFLAGS="-L$CUDA_HOME/$cuda_libdir $LDFLAGS"
AC_CHECK_HEADERS([limits.h stdlib.h string.h unistd.h sisci_api.h cuda_runtime_api.h nccl.h], [],[
AC_MSG_ERROR([unable to find required headers])
])
AC_SEARCH_LIBS([_SISCI_PUBLIC_FUNC_ST_SCIInitialize], [sisci], [], [
AC_MSG_ERROR([unable to find libsisci])
])
AC_SEARCH_LIBS([cudaSetDevice], [cudart], [], [
AC_MSG_ERROR([unable to find libcudart])
])
AC_SEARCH_LIBS([ncclCommInitRank], [nccl], [], [
AC_MSG_ERROR([unable to find libnccl])
])
LT_INIT([shared disable-static])
CFLAGS="-std=gnu11 -Wall -Wextra $CFLAGS"
AC_PROG_LIBTOOL
AC_OUTPUT