"Fossies" - the Fresh Open Source Software Archive 
Member "vnstat-2.9/configure.ac" (23 Jan 2022, 4277 Bytes) of package /linux/misc/vnstat-2.9.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "configure.ac":
2.8_vs_2.9.
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 AC_INIT([vnstat], [2.9])
4 AM_INIT_AUTOMAKE([foreign subdir-objects std-options -Wall -Werror])
5 AM_MAINTAINER_MODE
6
7 AC_CONFIG_SRCDIR([src/vnstatd.c])
8 AC_CONFIG_HEADERS([src/config.h])
9
10 # Checks for programs.
11 AC_PROG_CC
12 AM_PROG_CC_C_O
13 AC_PROG_MAKE_SET
14 AC_PROG_MKDIR_P
15
16 # Extra options
17 AC_ARG_ENABLE([image-output], [
18 AS_HELP_STRING([--disable-image-output], [disable PNG image output])])
19
20 CFLAG_EXTRAS=""
21 AC_ARG_ENABLE([werror], [
22 AS_HELP_STRING([--enable-werror], [add -Werror to CFLAGS])], [CFLAG_EXTRAS="-Werror"])
23 AC_SUBST([CFLAG_EXTRAS])
24
25 AC_ARG_ENABLE([extra-paths], [
26 AS_HELP_STRING([--disable-extra-paths], [do not add extra paths to CFLAGS and LDFLAGS])], [], [
27 CFLAGS="$CFLAGS -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib"])
28
29 # Checks for libraries.
30 AC_CHECK_LIB([m], [pow], [], [AC_MSG_ERROR([could not find required math library])])
31 AC_CHECK_LIB([sqlite3], [sqlite3_prepare_v2], [], [AC_MSG_ERROR([could not find required sqlite3 library])])
32
33 AS_IF([test "x$enable_image_output" != "xno"], [
34 AC_CHECK_LIB([gd], [gdImagePng], [IMAGELIBS=-lgd])
35 AC_CHECK_DECLS([GD_NEAREST_NEIGHBOUR, gdImageFile], [], [], [[#include <gd.h>]])
36 AC_SUBST([IMAGELIBS])])
37
38 AM_CONDITIONAL([HAVE_LIBGD], [test "$IMAGELIBS" = "-lgd"])
39 PKG_CHECK_MODULES([CHECK], [check >= 0.9.6], [], [AC_MSG_NOTICE([testcases can not be execute without check installed])])
40 AM_CONDITIONAL([HAVE_CHECK], [test "$CHECK_LIBS"])
41
42 # Checks for header files.
43 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 linux/rtnetlink.h])
44
45 # Check if being cross-compiled
46 AC_CANONICAL_BUILD
47 AC_CANONICAL_HOST
48 AM_CONDITIONAL([IS_CROSSCOMPILED], [test "$host" != "$build"])
49
50 # Check if 64-bit interface counters are used in Linux
51 AC_CHECK_DECLS([IFLA_STATS64], [], [], [[#include <linux/rtnetlink.h>]])
52
53 # Check if O_CLOEXEC can be used
54 AC_CHECK_DECLS([O_CLOEXEC], [], [], [[#include <fcntl.h>]])
55
56 # Check availability and level of SQLite WAL mode support
57 AC_CHECK_DECLS([SQLITE_CHECKPOINT_RESTART, SQLITE_CHECKPOINT_TRUNCATE], [], [], [[#include <sqlite3.h>]])
58
59 # Checks for typedefs, structures, and compiler characteristics.
60 AC_TYPE_UID_T
61 AC_TYPE_INT32_T
62 AC_TYPE_MODE_T
63 AC_TYPE_SIZE_T
64 AC_TYPE_UINT32_T
65 AC_TYPE_UINT64_T
66
67 # Checks for library functions.
68 AC_FUNC_CHOWN
69 AC_FUNC_FORK
70 AC_FUNC_MKTIME
71 AC_CHECK_FUNCS([dup2 localtime_r memset mkdir pow rmdir setlocale strcasecmp strchr strdup strerror strncasecmp strstr strtol strtoul strtoull tzset mbstowcs wcswidth])
72
73 AC_CONFIG_FILES([Makefile])
74 AC_OUTPUT
75
76 # Resolve install paths for output.
77 msg_bindir=$bindir
78 while expr match "${msg_bindir}" '^.*\$.*$' 1>/dev/null;
79 do
80 msg_bindir="$(eval echo ${msg_bindir})"
81 done
82
83 msg_sbindir=$sbindir
84 while expr match "${msg_sbindir}" '^.*\$.*$' 1>/dev/null;
85 do
86 msg_sbindir="$(eval echo ${msg_sbindir})"
87 done
88
89 msg_sysconfdir=$sysconfdir
90 while expr match "${msg_sysconfdir}" '^.*\$.*$' 1>/dev/null;
91 do
92 msg_sysconfdir="$(eval echo ${msg_sysconfdir})"
93 done
94
95 # Output configuration.
96 AC_MSG_NOTICE()
97 AC_MSG_NOTICE([ ============================================== ])
98 AC_MSG_NOTICE()
99 AC_MSG_NOTICE([ host: $host ])
100 AC_MSG_NOTICE([ build: $build ])
101 AC_MSG_NOTICE()
102 AC_MSG_NOTICE([ prefix: $prefix ])
103 AC_MSG_NOTICE([ exec_prefix: $exec_prefix ])
104 AC_MSG_NOTICE([ bindir: $bindir ])
105 AC_MSG_NOTICE([ sbindir: $sbindir ])
106 AC_MSG_NOTICE([ sysconfdir: $sysconfdir ])
107 AC_MSG_NOTICE()
108 AC_MSG_NOTICE([ Install paths ])
109 AC_MSG_NOTICE()
110 AC_MSG_NOTICE([ vnstat: $msg_bindir/vnstat ])
111
112 AM_COND_IF([HAVE_LIBGD], [
113 AC_MSG_NOTICE([ vnstati: $msg_bindir/vnstati ])])
114
115 AC_MSG_NOTICE([ vnstatd: $msg_sbindir/vnstatd ])
116 AC_MSG_NOTICE([ config: $msg_sysconfdir/vnstat.conf ])
117 AC_MSG_NOTICE()
118 AM_COND_IF([HAVE_CHECK], [
119 AC_MSG_NOTICE([ Tests: available ])], [
120 AC_MSG_NOTICE([ Tests: unavailable ])])
121 AM_COND_IF([HAVE_LIBGD], [
122 AC_MSG_NOTICE([ Image output: enabled ])], [
123 AC_MSG_NOTICE([ Image output: disabled ])])
124 AC_MSG_NOTICE()
125 AC_MSG_NOTICE([ ============================================== ])
126 AC_MSG_NOTICE()