-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
92 lines (72 loc) · 2.14 KB
/
configure.ac
File metadata and controls
92 lines (72 loc) · 2.14 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This file is part of fsio, see <https://qu1x.org/fsio>.
#
# Copyright (c) 2016, 2018 Rouven Spreckels <n3vu0r@qu1x.org>
#
# fsio is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software Foundation on 19 November 2007.
#
# fsio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with fsio. If not, see <https://www.gnu.org/licenses>.
AC_INIT([fsio], [1.0.1],
[n3vu0r@qu1x.org], [fsio], [https://qu1x.org/fsio])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/bin/fsio.cxx])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
LT_INIT([disable-static])
AC_PROG_CXX
AC_LANG([C++])
CXX="$CXX -std=c++14"
AC_CHECK_HEADERS([\
sys/mman.h \
sys/types.h \
sys/stat.h \
fcntl.h \
unistd.h \
time.h \
getopt.h \
signal.h \
termios.h \
sys/ioctl.h], [], [AC_MSG_ERROR([header not found])])
AC_CHECK_FUNCS([\
mmap \
munmap \
open \
close \
getopt_long \
clock_gettime \
exit \
ioctl \
sigemptyset \
sigaction \
tcgetattr \
tcsetattr \
creat \
write \
fstat \
read], [], [AC_MSG_ERROR([function not found])])
AC_CHECK_HEADER([pugixml.hpp], [], [AC_MSG_ERROR([libpugixml not found])])
AC_ARG_ENABLE([stat], AS_HELP_STRING([--enable-stat],
[increase statistics sacrifizing performance]), [], [enable_stat=no])
AM_CONDITIONAL([FSIO_STAT], [test x$enable_stat = xyes])
AM_COND_IF([FSIO_STAT], [AC_DEFINE([FSIO_STAT], [1], [--enable-stat])])
AC_ARG_ENABLE([wait], AS_HELP_STRING([--enable-wait],
[decrease CPU usage sacrifizing performance]), [], [enable_wait=no])
AM_CONDITIONAL([FSIO_WAIT], [test x$enable_wait = xyes])
AM_COND_IF([FSIO_WAIT], [AC_DEFINE([FSIO_WAIT], [1], [--enable-wait])])
AM_COND_IF([FSIO_WAIT],
[AC_CHECK_FUNCS(nanosleep, [], [AC_MSG_ERROR([function not found])])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
printf "
$PACKAGE_STRING
stat: $enable_stat
wait: $enable_wait
"