-
Notifications
You must be signed in to change notification settings - Fork 17
/
configure.ac
61 lines (51 loc) · 1.5 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
AC_PREREQ([2.69])
AC_INIT([nanochat], [0.1], [[email protected]])
AM_INIT_AUTOMAKE([foreign])
NANOMSG_VERSION=0.8-beta
AC_SUBST([NANOMSG_VERSION])
VEDIS_VERSION=1.2.6
AC_SUBST([VEDIS_VERSION])
SODIUM_VERSION=1.0.9
AC_SUBST([SODIUM_VERSION])
PARSON_VERSION=1.0.0
AC_SUBST([PARSON_VERSION])
BASE64_VERSION=1.0.0
AC_SUBST([BASE64_VERSION])
AC_PROG_CC
AC_LANG([C])
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h getopt.h string.h time.h \
sys/select.h stdarg.h pthread.h pwd.h sys/socket.h \
arpa/inet.h ifaddrs.h])
AC_TYPE_SIZE_T
AC_CONFIG_FILES([lib/nanomsg/Makefile \
lib/vedis/Makefile \
lib/sodium/Makefile \
lib/parson/Makefile \
lib/base64/Makefile \
src/Makefile \
Makefile])
AC_CANONICAL_HOST
case "${host_os}" in
*linux*)
# Define on Linux to enable all library features
NC_OS_SPECIFIC_LDADD="-l:libnanomsg.a -l:libvedis.a -l:libsodium.a -l:libparson.a -l:libbase64.a"
NC_EXTRA_LDADD=-lanl
;;
*freebsd*)
# Define on FreeBSD to enable all library features
NC_OS_SPECIFIC_LDADD="-lnanomsg -lvedis -lsodium -lparson -lbase64"
NC_EXTRA_LDADD=
;;
*darwin*)
# Define on Darwin to enable all library features
NC_OS_SPECIFIC_LDADD="-lnanomsg -lvedis -lsodium -lparson -lbase64"
NC_EXTRA_LDADD=
;;
*)
AC_MSG_ERROR([unsupported system: ${host_os}.])
;;
esac
AC_SUBST([NC_OS_SPECIFIC_LDADD])
AC_SUBST([NC_EXTRA_LDADD])
AC_OUTPUT