summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKarel Zak2014-11-21 11:38:11 +0100
committerKarel Zak2014-11-21 11:38:11 +0100
commit90d5285d8c21897d3fc0caed4691c88f15d0131b (patch)
tree9640b41b414009e4d4b1cdf842536d74ef219158 /configure.ac
parentlibfdisk: add ref.counting to ask API (diff)
downloadkernel-qcow2-util-linux-90d5285d8c21897d3fc0caed4691c88f15d0131b.tar.gz
kernel-qcow2-util-linux-90d5285d8c21897d3fc0caed4691c88f15d0131b.tar.xz
kernel-qcow2-util-linux-90d5285d8c21897d3fc0caed4691c88f15d0131b.zip
agetty: use futimens, check for all in configure.ac
It seems better to warn about --reload in ./configure if futimens or inotify_init1 are missing. The patch also replaces futimes() with futimens() to make the code compatible with Uclibc. Addresses: https://github.com/karelzak/util-linux/issues/133 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5ec307236..6c504b8e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -313,7 +313,6 @@ AC_CHECK_FUNCS([ \
getrlimit \
getsgnam \
inotify_init \
- inotify_init1 \
jrand48 \
lchown \
llseek \
@@ -346,6 +345,8 @@ AC_FUNC_FSEEKO
AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
+AC_CHECK_FUNCS([futimens], [have_futimens=yes])
+AC_CHECK_FUNCS([inotify_init1], [have_inotify_init1=yes])
dnl Old glibc requires -lrt
AC_CHECK_FUNCS(clock_gettime, [], [
@@ -1052,6 +1053,11 @@ AC_ARG_ENABLE([agetty],
)
UL_BUILD_INIT([agetty])
AM_CONDITIONAL([BUILD_AGETTY], [test "x$build_agetty" = xyes])
+AS_IF([test "x$have_futimens" = xyes -a "x$have_inotify_init1" = xyes ], [
+ AC_DEFINE([AGETTY_RELOAD], [1], [Enable agetty --reload feature])
+],[
+ AC_MSG_WARN([futimens or inotify_init1 not found; agetty(8) will not provide ---reload functionality])
+])
AC_ARG_ENABLE([cramfs],