forked from unioslo/tsdfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
67 lines (59 loc) · 1.74 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
AC_PREREQ([2.64])
AC_INIT([TSD File eXchange], [1.20150421], [[email protected]], [tsdfx], [http://www.uio.no/tjenester/it/forskning/sensitiv/])
AC_CONFIG_SRCDIR([bin/tsdfx/tsdfx.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER(include/config.h)
# compilers
AC_LANG(C)
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CPP
AC_GNU_SOURCE
AC_C_CONST
AC_C_RESTRICT
AC_C_VOLATILE
# libtool
LT_PREREQ([2.2.6])
LT_INIT()
# tools
AC_PROG_INSTALL
# headers
AC_CHECK_HEADERS([endian.h sys/endian.h sys/statvfs.h])
# functions
AC_CHECK_FUNCS([strlcat strlcpy])
AC_CHECK_FUNCS([closefrom fpurge])
AC_CHECK_FUNCS([statvfs])
AC_CHECK_FUNCS([getgroups setgroups initgroups])
# setproctitle
AC_CHECK_HEADERS([bsd/stdlib.h bsd/unistd.h])
AC_SEARCH_LIBS([setproctitle], [bsd])
AC_CHECK_FUNCS([setproctitle_init setproctitle])
# options
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [turn debugging macros on (default is NO)]),
AC_DEFINE(TSDFX_DEBUG, 1, [Turn debugging macros on]))
AC_ARG_ENABLE([developer-warnings],
AS_HELP_STRING([--enable-developer-warnings], [enable strict warnings (default is NO)]),
[CFLAGS="${CFLAGS} -Wall -Wextra"])
AC_ARG_ENABLE([debugging-symbols],
AS_HELP_STRING([--enable-debugging-symbols], [enable debugging symbols (default is NO)]),
[CFLAGS="${CFLAGS} -O0 -g -fno-inline"])
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [use -Werror (default is NO)]),
[CFLAGS="${CFLAGS} -Werror"])
# output
AC_CONFIG_FILES([
Makefile
include/Makefile
lib/Makefile
lib/libtsd/Makefile
bin/Makefile
bin/tsdfx/Makefile
libexec/Makefile
libexec/scanner/Makefile
libexec/copier/Makefile
t/Makefile
])
AC_CONFIG_FILES([t/test.sh], [chmod +x t/test.sh])
AC_OUTPUT