forked from vergoh/vnstat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
73 lines (60 loc) · 2.26 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([vnstat], [1.16_beta])
AM_INIT_AUTOMAKE([foreign subdir-objects std-options -Wall -Werror])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/vnstat.c])
AC_CONFIG_HEADERS([src/config.h])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
AC_ARG_ENABLE([image-output], [
AS_HELP_STRING([--disable-image-output], [disable PNG image output])])
# Checks for libraries.
AC_CHECK_LIB([m], [pow])
AS_IF([test "x$enable_image_output" != "xno"], [
AC_CHECK_LIB([gd], [gdImagePng], [IMAGELIBS=-lgd])
AC_SUBST([IMAGELIBS])])
AM_CONDITIONAL([HAVE_LIBGD], [test "$IMAGELIBS" = "-lgd"])
PKG_CHECK_MODULES([CHECK], [check >= 0.9.6], [], [AC_MSG_NOTICE([testcases can not be execute without check installed])])
AM_CONDITIONAL([HAVE_CHECK], [test "$CHECK_LIBS"])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h inttypes.h locale.h stdint.h stdlib.h string.h sys/file.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h syslog.h unistd.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UID_T
AC_TYPE_INT32_T
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_CHECK_FUNCS([dup2 localtime_r memset mkdir pow rmdir setlocale strcasecmp strchr strdup strerror strncasecmp strstr strtol strtoul strtoull tzset])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_MSG_NOTICE()
AC_MSG_NOTICE([ ============================================== ])
AC_MSG_NOTICE()
AC_MSG_NOTICE([ prefix: $prefix ])
AC_MSG_NOTICE([ sysconfdir: $sysconfdir ])
AC_MSG_NOTICE()
AC_MSG_NOTICE([ Install paths ])
AC_MSG_NOTICE()
AC_MSG_NOTICE([ vnstat: $prefix/bin/vnstat ])
AM_COND_IF([HAVE_LIBGD], [
AC_MSG_NOTICE([ vnstati: $prefix/bin/vnstati ])])
AC_MSG_NOTICE([ vnstatd: $prefix/sbin/vnstatd ])
AC_MSG_NOTICE([ config: $sysconfdir/vnstat.conf ])
AC_MSG_NOTICE()
AM_COND_IF([HAVE_LIBGD], [
AC_MSG_NOTICE([ Image output support: enabled ])], [
AC_MSG_NOTICE([ Image output support: disabled ])])
AC_MSG_NOTICE()
AC_MSG_NOTICE([ ============================================== ])
AC_MSG_NOTICE()