This repository has been archived by the owner on Aug 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
58 lines (46 loc) · 1.7 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([armourd], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
AC_ARG_WITH([dbus],
AS_HELP_STRING([--without-dbus], [dont use dbus (default is yes, when available)]))
AS_IF([test "x$with_dbus" != "xno"],
[PKG_CHECK_MODULES([DBUS], [dbus-1],
[have_dbus=yes], [have_dbus=no])
])
AS_IF([test "x$have_dbus" = "xyes"],
[AC_DEFINE([HAVE_DBUS], [], [build with dbus interfaces])],
[AS_IF([test "x$with_dbus" = "xyes"],
[AC_MSG_ERROR([Dbus interface requested but missing required package])
])
])
# watchdog timer stuff
AC_ARG_ENABLE([watchdog],
AS_HELP_STRING([--enable-watchdog], [tick a watchdog timer. Defaults to /dev/watchdog]))
AS_IF([test "x$enable_watchdog" = "xyes"],
[AC_DEFINE([HAVE_WATCHDOG], [], [kick the watchdog])
])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
# Checks for header files.
AC_CHECK_HEADERS([err.h sys/signalfd.h sys/epoll.h linux/netlink.h \
linux/connector.h linux/cn_proc.h linux/filter.h \
sys/timerfd.h sys/eventfd.h ])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_SSIZE_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([dup2 memset pathconf socket strdup strndup strtol])
AM_CONDITIONAL([DBUS], [test "x$with_dbus" != "xno" -a "x$have_dbus" = "xyes"])
AC_CONFIG_FILES([Makefile armourd.conf])
AC_OUTPUT