-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
52 lines (39 loc) · 1.27 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
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
AC_INIT([cubby], m4_include([version.m4]), [kr@xph.us])
AC_CONFIG_SRCDIR([cubbyd.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([autostuff])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Let's not use AM_MAINTAINER_MODE.
AS_COMPILER_FLAGS(CUBBY_CFLAGS, "-Wall -Werror")
AC_SUBST(CUBBY_CFLAGS)
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99
if test x"$ac_cv_prog_cc_c99" = xno
then
AC_MSG_ERROR([Cubby requires a C99-capable compiler])
fi
# Checks for libraries.
CUBBY_ENABLE_GCOV
AC_ARG_WITH(event,
[AS_HELP_STRING([--with-event],
[install prefix for libevent @<:@default is yes@:>@])],
[],
[with_event=yes])
test "x$with_event" = xno && AC_MSG_ERROR([Cubby requires libevent.])
CUBBY_HUNT_AROUND([event], [event_assign], [event2/event.h],
[],
[AC_MSG_ERROR([Cubby requires libevent 2.0 or later.])])
# Checks for header files.
#AC_CHECK_HEADERS([])
# Checks for typedefs, structures, and compiler characteristics.
#AC_TYPE_SSIZE_T
AC_TYPE_UINT64_T
# Checks for library functions.
AC_CHECK_FUNC([socket], [], [AC_MSG_ERROR([Cubby requires socket])])
AC_CHECK_FUNC([strerror], [], [AC_MSG_ERROR([Cubby requires strerror])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT