forked from logrotate/logrotate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
51 lines (40 loc) · 1.43 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
AC_INIT([logrotate],[3.10.0])
dnl Do not require AUTHORS, ChangeLog, NEWS, and README to exist
AM_INIT_AUTOMAKE([foreign])
AC_DEFINE(_GNU_SOURCE)
AM_EXTRA_RECURSIVE_TARGETS([test])
AC_PROG_CC
AC_PROG_CC_STDC
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
dnl Use 64-bit file offsets on 32-bit systems (defines C macros if necessary)
AC_SYS_LARGEFILE
AC_CHECK_LIB([popt],[poptParseArgvString],,
AC_MSG_ERROR([libpopt required but not found]))
dnl Needed for out-of-source builds
mkdir -p test
AC_ARG_WITH([selinux],
[AS_HELP_STRING([--with-selinux],
[support handling SELinux contexts (yes,no,check) @<:@default=check@:>@])],
[],
[with_selinux=check])
AS_CASE(["$with_selinux"],
[yes], [AC_CHECK_LIB([selinux],[getfscreatecon_raw])],
[no], [],
[AC_CHECK_LIB([selinux],[getfscreatecon_raw])])
AS_IF([test "$ac_cv_lib_selinux_getfscreatecon_raw" = yes],
echo "1" > ./test/test.SELINUX;, echo "0" > ./test/test.SELINUX;)
AC_ARG_WITH([acl],
[AS_HELP_STRING([--with-acl],
[support handling ACL (yes,no,check) @<:@default=check@:>@])],
[],
[with_acl=check])
AS_CASE(["$with_acl"],
[yes], [AC_CHECK_LIB([acl],[acl_get_file])],
[no], [],
[AC_CHECK_LIB([acl],[acl_get_file])])
AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes],
echo "1" > ./test/test.ACL;, echo "0" > ./test/test.ACL;)
AC_CHECK_FUNCS([asprintf fork madvise qsort strndup strptime vfork vsyslog])
AC_CONFIG_FILES([Makefile test/Makefile logrotate.spec])
AC_OUTPUT