-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.ac
More file actions
84 lines (68 loc) · 2.7 KB
/
configure.ac
File metadata and controls
84 lines (68 loc) · 2.7 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
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
AC_PREREQ([2.69])
AC_INIT([ctrack], [1.0], [cunha@dcc.ufmg.br])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_CHECK_LIB([pthread], [pthread_create], [],
[AC_MSG_ERROR([libpthread not found or missing pthread_create (required)])])
AC_CHECK_LIB([pthread], [pthread_mutex_init], [],
[AC_MSG_ERROR([libpthread not found or missing pthread_mutex_init (required)])])
AC_CHECK_LIB([pcap], [pcap_loop], [],
[AC_MSG_ERROR([libpcap not found or missing pcap_loop (required)])])
AC_CHECK_LIB([rt], [clock_gettime], [],
[AC_MSG_ERROR([librt not found or missing clock_gettime (required)])])
AC_CHECK_LIB([net], [libnet_init], [],
[AC_MSG_ERROR([libnet not found or missing libnet_init (required)])])
AC_CHECK_LIB([m], [exp], [],
[AC_MSG_ERROR([libm not found or missing exp (required)])])
AC_CHECK_LIB([nlopt], [nlopt_create], [],
[AC_MSG_ERROR([libnlopt not found or missing nlopt_create (required)])], [-lm])
AC_ARG_ENABLE([libcurl],
AS_HELP_STRING([--enable-libcurl], [enable libcurl pushing of path changes]),
[case "${enableval}" in
yes)
AC_CHECK_LIB([curl], [curl_easy_perform], [],
[AC_MSG_ERROR([--enable-libcurl requested, but libcurl not found])])
libcurl=true
;;
no)
libcurl=false
;;
*)
AC_MSG_ERROR([bad value ${enableval} for --enable-libcurl])
;;
esac],
[libcurl=false])
AC_SUBST([libcurl])
AC_CHECK_HEADERS([stdlib.h stddef.h stdio.h string.h unistd.h], [],
[AC_MSG_ERROR([required standard headers not found])])
AC_CHECK_HEADERS([math.h time.h pthread.h limits.h fcntl.h], [],
[AC_MSG_ERROR([required headers not found (math/time/pthread/limits/fcntl)])])
AC_CHECK_HEADERS([assert.h inttypes.h], [],
[AC_MSG_ERROR([required headers not found (assert.h/inttypes.h)])])
AC_CHECK_HEADERS([arpa/inet.h], [],
[AC_MSG_ERROR([required header not found: arpa/inet.h])])
AC_CHECK_HEADERS([sys/resource.h], [],
[AC_MSG_ERROR([required header not found: sys/resource.h])])
AC_CHECK_HEADERS([libnet.h], [],
[AC_MSG_ERROR([required header not found: libnet.h])])
AC_CHECK_HEADERS([nlopt.h], [],
[AC_MSG_ERROR([required header not found: nlopt.h])])
AC_CHECK_FUNCS([strchr strdup strerror], [],
[AC_MSG_ERROR([required libc functions not found (strchr/strdup/strerror)])])
AC_CHECK_FUNCS([clock_gettime gmtime_r], [],
[AC_MSG_ERROR([required time functions not found (clock_gettime/gmtime_r)])])
AC_CHECK_FUNCS([memset], [],
[AC_MSG_ERROR([required libc function not found: memset])])
AC_FUNC_MALLOC
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
AC_OUTPUT