-
Notifications
You must be signed in to change notification settings - Fork 9
/
configure.ac
executable file
·94 lines (76 loc) · 2.35 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.60)
AC_INIT(httperf, 0.9.1, [email protected])
AC_CONFIG_SRCDIR([src/httperf.c])
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(httperf, 0.9.1)
# Checks for programs.
AC_GNU_SOURCE
AC_PROG_CC([cc gcc])
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LIBTOOL
# Are we building the idleconn program?
AC_ARG_ENABLE([idleconn],
AS_HELP_STRING([--enable-idleconn],
[Build the idleconn program (default=no), requires libevent]),
[enable_idleconn=$enableval],
[enable_idleconn=no])
if test "$enable_idleconn" = "yes"; then
AC_CHECK_LIB([event],
[event_init],
,
[AC_MSG_ERROR([libevent is required to build idleconn])])
fi
AM_CONDITIONAL(IDLECONN,
[test "x$enable_idleconn" = xyes])
# Checks for libraries.
AC_CHECK_LIB(m, sqrt)
AC_CHECK_LIB(crypto, main)
AC_CHECK_LIB(ssl, SSL_version, , AC_MSG_WARN([SSL Disabled]) )
# The following checks are for solaris and its ilk
AC_SEARCH_LIBS([getsockopt], [socket])
AC_SEARCH_LIBS([socket], [socket nsl])
AC_SEARCH_LIBS([gethostbyname], [socket nsl])
AC_SEARCH_LIBS([inet_aton], [resolv])
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_TIME
AC_CHECK_HEADERS([openssl/ssl.h getopt.h])
if test "$ac_cv_header_openssl_ssl_h" = "yes" \
-a "$ac_cv_lib_ssl_SSL_version" = "yes" \
-a "$ac_cv_lib_crypto_main" = "yes"; then
CFLAGS="${CFLAGS} -DHAVE_SSL"
LDFLAGS="${LDFLAGS}"
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_TYPE(u_char, unsigned char)
AC_CHECK_TYPE(u_short, unsigned short)
AC_CHECK_TYPE(u_int, unsigned int)
AC_CHECK_TYPE(u_long, unsigned long)
# Check for unsigned long long int (stat/basic.c)
AC_TYPE_UNSIGNED_LONG_LONG_INT
if test "$ac_cv_type_unsigned_long_long_int" != "yes" ; then
AC_CHECK_TYPE(u_wide, unsigned long)
else
AC_CHECK_TYPE(u_wide, unsigned long long)
fi
# Checks for library functions.
AC_FUNC_MMAP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([getopt_long])
# Turn on Debug if necessary
AC_ARG_ENABLE(debug,
[ --enable-debug enable debug support])
if test "$enable_debug" = yes; then
CFLAGS="${CFLAGS} -DDEBUG"
fi
AC_OUTPUT(Makefile man/Makefile src/stat/Makefile src/lib/Makefile src/gen/Makefile src/Makefile)