]> git.ipfire.org Git - thirdparty/util-linux.git/blame - configure.ac
findmnt: add --verify and --verbose
[thirdparty/util-linux.git] / configure.ac
CommitLineData
034d378b 1AC_INIT([util-linux],
38c75b59 2 m4_esyscmd([tools/git-version-gen .tarball-version]),
5564a8c7
SK
3 [kzak@redhat.com],,
4 [http://www.kernel.org/pub/linux/utils/util-linux/])
baf39af1 5
b0e6b25e 6
034d378b 7AC_PREREQ([2.60])
48d7b13a 8
034d378b 9AC_CONFIG_AUX_DIR([config])
b12991dd 10AC_CONFIG_MACRO_DIR([m4])
eaf70198
SK
11dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
12dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
13AC_USE_SYSTEM_EXTENSIONS
333034f6 14AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
48d7b13a 15
eb35c251 16m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
f06b4328 17 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
eb35c251 18
034d378b 19AC_CONFIG_SRCDIR([sys-utils/mount.c])
15a9b48c
SK
20AC_PREFIX_DEFAULT([/usr])
21
33b0be6d
KZ
22dnl version details from <major>.<minor>[-<suffix>]
23PACKAGE_VERSION_MAJOR=$(echo $PACKAGE_VERSION | awk -F. '{print $1}')
24PACKAGE_VERSION_MINOR=$(echo $PACKAGE_VERSION | awk -F. '{print $2}' \
f06b4328 25 | awk -F- '{print $1}')
b0e6b25e
KZ
26
27PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{print $3}' \
28 | sed 's/.*@<:@^@<:@:digit:@:>@@:>@.*/0/')
29
a0948ffe 30
33b0be6d
KZ
31dnl libblkid version
32LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
44338f7f 33LIBBLKID_DATE="12-Apr-2016"
dc2b8d87
KZ
34LIBBLKID_LT_MAJOR=1
35LIBBLKID_LT_MINOR=1
36LIBBLKID_LT_MICRO=0
37LIBBLKID_VERSION_INFO=`expr $LIBBLKID_LT_MAJOR + $LIBBLKID_LT_MINOR`:$LIBBLKID_LT_MICRO:$LIBBLKID_LT_MINOR
a0948ffe 38
f6076f55
KZ
39dnl libuuid version
40LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
dc2b8d87
KZ
41LIBUUID_LT_MAJOR=1
42LIBUUID_LT_MINOR=3
43LIBUUID_LT_MICRO=0
44LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
f6076f55 45
f1cde479
KZ
46dnl libmount version
47LIBMOUNT_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
48LIBMOUNT_LT_MAJOR=1
49LIBMOUNT_LT_MINOR=1
50LIBMOUNT_LT_MICRO=0
51LIBMOUNT_VERSION_INFO=`expr $LIBMOUNT_LT_MAJOR + $LIBMOUNT_LT_MINOR`:$LIBMOUNT_LT_MICRO:$LIBMOUNT_LT_MINOR
52
1a4d989e
OO
53dnl libsmartcols version
54LIBSMARTCOLS_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
55LIBSMARTCOLS_LT_MAJOR=1
56LIBSMARTCOLS_LT_MINOR=1
57LIBSMARTCOLS_LT_MICRO=0
58LIBSMARTCOLS_VERSION_INFO=`expr $LIBSMARTCOLS_LT_MAJOR + $LIBSMARTCOLS_LT_MINOR`:$LIBSMARTCOLS_LT_MICRO:$LIBSMARTCOLS_LT_MINOR
59
0bb4c979
KZ
60dnl libfdisk version
61LIBFDISK_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
62LIBFDISK_LT_MAJOR=1
63LIBFDISK_LT_MINOR=1
64LIBFDISK_LT_MICRO=0
65LIBFDISK_VERSION_INFO=`expr $LIBFDISK_LT_MAJOR + $LIBFDISK_LT_MINOR`:$LIBFDISK_LT_MICRO:$LIBFDISK_LT_MINOR
66
15a9b48c 67# Check whether exec_prefix=/usr:
9f57e6e8
SK
68AS_CASE([$exec_prefix:$prefix],
69[NONE:NONE | NONE:/usr | /usr:*],
70 [AC_MSG_NOTICE([Default --exec-prefix detected.])
17794746
KZ
71 AS_CASE([$bindir], ['${exec_prefix}/bin'], [bindir=/bin; AC_MSG_NOTICE([ --bindir defaults to /bin]) ])
72 AS_CASE([$sbindir], ['${exec_prefix}/sbin'], [sbindir=/sbin; AC_MSG_NOTICE([ --sbindir defaults to /sbin])])
73 AS_CASE([$libdir], ['${exec_prefix}/lib'], [libdir=/lib; AC_MSG_NOTICE([ --libdir defaults to /lib]) ])
9f57e6e8
SK
74 ]
75)
76
77AS_CASE([$prefix:$localstatedir],
3745d4a9 78 [NONE:'${prefix}/var' | /usr:'${prefix}/var'],
9f57e6e8
SK
79 [localstatedir=/run
80 AC_MSG_NOTICE([ --localstatedir defaults to /run])
81 ]
82)
11935cd3 83AC_SUBST([localstatedir])
07a16b9d 84
b0a0d7d5 85
996fb358 86# The original default values of {bin,sbin,lib}dir
aaf3e8f5 87usrbin_execdir='${exec_prefix}/bin'
30688dde 88AC_SUBST([usrbin_execdir])
996fb358 89
aaf3e8f5 90usrsbin_execdir='${exec_prefix}/sbin'
30688dde 91AC_SUBST([usrsbin_execdir])
996fb358 92
9f57e6e8 93AS_CASE([$libdir],
b2b61efc 94 ['${exec_prefix}/'* | '${prefix}/'* | /usr/* | "${prefix}"/* ],
9f57e6e8
SK
95 [usrlib_execdir=$libdir],
96 [usrlib_execdir='${exec_prefix}'$libdir]
97)
30688dde 98AC_SUBST([usrlib_execdir])
996fb358 99
bdf5f542 100
31c9c1c4 101AM_PROG_CC_C_O
18336d16 102AC_PROG_MKDIR_P
48d7b13a 103AC_PROG_CC_STDC
a6996860 104AC_CANONICAL_HOST
85b4c147 105AC_C_CONST
e79829db 106AC_C_VOLATILE
fbaec83b 107AC_C_BIGENDIAN
b12991dd 108
0e60bc9b 109dnl Compiler warnings
b1b54edf 110UL_WARN_ADD([-fno-common])
9dc72d0b 111UL_WARN_ADD([-Wall])
b1b54edf 112UL_WARN_ADD([-Werror=sequence-point])
0e60bc9b 113UL_WARN_ADD([-Wextra])
4230d576
KZ
114UL_WARN_ADD([-Wextra-semi])
115UL_WARN_ADD([-Wembedded-directive])
b1b54edf
KZ
116UL_WARN_ADD([-Wmissing-declarations])
117UL_WARN_ADD([-Wmissing-parameter-type])
118UL_WARN_ADD([-Wmissing-prototypes])
0e60bc9b 119UL_WARN_ADD([-Wno-missing-field-initializers])
b1b54edf 120UL_WARN_ADD([-Wredundant-decls])
0e60bc9b
KZ
121UL_WARN_ADD([-Wsign-compare])
122UL_WARN_ADD([-Wtype-limits])
123UL_WARN_ADD([-Wuninitialized])
b1b54edf
KZ
124UL_WARN_ADD([-Wunused-but-set-parameter])
125UL_WARN_ADD([-Wunused-but-set-variable])
0e60bc9b 126UL_WARN_ADD([-Wunused-parameter])
0e60bc9b 127UL_WARN_ADD([-Wunused-result])
bec5c9db 128UL_WARN_ADD([-Wunused-variable])
dcd33c3e
KZ
129UL_WARN_ADD([-Wnested-externs])
130UL_WARN_ADD([-Wpointer-arith])
131UL_WARN_ADD([-Wstrict-prototypes])
132UL_WARN_ADD([-Wformat-security])
d79654f4 133UL_WARN_ADD([-Wimplicit-function-declaration])
0e60bc9b
KZ
134AC_SUBST([WARN_CFLAGS])
135
034d378b 136UL_WARN_ADD([-Wno-clobbered], [BSD_WARN_CFLAGS])
7697771d 137AC_SUBST([BSD_WARN_CFLAGS])
2013b33f
RM
138UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS])
139AC_SUBST([NO_UNUSED_WARN_CFLAGS])
7697771d 140
b12991dd
KZ
141dnl libtool-2
142LT_INIT
48d7b13a 143
3719bf8d
RM
144dnl check supported linker flags
145AX_CHECK_VSCRIPT
146
fd0f4132
SK
147m4_ifndef([PKG_PROG_PKG_CONFIG],
148 [m4_fatal([Could not locate the pkg-config autoconf
149 macros. These are usually located in /usr/share/aclocal/pkg.m4.
150 If your macros are in a different location, try setting the
151 environment variable AL_OPTS="-I/other/macro/dir" before running
152 ./autogen.sh or autoreconf again.])])
d06d028a
KZ
153PKG_PROG_PKG_CONFIG
154
22aa5166
KZ
155GTK_DOC_CHECK([1.10])
156AC_PATH_PROG([XSLTPROC], [xsltproc])
157
8026fa9b 158
8c182554 159linux_os=no
8026fa9b
KZ
160bsd_os=no
161AS_CASE([${host_os}],
162 [*linux*],
163 [linux_os=yes],
40733239
RM
164 [*darwin*],
165 [darwin_os=yes],
8026fa9b
KZ
166 [*bsd*],
167 [bsd_os=yes])
034d378b 168AM_CONDITIONAL([LINUX], [test "x$linux_os" = xyes])
40733239 169AM_CONDITIONAL([DARWIN], [test "x$darwin_os" = xyes])
8026fa9b
KZ
170AM_CONDITIONAL([BSD], [test "x$bsd_os" = xyes])
171
40733239
RM
172AS_IF([test "x$darwin_os" = xyes], [
173 AC_DEFINE([_DARWIN_C_SOURCE], [1], [Enable MAP_ANON in sys/mman.h on Mac OS X])
174])
8c182554 175
3c6e292c 176dnl define ARCH_<NAME> conditionals
034d378b
SK
177UL_SET_ARCH([I86], [i?86-*])
178UL_SET_ARCH([86_64], [x86_64*])
179UL_SET_ARCH([IA64], [ia64*])
180UL_SET_ARCH([S390], [s390*])
181UL_SET_ARCH([SPARC], [sparc*])
182UL_SET_ARCH([PPC], [ppc*|powerpc*])
183UL_SET_ARCH([M68K], [m68*])
184UL_SET_ARCH([MIPS], [mips*])
f319e301 185UL_SET_ARCH([HPPA], [hppa*|parisc*])
3c6e292c 186
48d7b13a 187AC_SYS_LARGEFILE
2c656779 188AC_HEADER_ASSERT
48d7b13a 189
f8d75a66 190dnl Don't forget to maintain alternatively allowed versions in autogen.sh!
91c520bc 191AM_GNU_GETTEXT_VERSION([0.18.3])
09734b00 192AM_GNU_GETTEXT([external])
3013eb9d
SK
193
194AS_IF([test -d "$srcdir/po"], [
195 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
196], [
197 ALL_LINGUAS="af am ar as be bg bn_IN bn ca cs cy da de el en_GB es et eu_ES fa fi fr gl gu he hi hr hu hy id is it ja ka kn ko ku lo lt lv mk ml mr ms my nb nl nn no nso or pa pl pt_BR pt ro ru si sk sl sq sr@Latn sr sv ta te th tr uk ur vi zh_CN zh_TW zu"
198])
09734b00 199
e460a5bf 200AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
48d7b13a
KZ
201#ifdef HAVE_LINUX_COMPILER_H
202#include <linux/compiler.h>
203#endif
204])
f06b4328
SK
205AC_CHECK_HEADERS([ \
206 asm/io.h \
207 err.h \
a0948ffe 208 errno.h \
f06b4328 209 fcntl.h \
a0948ffe 210 getopt.h \
f06b4328 211 inttypes.h \
5a971329 212 linux/btrfs.h \
f06b4328
SK
213 linux/cdrom.h \
214 linux/falloc.h \
5b0289b9 215 linux/watchdog.h \
a0948ffe 216 linux/fd.h \
f06b4328 217 linux/raw.h \
a0948ffe
KZ
218 linux/tiocl.h \
219 linux/version.h \
48469f90 220 linux/securebits.h \
8b7f16fc 221 locale.h \
607c2a72 222 mntent.h \
f06b4328 223 net/if.h \
754fed0c 224 net/if_dl.h \
f06b4328
SK
225 netinet/in.h \
226 paths.h \
227 pty.h \
fe2c9909 228 security/pam_appl.h \
f06b4328 229 stdint.h \
78288764 230 stdio_ext.h \
a0948ffe 231 stdlib.h \
1a1eb4e1
KZ
232 endian.h \
233 byteswap.h \
234 sys/endian.h \
a0948ffe
KZ
235 sys/disk.h \
236 sys/disklabel.h \
f06b4328 237 sys/file.h \
bf962c0a 238 sys/io.h \
f06b4328
SK
239 sys/ioccom.h \
240 sys/ioctl.h \
a0948ffe 241 sys/mkdev.h \
ac1c53e4 242 sys/mount.h \
4ebac79f 243 sys/param.h \
a0948ffe 244 sys/prctl.h \
f06b4328 245 sys/resource.h \
651b25cd 246 sys/signalfd.h \
2a7c1f70 247 sys/socket.h \
f06b4328 248 sys/sockio.h \
a0948ffe 249 sys/stat.h \
66daee07 250 sys/sysmacros.h \
f06b4328
SK
251 sys/swap.h \
252 sys/syscall.h \
253 sys/time.h \
87ee2658 254 sys/timex.h \
00c505d9 255 sys/ttydefaults.h \
a0948ffe 256 sys/types.h \
ac1c53e4 257 sys/ucred.h \
754fed0c 258 sys/un.h \
f06b4328 259 unistd.h \
d00c10ed
RM
260 shadow.h \
261 utmp.h \
f06b4328 262])
dc61d398 263
db4e2645
KZ
264AC_CHECK_HEADERS([linux/gsmmux.h ], [], [],
265 [#ifdef LINUX_GSMMUX_H
266 # include <linux/gsmmux.h>
267 #endif
268])
269
fe2c9909
WJ
270AC_CHECK_HEADERS([security/pam_misc.h],
271 [AM_CONDITIONAL([HAVE_LINUXPAM], [true])],
272 [AM_CONDITIONAL([HAVE_LINUXPAM], [false])], [
273#ifdef HAVE_SECURITY_PAM_APPL_H
274#include <security/pam_appl.h>
275#endif
276])
277
278AC_CHECK_HEADERS([security/openpam.h], [], [], [
279#ifdef HAVE_SECURITY_PAM_APPL_H
280#include <security/pam_appl.h>
281#endif
282])
283
a67387b7
KZ
284AC_CHECK_HEADERS([langinfo.h],
285 [AM_CONDITIONAL([HAVE_LANGINFO], [true])],
286 [AM_CONDITIONAL([HAVE_LANGINFO], [false])])
287
16ba8d58
KZ
288dnl Convert some ac_cv_header_* variables to have_*
289dnl
5a971329 290have_linux_btrfs_h=$ac_cv_header_linux_btrfs_h
16ba8d58 291have_linux_raw_h=$ac_cv_header_linux_raw_h
48469f90 292have_linux_securebits_h=$ac_cv_header_linux_securebits_h
5b0289b9 293have_linux_watchdog_h=$ac_cv_header_linux_watchdog_h
fe2c9909 294have_security_pam_appl_h=$ac_cv_header_security_pam_appl_h
ff0cb84d 295have_security_pam_misc_h=$ac_cv_header_security_pam_misc_h
fe2c9909 296have_security_openpam_h=$ac_cv_header_security_openpam_h
d00c10ed 297have_shadow_h=$ac_cv_header_shadow_h
651b25cd 298have_sys_signalfd_h=$ac_cv_header_sys_signalfd_h
d00c10ed 299have_utmp_h=$ac_cv_header_utmp_h
a67387b7
KZ
300
301AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
302#include <time.h>
303#include <unistd.h>
304]], [[
305 int a = 0;
306 struct tm *tm = localtime(0);
307 if (a == -1) /* false */
f06b4328 308 sleep(tm->tm_gmtoff);
a67387b7 309]])],
034d378b 310[AC_DEFINE([HAVE_TM_GMTOFF], [1], [Does struct tm have a field tm_gmtoff?])
a67387b7
KZ
311])
312
313AC_CHECK_MEMBERS([struct termios.c_line],,,
314 [[#include <termios.h>]])
315
316AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,,
317 [#include <sys/stat.h>])
318
a67387b7
KZ
319AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
320[[
321#ifdef HAVE_SYS_SWAP_H
322# include <sys/swap.h>
323#endif
324#include <unistd.h>
325]],
326[[swapon("/dev/null", 0);]])],
034d378b 327[AC_DEFINE([SWAPON_HAS_TWO_ARGS], [1], [Is swapon() declared with two parameters?])
a67387b7
KZ
328],
329[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
330])
dc61d398
KZ
331
332
a88057d9
TP
333AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
334
2a7c1f70 335AC_CHECK_DECL([llseek],
034d378b 336 [AC_DEFINE([HAVE_LLSEEK_PROTOTYPE], [1],
2a7c1f70
KZ
337 [Define to 1 if have llseek prototype])],
338 [],
339 [#include <unistd.h>])
340
341AC_CHECK_DECL([lseek64],
034d378b 342 [AC_DEFINE([HAVE_LSEEK64_PROTOTYPE], [1],
2a7c1f70
KZ
343 [Define to 1 if have lseek64 prototype])],
344 [],
345 [#define _LARGEFILE_SOURCE
346 #define _LARGEFILE64_SOURCE
347 #include <unistd.h>])
348
0e9b73d3 349AC_CHECK_DECL([environ],
034d378b 350 [AC_DEFINE([HAVE_ENVIRON_DECL], [1],
0e9b73d3
SK
351 [Define to 1 if have **environ prototype])],
352)
353
354AC_CHECK_DECL([strsignal],
034d378b 355 [AC_DEFINE([HAVE_STRSIGNAL_DECL], [1],
0e9b73d3
SK
356 [Define to 1 if have strsignal function prototype])],
357)
358
1eb16fd7
KZ
359AC_CHECK_DECL([TIOCGLCKTRMIOS],
360 [have_tiocglcktrmios=yes], [have_tiocglcktrmios=no],
361 [#include <sys/ioctl.h>])
362AC_CHECK_DECL([SOCK_CLOEXEC],
363 [have_sock_cloexec=yes], [have_sock_cloexec=no],
364 [#include <sys/types.h>
365 #include <sys/socket.h>])
366AC_CHECK_DECL([SOCK_NONBLOCK],
367 [have_sock_nonblock=yes], [have_sock_nonblock=no],
368 [#include <sys/types.h>
369 #include <sys/socket.h>])
370AC_CHECK_DECL([SO_PASSCRED],
371 [have_so_passcred=yes], [have_so_passcred=no],
372 [#include <sys/types.h>
373 #include <sys/socket.h>])
374
f06b4328 375AC_CHECK_FUNCS([ \
78288764 376 __fpending \
075f4bfd 377 secure_getenv \
f06b4328 378 __secure_getenv \
eb76ca98
FG
379 err \
380 errx \
bf962c0a 381 fsync \
473c5fb8 382 utimensat \
bf962c0a 383 getdomainname \
f06b4328
SK
384 getdtablesize \
385 getexecname \
386 getmntinfo \
387 getrlimit \
c829aebc 388 getsgnam \
f06b4328 389 inotify_init \
3ac22f7a 390 jrand48 \
bf962c0a 391 lchown \
a0948ffe
KZ
392 llseek \
393 lseek64 \
02887b73 394 mempcpy \
4d751c00 395 mkostemp \
f06b4328 396 nanosleep \
7d3a07d8 397 ntp_gettime \
f06b4328
SK
398 personality \
399 posix_fadvise \
400 prctl \
9c7955da 401 qsort_r \
f06b4328 402 rpmatch \
485a8bfa 403 scandirat \
30fbf2f6 404 setprogname \
69045d3d
KZ
405 setresgid \
406 setresuid \
15167589 407 sched_setattr \
ee20c303 408 sched_setscheduler \
f06b4328
SK
409 sigqueue \
410 srandom \
411 strnchr \
69b7e41e
KZ
412 strndup \
413 strnlen \
f06b4328 414 sysconf \
88e0f3df 415 sysinfo \
f06b4328
SK
416 updwtmp \
417 usleep \
eb76ca98
FG
418 warn \
419 warnx \
f06b4328 420])
48d7b13a 421AC_FUNC_FSEEKO
48d7b13a 422
940fd28c 423AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
465e9973 424AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
90d5285d
KZ
425AC_CHECK_FUNCS([futimens], [have_futimens=yes])
426AC_CHECK_FUNCS([inotify_init1], [have_inotify_init1=yes])
f9c4d138 427AC_CHECK_FUNCS([open_memstream], [have_open_memstream=yes],[have_open_memstream=no])
e52b58e6 428AC_CHECK_FUNCS([reboot], [have_reboot=yes],[have_reboot=no])
465e9973 429
dc049516
RM
430AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
431
378543e1 432dnl lib/mononotic.c may require -lrt
254743e4
KZ
433AC_CHECK_FUNCS([clock_gettime], [],
434 [AC_CHECK_LIB([rt], [clock_gettime], [REALTIME_LIBS="-lrt"])]
435)
bd9b94d1 436
254743e4 437have_timer="no"
f07a82c9 438AC_CHECK_FUNCS([timer_create],
7944a03c 439 [have_timer="yes"],
254743e4
KZ
440 [AC_CHECK_LIB([rt], [timer_create], [
441 have_timer="yes"
442 REALTIME_LIBS="-lrt"
bf6be9f5
LT
443 ],[
444 AC_SEARCH_LIBS([timer_create], [rt], [
445 AC_MSG_RESULT(yes)
446 have_timer="yes"
447 REALTIME_LIBS="-lrt -lpthread"
448 ],[], [-lpthread]
449 )
450 ])]
254743e4 451)
8fc4a886 452
f07a82c9
KZ
453AC_SUBST([REALTIME_LIBS])
454
455
456AC_CHECK_LIB([rtas], [rtas_get_sysparm], [
457 RTAS_LIBS="-lrtas"
458 AC_DEFINE_UNQUOTED([HAVE_LIBRTAS], [1], [Define if librtas exists]), [],
459])
460AC_SUBST([RTAS_LIBS])
461
8fc4a886 462
034d378b
SK
463AC_CHECK_MEMBER([struct sockaddr.sa_len],
464 AC_DEFINE_UNQUOTED([HAVE_SA_LEN], [1], [Define if struct sockaddr contains sa_len]), [],
754fed0c
KZ
465 [#include <sys/types.h>
466 #include <sys/socket.h>])
467
60cc9f94 468SOCKET_LIBS=
60cc9f94 469AC_SEARCH_LIBS([socket], [socket],
3013eb9d
SK
470 [AS_IF([test x"$ac_cv_search_socket" != x"none required"],
471 [SOCKET_LIBS="$SOCKET_LIBS -lsocket"])
472])
60cc9f94
FG
473AC_SUBST([SOCKET_LIBS])
474
d58c47d9
FG
475
476have_dirfd=no
477AC_CHECK_FUNCS([dirfd], [have_dirfd=yes], [have_dirfd=no])
3013eb9d 478AS_IF([test x"$have_dirfd" = xno], [
d58c47d9
FG
479 AC_CHECK_DECLS([dirfd],
480 [have_dirfd=yes], [have_dirfd=no],
481 [#include <sys/types.h>
482 #include <dirent.h>])
3013eb9d 483])
d58c47d9
FG
484
485have_ddfd=no
3013eb9d 486AS_IF([test x"$have_dirfd" = xno], [
d58c47d9
FG
487 AC_CHECK_MEMBERS([DIR.dd_fd],
488 [have_ddfd=yes], [have_ddfd=no],
489 [#include <sys/types.h>
490 #include <dirent.h>])
3013eb9d 491])
d58c47d9 492
9f57e6e8
SK
493AS_CASE([$have_dirfd:$have_ddfd],
494 [no:no],
495 [AC_MSG_ERROR([cannot find a method to get filedescriptor of directory])]
496)
d58c47d9
FG
497
498
d6abf168
SK
499AC_MSG_CHECKING([whether program_invocation_short_name is defined])
500AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
37edac9a 501 #include <errno.h>
d6abf168
SK
502]], [[
503 program_invocation_short_name = "test";
504]])], [
505 AC_MSG_RESULT([yes])
506 AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
507 [Define if program_invocation_short_name is defined])
508], [
509 AC_MSG_RESULT([no])
510])
511
a804f444
FG
512
513AC_MSG_CHECKING([whether __progname is defined])
514AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
cf582a2e 515 [if (*__progname == 0) return 1;])],
034d378b
SK
516 AC_DEFINE([HAVE___PROGNAME], [1], [Define if __progname is defined])
517 AC_MSG_RESULT([yes]),
518 AC_MSG_RESULT([no]))
a804f444 519
8569410c 520dnl Static compilation
fddfd4e0 521m4_define([UL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid, nsenter, unshare])
8569410c
SK
522
523AC_ARG_ENABLE([static-programs],
524 [AS_HELP_STRING([--enable-static-programs=LIST],
525 [link static the programs in LIST (comma-separated,
132ea941 526 supported for ]m4_defn([UL_STATIC_PROGRAMS])[)])])
8569410c 527
9f57e6e8
SK
528AS_CASE([$enable_static_programs],
529 [yes],
d924b10b 530 [enable_static_programs=m4_quote(UL_STATIC_PROGRAMS)],
9f57e6e8
SK
531 [no],
532 [enable_static_programs=]
533)
8569410c 534
8569410c 535dnl Set all the individual AM_CONDITIONALs
132ea941 536m4_foreach([UL_PRG], m4_defn([UL_STATIC_PROGRAMS]), [
9f57e6e8
SK
537 AS_CASE([,$enable_static_programs,],
538 [*,UL_PRG,*], [static_[]UL_PRG=yes]
539 )
d924b10b 540 AS_IF([test "x$static_[]UL_PRG" = xyes], [AC_MSG_NOTICE([enable static build: UL_PRG.])])
132ea941
KZ
541 AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UL_PRG),
542 [test "x$static_[]UL_PRG" = xyes])
8569410c
SK
543])
544
08b1c219
KZ
545
546AC_ARG_ENABLE([all-programs],
547 AS_HELP_STRING([--disable-all-programs], [disable everything, might be overridden by --enable-<name>]),
548 [], [enable_all_programs=undefined]
549)
550
551AS_CASE([$enable_all_programs],
7477f356
KZ
552 [yes], [AC_MSG_WARN([force to build all programs by default])
553 ul_default_estate=check],
08b1c219 554 [no], [AC_MSG_WARN([disable all programs by default])
7477f356 555 ul_default_estate=no]
08b1c219
KZ
556)
557
558
d7a01582 559AX_CHECK_TLS
3ac22f7a 560
13f5473e
KZ
561AC_DEFUN([UL_SCANF_TYPE_MODIFIER], [dnl
562# include <stdio.h>
3eeb5808 563# include <stdlib.h>
13f5473e
KZ
564int main()
565{
566 int i;
544d4069 567 int rc = 1;
13f5473e
KZ
568 char *s;
569 i = sscanf("x", $1, &s);
544d4069
RM
570 if (i == 1 && *s == 'x')
571 rc = 0;
4f310fae 572 free(s);
544d4069 573 return rc;
13f5473e
KZ
574}])
575
576AC_CACHE_VAL([scanf_cv_alloc_modifier],
577 AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%ms"])])],
578 [scanf_cv_alloc_modifier=ms],
579 AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%as"])])],
580 [scanf_cv_alloc_modifier=as],
581 [scanf_cv_alloc_modifier=no]
582 )
b420e279 583 ,
d0202f1c
SAS
584
585 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([
586 #include <stdio.h>
695e4e1a 587 #include <unistd.h>
d0202f1c 588
bac7fbdb 589 #if defined(__GLIBC__) && !defined(__UCLIBC__)
d0202f1c
SAS
590
591 #if !(__GLIBC_PREREQ(2, 7))
592 #error %m is not available
593 #endif
594
695e4e1a 595 #elif defined(_POSIX_VERSION)
d0202f1c 596
695e4e1a
MF
597 #if _POSIX_VERSION < 200809L
598 #error %m is not available
599 #endif
600
601 #else
d0202f1c
SAS
602 #error Your C-library is not supported.
603 #endif
604 ])],
605 [scanf_cv_alloc_modifier=ms],
606 [scanf_cv_alloc_modifier=no])]
13f5473e
KZ
607 )
608)
609
610AC_MSG_CHECKING([scanf string alloc modifiers])
9f57e6e8
SK
611AS_CASE([$scanf_cv_alloc_modifier],
612 [ms],
613 [AC_MSG_RESULT([(%ms) yes])
614 AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier])
615 have_scanf_alloc_modifier=yes],
616 [as],
617 [AC_MSG_RESULT([(%as) yes])
618 have_scanf_alloc_modifier=yes
619 AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier])],
620 [AC_MSG_RESULT([no])
621 have_scanf_alloc_modifier=no]
622)
13f5473e 623
17d71034
KZ
624
625AC_ARG_WITH([util], AS_HELP_STRING([--without-util], [compile without libutil]),
626 [], [with_util=auto]
627)
628AS_IF([test "x$with_util" = xno], [
629 AM_CONDITIONAL([HAVE_UTIL], [false])
630 have_util=no
631], [
632 UL_CHECK_LIB([util], [openpty])
633])
634
635
3aecf79d
KZ
636AC_CHECK_TYPES([union semun], [], [], [[
637#include <sys/sem.h>
638]])
034d378b 639AC_CHECK_TYPES([loff_t])
3aecf79d 640
4cb6fea5
KZ
641
642AC_ARG_ENABLE([widechar],
643 AS_HELP_STRING([--disable-widechar], [do not compile wide character support]),
644 [], [enable_widechar=check]
645)
646UL_BUILD_INIT([widechar])
647UL_REQUIRES_COMPILE([widechar], [[
648 #include <wchar.h>
649 #include <wctype.h>
650 #include <stdio.h>
651 ]], [[
652 wchar_t wc;
653 wint_t w;
654 w = fgetwc(stdin);
655 if (w == WEOF) exit(1);
656 wc = w;
657 fputwc(wc,stdout);
658 ]],
659 [wchar_t support])
660
661AS_IF([test "x$build_widechar" = xyes ], [
662 AC_DEFINE([HAVE_WIDECHAR], [1], [Do we have wide character support?])
3aecf79d
KZ
663])
664
4cb6fea5 665
3aecf79d
KZ
666AC_CHECK_TYPES([cpu_set_t], [have_cpu_set_t=yes], [], [[
667#include <sched.h>
668]])
669
034d378b 670AM_CONDITIONAL([HAVE_CPU_SET_T], [test "x$have_cpu_set_t" = xyes])
3aecf79d 671
b09bc508
MF
672AC_CHECK_TYPES([sighandler_t], [], [], [[
673#include <signal.h>
674]])
675
3aecf79d
KZ
676AC_CHECK_DECLS([CPU_ALLOC], [], [], [[
677#include <sched.h>
678]])
679
8d35bdc9
KZ
680# on Solaris, you can't mix and match standards, since we use c99
681# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
682# check for crypt.h and use that without XOPEN_SOURCE.
683AC_CHECK_HEADERS([crypt.h])
684AC_LINK_IFELSE([AC_LANG_PROGRAM([[
685#ifdef HAVE_CRYPT_H
686#include <crypt.h>
687#else
688#define _XOPEN_SOURCE
689#include <unistd.h>
690#endif
691]], [[
692char *c = crypt("abc","pw");
693]])],[],[
694 LIBS="$LIBS -lcrypt"
695 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
696 #ifdef HAVE_CRYPT_H
697 #include <crypt.h>
698 #else
699 #define _XOPEN_SOURCE
700 #include <unistd.h>
701 #endif
702 ]], [[
703 char *c = crypt("abc","pw");
704 ]])],[
034d378b 705 AC_DEFINE([HAVE_LIBCRYPT], [1], [Do we need -lcrypt?])
8d35bdc9
KZ
706 have_libcrypt=yes
707 ],[
708 AC_MSG_ERROR([crypt() is not available])
709 ])
710])
034d378b 711AM_CONDITIONAL([HAVE_LIBCRYPT], [test "x$have_libcrypt" = xyes])
8d35bdc9 712
13f5473e 713
75ad4910
KZ
714AC_ARG_WITH([selinux],
715 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
034d378b 716 [], [with_selinux=no]
75ad4910
KZ
717)
718
3013eb9d 719AS_IF([test "x$with_selinux" = xno], [
034d378b 720 AM_CONDITIONAL([HAVE_SELINUX], [false])
3013eb9d 721], [
7e34c79f 722 PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0],
034d378b 723 [AC_DEFINE([HAVE_LIBSELINUX], [1], [Define if SELinux is available])
7e34c79f 724 UL_PKG_STATIC([SELINUX_LIBS_STATIC], [libselinux])
034d378b 725 AM_CONDITIONAL([HAVE_SELINUX], [true])
7e34c79f
KZ
726 have_selinux=yes],
727 [have_selinux=no])
728
9f57e6e8
SK
729 AS_CASE([$with_selinux:$have_selinux],
730 [yes:no], [AC_MSG_ERROR([SELinux selected but libselinux not found or too old])]
731 )
312f04f4 732
3013eb9d 733 AS_IF([test "x$have_selinux" = xyes], [
312f04f4
KZ
734 UL_SET_FLAGS([], [], [$SELINUX_LIBS])
735 # This function is missing in old libselinux 1.xx versions
736 AC_CHECK_FUNCS([security_get_initial_context])
737 UL_RESTORE_FLAGS
3013eb9d
SK
738 ])
739])
75ad4910
KZ
740AC_SUBST([SELINUX_LIBS])
741AC_SUBST([SELINUX_LIBS_STATIC])
742
0273afda 743
75ad4910
KZ
744AC_ARG_WITH([audit],
745 AS_HELP_STRING([--with-audit], [compile with audit support]),
034d378b 746 [], [with_audit=no]
75ad4910
KZ
747)
748
3013eb9d 749AS_IF([test "x$with_audit" = xno], [
034d378b 750 AM_CONDITIONAL([HAVE_AUDIT], [false])
3013eb9d 751], [
034d378b 752 UL_CHECK_LIB([audit], [audit_log_user_message])
9f57e6e8
SK
753 AS_CASE([$with_audit:$have_audit],
754 [yes:no],
755 [AC_MSG_ERROR([Audit selected but libaudit not found (or does not support audit_log_user_message())])]
756 )
3013eb9d 757])
75ad4910
KZ
758
759AC_ARG_WITH([udev], AS_HELP_STRING([--without-udev], [compile without udev support]),
034d378b 760 [], [with_udev=auto]
75ad4910
KZ
761)
762
3013eb9d 763AS_IF([test "x$with_udev" = xno], [
034d378b 764 AM_CONDITIONAL([HAVE_UDEV], [false])
3013eb9d 765], [
034d378b 766 UL_CHECK_LIB([udev], [udev_new])
9f57e6e8
SK
767 AS_CASE([$with_udev:$have_udev],
768 [yes:no],
769 [AC_MSG_ERROR([udev selected but libudev not found])]
770 )
3013eb9d 771])
75ad4910 772
2b8f22bd 773
4ffcc7a9
KZ
774dnl wide-char ncurses
775AC_ARG_WITH([ncursesw],
776 AS_HELP_STRING([--with-ncursesw], [build with wide-char ncurses, enabled by default]),
777 [], [with_ncursesw=auto]
778)
779have_ncursesw=no
780AS_IF([test "x$with_ncursesw" != xno], [
2b8f22bd 781 PKG_CHECK_MODULES(NCURSESW, [ncursesw], [
4ffcc7a9 782 have_ncursesw=yes
2b8f22bd
MF
783 NCURSES_LIBS=${NCURSESW_LIBS}
784 NCURSES_CFLAGS=${NCURSESW_CFLAGS}
4ffcc7a9 785 AC_DEFINE([HAVE_LIBNCURSESW], [1], [Define if ncursesw library available])
f1512be8 786 CURSES_LIB_NAME="ncursesw"
4ffcc7a9 787 AC_CHECK_HEADERS([ncursesw/ncurses.h ncurses.h])
dfe177da 788 ], [have_ncursesw=no])
4ffcc7a9
KZ
789])
790AS_CASE([$with_ncursesw:$have_ncursesw],
791 [yes:no], [AC_MSG_ERROR([ncursesw selected, but library not found])])
2b8f22bd 792
43cc76e2 793
4ffcc7a9
KZ
794dnl non-wide ncurses
795AC_ARG_WITH([ncurses],
796 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, disabled by default]),
797 [], [with_ncurses=auto]
798)
799have_ncurses=no
18dae5d8
KZ
800
801AS_CASE([$with_ncurses:$build_widechar],
802 [yes:yes], [AC_MSG_ERROR([wide-char support enabled, but non-wide ncurses selects])])
803
4ffcc7a9
KZ
804AS_IF([test "x$have_ncursesw" = xno -a "x$with_ncurses" != xno ], [
805 PKG_CHECK_MODULES(NCURSES, [ncurses], [
806 have_ncurses=yes
807 AC_DEFINE([HAVE_LIBNCURSES], [1], [Define if ncurses library available])
808 CURSES_LIB_NAME="ncurses"
809 AC_CHECK_HEADERS([ncurses/ncurses.h ncurses.h])
dfe177da 810 ],[have_ncurses=no])
3013eb9d 811])
4ffcc7a9
KZ
812AS_CASE([$with_ncurses:$have_ncurses],
813 [yes:no], [AC_MSG_ERROR([ncurses selected, but library not found])])
814
2b8f22bd 815AC_SUBST([NCURSES_CFLAGS])
75ad4910 816AC_SUBST([NCURSES_LIBS])
4ffcc7a9 817AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncursesw" = xyes -o "x$have_ncurses" = xyes])
75ad4910
KZ
818
819
820AC_ARG_WITH([slang],
4ffcc7a9 821 AS_HELP_STRING([--with-slang], [compile cfdisk with slang rather than ncurses]),
034d378b 822 [], [with_slang=no]
75ad4910 823)
50ea6795 824have_slang=no
3013eb9d 825AS_IF([test "x$with_slang" = xyes], [
75ad4910
KZ
826 AC_CHECK_HEADERS([slang.h slang/slang.h])
827 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h],
50ea6795 828 [have_slang=yes], [], [
75ad4910
KZ
829#ifdef HAVE_SLANG_H
830#include <slang.h>
831#elif defined(HAVE_SLANG_SLANG_H)
832#include <slang/slang.h>
833#endif
834])
3013eb9d 835 AS_IF([test "x$have_slang" = xno], [
f1512be8
KZ
836 AC_MSG_ERROR([slang selected but slcurses.h not found])],
837 [CURSES_LIB_NAME=slang
3013eb9d
SK
838 ])
839])
034d378b 840AM_CONDITIONAL([HAVE_SLANG], [test "x$have_slang" = xyes])
50ea6795 841
50ea6795 842
4ffcc7a9 843AS_IF([test "x$have_slang" = xyes -o "x$have_ncursesw" = xyes -o "x$have_ncurses" = xyes], [
f1512be8
KZ
844 AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, [
845 AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1,
7556c944
KZ
846 [Define if curses library has the use_default_colors().])
847 ])
848 AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, [
849 AC_DEFINE(HAVE_RESIZETERM, 1,
850 [Define if curses library has the resizeterm().])
f1512be8
KZ
851 ])
852])
853
50ea6795 854
17d71034
KZ
855AC_ARG_WITH([tinfo], AS_HELP_STRING([--without-tinfo], [compile without libtinfo]),
856 [], [with_tinfo=auto]
857)
858have_tinfo=no
859AS_IF([test "x$with_tinfo" != xno], [
860 dnl Try pkg-config for libtinfo
861 PKG_CHECK_MODULES(TINFO, [tinfo], [
862 dnl pkg-config success
863 have_tinfo=yes
864 UL_PKG_STATIC([TINFO_LIBS_STATIC], [tinfo])], [
865
866 dnl If pkg-config failed, fall back to classic searching.
867 AC_CHECK_LIB([tinfo], [tgetent], [
ccf92e6d
KZ
868 have_tinfo=yes
869 TINFO_LIBS="-ltinfo"
587652b4 870 TINFO_LIBS_STATIC="-ltinfo"
ccf92e6d 871 TINFO_CFLAGS=""])
17d71034 872 ])
2b8f22bd
MF
873])
874AC_SUBST([TINFO_LIBS])
0b28c2ec 875AC_SUBST([TINFO_LIBS_STATIC])
ccf92e6d 876AC_SUBST([TINFO_CFLAGS])
b88e6b02 877AM_CONDITIONAL([HAVE_TINFO], [test "x$have_tinfo" = xyes])
254743e4 878AS_IF([test "x$have_tinfo" = xyes], [
17d71034 879 AC_DEFINE(HAVE_LIBTINFO, 1, [Define if libtinfo available.])
4310faf9 880])
75ad4910
KZ
881
882
0b28c2ec
KZ
883AC_ARG_WITH([readline],
884 AS_HELP_STRING([--with-readline], [compile with GNU Readline support]),
885 [], [with_readline=auto]
886)
887
888AS_IF([test "x$with_readline" = xno], [
889 AM_CONDITIONAL([HAVE_READLINE], [false])
890], [
891 UL_CHECK_LIB([readline], [readline])
892 AS_CASE([$with_readline:$have_readline],
893 [yes:no],
894 [AC_MSG_ERROR([readline selected but libreadline not found ])],
895 [*:yes],
896 [READLINE_LIBS="-lreadline"
897 READLINE_LIBS_STATIC="-lreadline $TINFO_LIBS_STATIC"]
898 )
899])
900AC_SUBST([READLINE_LIBS])
901AC_SUBST([READLINE_LIBS_STATIC])
902
903
75ad4910
KZ
904AC_ARG_WITH([utempter],
905 AS_HELP_STRING([--with-utempter], [compile script(1) with libutempter]),
034d378b 906 [], [with_utempter=no]
75ad4910
KZ
907)
908
3013eb9d 909AS_IF([test "x$with_utempter" = xyes], [
034d378b 910 UL_CHECK_LIB([utempter], [utempter_add_record])
3013eb9d 911 AS_IF([test "x$have_utempter" = xno], [
75ad4910 912 AC_MSG_ERROR([utempter selected but libutempter not found])
3013eb9d
SK
913 ])
914], [
034d378b 915 AM_CONDITIONAL([HAVE_UTEMPTER], [false])
3013eb9d 916])
75ad4910
KZ
917
918
1dbbde66
KZ
919dnl
920dnl libuuid
921dnl
17afb032
KZ
922AC_ARG_ENABLE([libuuid],
923 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
08b1c219 924 [], [UL_DEFAULT_ENABLE([libuuid], [yes])]
17afb032 925)
fa7be20e 926UL_BUILD_INIT([libuuid])
dc2b8d87
KZ
927AC_SUBST([LIBUUID_VERSION])
928AC_SUBST([LIBUUID_VERSION_INFO])
fa7be20e 929AM_CONDITIONAL(BUILD_LIBUUID, test "x$build_libuuid" = xyes)
9dc801d2 930
3e584e85
RM
931AC_ARG_ENABLE([libuuid-force-uuidd],
932 AS_HELP_STRING([--enable-libuuid-force-uuidd], [support uuidd even though the daemon is not built]),
933 [], [enable_libuuid_force_uuidd=no]
934)
935
13985252 936AS_IF([test "x$build_libuuid" = xyes], [
17afb032 937 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
3013eb9d 938])
48d7b13a 939
1dbbde66
KZ
940dnl
941dnl libblkid
942dnl
f910b559 943AC_ARG_ENABLE([libblkid],
1d12ed57 944 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and many related utilities]),
dc049516 945 [], [UL_DEFAULT_ENABLE([libblkid], [check])]
40f07ff7 946)
61a074f7 947UL_BUILD_INIT([libblkid])
dc049516 948UL_REQUIRES_HAVE([libblkid], [openat], [openat functions])
033cf439 949AC_SUBST([LIBBLKID_DATE])
dc2b8d87
KZ
950AC_SUBST([LIBBLKID_VERSION])
951AC_SUBST([LIBBLKID_VERSION_INFO])
034d378b
SK
952AC_DEFINE_UNQUOTED([LIBBLKID_VERSION], ["$LIBBLKID_VERSION"], [libblkid version string])
953AC_DEFINE_UNQUOTED([LIBBLKID_DATE], ["$LIBBLKID_DATE"], [libblkid date string])
3013eb9d 954AS_IF([test "x$build_libblkid" = xyes], [
034d378b 955 AC_DEFINE([HAVE_LIBBLKID], [1], [Define to 1 if you have the -lblkid.])
3013eb9d 956])
034d378b
SK
957AM_CONDITIONAL([BUILD_LIBBLKID], [test "x$build_libblkid" = xyes])
958AM_CONDITIONAL([BUILD_LIBBLKID_TESTS], [test "x$build_libblkid" = xyes -a "x$enable_static" = xyes])
f910b559 959
1dbbde66
KZ
960dnl
961dnl libmount
962dnl
f1cde479
KZ
963AC_ARG_ENABLE([libmount],
964 AS_HELP_STRING([--disable-libmount], [do not build libmount]),
08b1c219 965 [], [UL_DEFAULT_ENABLE([libmount], [check])]
f1cde479 966)
61a074f7 967UL_BUILD_INIT([libmount])
13f5473e
KZ
968UL_REQUIRES_BUILD([libmount], [libblkid])
969UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
034d378b
SK
970AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
971AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
30c34afb
KZ
972AS_IF([test "x$build_libmount" = xyes], [
973 AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount available.])
974])
8e368761 975
f1cde479 976AC_SUBST([LIBMOUNT_VERSION])
10e1d2e5
SH
977AC_SUBST([LIBMOUNT_MAJOR_VERSION], $PACKAGE_VERSION_MAJOR)
978AC_SUBST([LIBMOUNT_MINOR_VERSION], $PACKAGE_VERSION_MINOR)
979AC_SUBST([LIBMOUNT_PATCH_VERSION], $PACKAGE_VERSION_RELEASE)
f1cde479 980AC_SUBST([LIBMOUNT_VERSION_INFO])
034d378b 981AC_DEFINE_UNQUOTED([LIBMOUNT_VERSION], ["$LIBMOUNT_VERSION"], [libmount version string])
13f5473e 982
e778642a
KZ
983AC_ARG_ENABLE([libmount-support-mtab],
984 AS_HELP_STRING([--enable-libmount-support-mtab], [support /etc/mtab (default is use /proc/self/mountinfo)]),
985 [], [enable_libmount_support_mtab=no]
e3f72275
KZ
986)
987
e778642a
KZ
988AS_IF([test "x$enable_libmount_support_mtab" == xyes], [
989 AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.])
e3f72275
KZ
990])
991
f1cde479 992
1a4d989e
OO
993dnl
994dnl libsmartcols
995dnl
996AC_ARG_ENABLE([libsmartcols],
997 AS_HELP_STRING([--disable-libsmartcols], [do not build libsmartcols]),
08b1c219 998 [], [UL_DEFAULT_ENABLE([libsmartcols], [yes])]
1a4d989e
OO
999)
1000UL_BUILD_INIT([libsmartcols])
1a4d989e 1001AM_CONDITIONAL([BUILD_LIBSMARTCOLS], [test "x$build_libsmartcols" = xyes])
1a4d989e
OO
1002
1003AC_SUBST([LIBSMARTCOLS_VERSION])
1004AC_SUBST([LIBSMARTCOLS_VERSION_INFO])
1005AC_DEFINE_UNQUOTED([LIBSMARTCOLS_VERSION], ["$LIBSMARTCOLS_VERSION"], [libsmartcols version string])
1006
1007
eb6a03f3 1008dnl
0bb4c979 1009dnl libfdisk
eb6a03f3 1010dnl
0bb4c979
KZ
1011AC_ARG_ENABLE([libfdisk],
1012 AS_HELP_STRING([--disable-libfdisk], [do not build libfdisk]),
1013 [], [UL_DEFAULT_ENABLE([libfdisk], [check])]
1014)
1015UL_BUILD_INIT([libfdisk])
eb6a03f3 1016UL_REQUIRES_BUILD([libfdisk], [libuuid])
034d378b 1017AM_CONDITIONAL([BUILD_LIBFDISK], [test "x$build_libfdisk" = xyes])
0bb4c979
KZ
1018AM_CONDITIONAL([BUILD_LIBFDISK_TESTS], [test "x$build_libfdisk" = xyes -a "x$enable_static" = xyes])
1019
ed79557e
KZ
1020AS_IF([test "x$build_libblkid" = xyes],
1021 [LIBFDISK_PC_REQUIRES="uuid blkid"],[LIBFDISK_PC_REQUIRES="uuid"])
1022AC_SUBST([LIBFDISK_PC_REQUIRES])
1023
0bb4c979 1024AC_SUBST([LIBFDISK_VERSION])
791da22d
KZ
1025AC_SUBST([LIBFDISK_MAJOR_VERSION], $PACKAGE_VERSION_MAJOR)
1026AC_SUBST([LIBFDISK_MINOR_VERSION], $PACKAGE_VERSION_MINOR)
1027AC_SUBST([LIBFDISK_PATCH_VERSION], $PACKAGE_VERSION_RELEASE)
0bb4c979
KZ
1028AC_SUBST([LIBFDISK_VERSION_INFO])
1029AC_DEFINE_UNQUOTED([LIBFDISK_VERSION], ["$LIBFDISK_VERSION"], [libfdisk version string])
1030
eb6a03f3
KZ
1031
1032UL_BUILD_INIT([fdisk], [check])
dc049516 1033UL_REQUIRES_HAVE([fdisk], [openat], [openat functions])
eb6a03f3 1034UL_REQUIRES_BUILD([fdisk], [libfdisk])
d44115f3 1035UL_REQUIRES_BUILD([fdisk], [libsmartcols])
034d378b 1036AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes])
eb6a03f3
KZ
1037
1038
62b2c024 1039UL_BUILD_INIT([sfdisk], [check])
dc049516 1040UL_REQUIRES_HAVE([sfdisk], [openat], [openat functions])
9c1f9dd3
KZ
1041UL_REQUIRES_BUILD([sfdisk], [libfdisk])
1042UL_REQUIRES_BUILD([sfdisk], [libsmartcols])
ecc6047e
KZ
1043AM_CONDITIONAL([BUILD_SFDISK], [test "x$build_sfdisk" = xyes])
1044
1045
08b1c219
KZ
1046UL_BUILD_INIT([cfdisk], [check])
1047UL_REQUIRES_BUILD([cfdisk], [libfdisk])
1048UL_REQUIRES_BUILD([cfdisk], [libsmartcols])
9dd55a04 1049UL_REQUIRES_HAVE([cfdisk], [open_memstream], [open_memstream function])
4ffcc7a9 1050UL_REQUIRES_HAVE([cfdisk], [ncursesw,slang,ncurses], [ncursesw, ncurses or slang library])
08b1c219
KZ
1051AM_CONDITIONAL([BUILD_CFDISK], [test "x$build_cfdisk" = xyes])
1052
1053
434b07a0
KZ
1054AC_ARG_ENABLE([mount],
1055 AS_HELP_STRING([--disable-mount], [do not build mount(8) and umount(8)]),
08b1c219 1056 [], [UL_DEFAULT_ENABLE([mount], [check])]
ecdba5dd 1057)
434b07a0 1058UL_BUILD_INIT([mount])
53e8c16e 1059UL_REQUIRES_LINUX([mount])
434b07a0 1060UL_REQUIRES_BUILD([mount], [libmount])
034d378b 1061AM_CONDITIONAL([BUILD_MOUNT], [test "x$build_mount" = xyes])
ecdba5dd
KZ
1062
1063
bafe1a75
KZ
1064AC_ARG_ENABLE([losetup],
1065 AS_HELP_STRING([--disable-losetup], [do not build losetup]),
08b1c219 1066 [], [UL_DEFAULT_ENABLE([losetup], [check])]
bafe1a75
KZ
1067)
1068UL_BUILD_INIT([losetup])
1069UL_REQUIRES_LINUX([losetup])
7477f356 1070UL_REQUIRES_BUILD([losetup], [libsmartcols])
034d378b 1071AM_CONDITIONAL([BUILD_LOSETUP], [test "x$build_losetup" = xyes])
bafe1a75 1072
0624d840
KZ
1073AC_ARG_ENABLE([zramctl],
1074 AS_HELP_STRING([--disable-zramctl], [do not build zramctl]),
1075 [], [UL_DEFAULT_ENABLE([zramctl], [check])]
1076)
1077UL_BUILD_INIT([zramctl])
1078UL_REQUIRES_LINUX([zramctl])
1079UL_REQUIRES_BUILD([zramctl], [libsmartcols])
1080AM_CONDITIONAL([BUILD_ZRAMCTL], [test "x$build_zramctl" = xyes])
bafe1a75 1081
1dbbde66
KZ
1082AC_ARG_ENABLE([fsck],
1083 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
08b1c219 1084 [], [UL_DEFAULT_ENABLE([fsck], [check])]
1dbbde66 1085)
61a074f7 1086UL_BUILD_INIT([fsck])
a7b585ea 1087UL_REQUIRES_BUILD([fsck], [libmount])
034d378b 1088AM_CONDITIONAL([BUILD_FSCK], [test "x$build_fsck" = xyes])
1dbbde66
KZ
1089
1090
1091AC_ARG_ENABLE([partx],
1092 AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
08b1c219 1093 [], [UL_DEFAULT_ENABLE([partx], [check])]
1dbbde66 1094)
61a074f7 1095UL_BUILD_INIT([partx])
ecde2536
KZ
1096UL_REQUIRES_LINUX([partx])
1097UL_REQUIRES_BUILD([partx], [libblkid])
08b1c219 1098UL_REQUIRES_BUILD([partx], [libsmartcols])
034d378b 1099AM_CONDITIONAL([BUILD_PARTX], [test "x$build_partx" = xyes])
1dbbde66
KZ
1100
1101
1dbbde66
KZ
1102AC_ARG_ENABLE([uuidd],
1103 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
08b1c219 1104 [], [UL_DEFAULT_ENABLE([uuidd], [check])]
1dbbde66 1105)
61a074f7 1106UL_BUILD_INIT([uuidd])
bcdab497 1107UL_REQUIRES_BUILD([uuidd], [libuuid])
651b25cd
RM
1108UL_REQUIRES_HAVE([uuidd], [timer], [timer_create function])
1109UL_REQUIRES_HAVE([uuidd], [sys_signalfd_h], [sys/signalfd.h header])
3e584e85 1110AS_IF([test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" == xyes ], [
034d378b 1111 AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])
3013eb9d 1112])
034d378b 1113AM_CONDITIONAL([BUILD_UUIDD], [test "x$build_uuidd" = xyes])
1dbbde66
KZ
1114
1115
1b15cbd1
KZ
1116UL_BUILD_INIT([uuidgen], [check])
1117UL_REQUIRES_BUILD([uuidgen], [libuuid])
1118AM_CONDITIONAL([BUILD_UUIDGEN], [test "x$build_uuidgen" = xyes])
1119
15a2c741
KZ
1120UL_BUILD_INIT([blkid], [check])
1121UL_REQUIRES_BUILD([blkid], [libblkid])
1122AM_CONDITIONAL([BUILD_BLKID], [test "x$build_blkid" = xyes])
1123
1124UL_BUILD_INIT([findfs], [check])
1125UL_REQUIRES_BUILD([findfs], [libblkid])
1126AM_CONDITIONAL([BUILD_FINDFS], [test "x$build_findfs" = xyes])
1127
1128UL_BUILD_INIT([wipefs], [check])
1129UL_REQUIRES_BUILD([wipefs], [libblkid])
1130AM_CONDITIONAL([BUILD_WIPEFS], [test "x$build_wipefs" = xyes])
1131
1132UL_BUILD_INIT([findmnt], [check])
1133UL_REQUIRES_BUILD([findmnt], [libmount])
1134UL_REQUIRES_BUILD([findmnt], [libsmartcols])
1135AM_CONDITIONAL([BUILD_FINDMNT], [test "x$build_findmnt" = xyes])
1136
1b15cbd1 1137
0164c245 1138AC_ARG_ENABLE([mountpoint],
2023ccc4 1139 AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
08b1c219 1140 [], [UL_DEFAULT_ENABLE([mountpoint], [check])]
0164c245 1141)
61a074f7 1142UL_BUILD_INIT([mountpoint])
a9127bc1 1143UL_REQUIRES_BUILD([mountpoint], [libmount])
034d378b 1144AM_CONDITIONAL([BUILD_MOUNTPOINT], [test "x$build_mountpoint" = xyes])
0164c245
KZ
1145
1146
10e56b49
KZ
1147AC_ARG_ENABLE([fallocate],
1148 AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
08b1c219 1149 [], [UL_DEFAULT_ENABLE([fallocate], [check])]
10e56b49 1150)
61a074f7 1151UL_BUILD_INIT([fallocate])
10e56b49
KZ
1152UL_REQUIRES_LINUX([fallocate])
1153UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
034d378b 1154AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes])
10e56b49 1155
3013eb9d 1156AS_IF([test "x$build_fallocate" = xyes], [
10e56b49
KZ
1157 dnl check for valid fallocate() function
1158 dnl with 32 bits glibc 2.10, fallocate() exists but not fallocate64()
1159 dnl when _FILE_OFFSET_BITS==64, fallocate() is redirect to fallocate64()
1160 dnl and program can't be linked.
1161 dnl AC_CHECK_FUNC can't catch such errors since it's redefining
1162 dnl function prototype.
1163 AC_MSG_CHECKING([for valid fallocate() function])
1164 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
b832c2fe
YD
1165#ifdef HAVE_UNISTD_H
1166# include <unistd.h>
1167#endif
1168#ifdef HAVE_SYS_TYPES_H
1169# include <sys/types.h>
1170#endif
1171#ifdef HAVE_LINUX_FALLOC_H
1172# include <linux/falloc.h>
1173#endif
1174#ifdef HAVE_FCNTL_H
1175# include <fcntl.h>
1176#endif
1177]],[[
1178 long ret;
b832c2fe 1179 ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0xfffffffful, 0xfffffffful);
b832c2fe
YD
1180 if (ret != 0) {
1181 return 1;
1182 }
1183 ]])],[
10e56b49 1184 AC_MSG_RESULT([yes])
034d378b 1185 AC_DEFINE([HAVE_FALLOCATE], [1], [Have valid fallocate() function])],[
10e56b49 1186 AC_MSG_RESULT([no])])
3013eb9d 1187])
10e56b49 1188
19a224ad 1189
a2ea6670
KZ
1190AC_ARG_ENABLE([unshare],
1191 AS_HELP_STRING([--disable-unshare], [do not build unshare]),
08b1c219 1192 [], [UL_DEFAULT_ENABLE([unshare], [check])]
a2ea6670 1193)
61a074f7 1194UL_BUILD_INIT([unshare])
a2ea6670
KZ
1195UL_REQUIRES_LINUX([unshare])
1196UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
034d378b 1197AM_CONDITIONAL([BUILD_UNSHARE], [test "x$build_unshare" = xyes])
bdd384d1 1198AC_CHECK_FUNCS([unshare])
b3425806 1199
f8aa8e94
EB
1200AC_ARG_ENABLE([nsenter],
1201 AS_HELP_STRING([--disable-nsenter], [do not build nsenter]),
08b1c219 1202 [], [UL_DEFAULT_ENABLE([nsenter], [check])]
f8aa8e94
EB
1203)
1204UL_BUILD_INIT([nsenter])
1205UL_REQUIRES_LINUX([nsenter])
6cd4beac 1206UL_REQUIRES_SYSCALL_CHECK([nsenter], [UL_CHECK_SYSCALL([setns])], [setns])
034d378b 1207AM_CONDITIONAL([BUILD_NSENTER], [test "x$build_nsenter" = xyes])
bdd384d1 1208AC_CHECK_FUNCS([setns])
b3425806 1209
17d71034
KZ
1210
1211AC_ARG_WITH([cap_ng],
801afcb0 1212 AS_HELP_STRING([--without-cap-ng], [compile without libcap-ng]),
17d71034
KZ
1213 [], [with_cap_ng=auto]
1214)
801afcb0
MF
1215AS_IF([test "x$with_cap_ng" = xno], [
1216 AM_CONDITIONAL([HAVE_CAP_NG], [false])
1217 have_cap_ng=no
1218],[
17d71034
KZ
1219 UL_CHECK_LIB([cap-ng], [capng_apply], [cap_ng])
1220])
1221
1222
5600c405
AL
1223AC_ARG_ENABLE([setpriv],
1224 AS_HELP_STRING([--disable-setpriv], [do not build setpriv]),
08b1c219 1225 [], [UL_DEFAULT_ENABLE([setpriv], [check])]
5600c405
AL
1226)
1227UL_BUILD_INIT([setpriv])
1228UL_REQUIRES_LINUX([setpriv])
48469f90 1229UL_REQUIRES_HAVE([setpriv], [linux_securebits_h], [securebits.h header file])
e1b8ba20 1230UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
034d378b 1231AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes])
5600c405
AL
1232
1233
539feec1
ML
1234AC_ARG_ENABLE([eject],
1235 AS_HELP_STRING([--disable-eject], [do not build eject]),
08b1c219 1236 [], [UL_DEFAULT_ENABLE([eject], [check])]
539feec1
ML
1237)
1238UL_BUILD_INIT([eject])
1239UL_REQUIRES_LINUX([eject])
7770e7df 1240UL_REQUIRES_BUILD([eject], [libmount])
034d378b 1241AM_CONDITIONAL([BUILD_EJECT], [test "x$build_eject" = xyes])
539feec1
ML
1242
1243
48d7b13a 1244AC_ARG_ENABLE([agetty],
7fa4f112 1245 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
d00c10ed 1246 [], [UL_DEFAULT_ENABLE([agetty], [check])]
48d7b13a 1247)
61a074f7 1248UL_BUILD_INIT([agetty])
d00c10ed 1249UL_REQUIRES_HAVE([agetty], [utmp_h], [utmp.h header])
034d378b 1250AM_CONDITIONAL([BUILD_AGETTY], [test "x$build_agetty" = xyes])
90d5285d
KZ
1251AS_IF([test "x$have_futimens" = xyes -a "x$have_inotify_init1" = xyes ], [
1252 AC_DEFINE([AGETTY_RELOAD], [1], [Enable agetty --reload feature])
1253],[
1254 AC_MSG_WARN([futimens or inotify_init1 not found; agetty(8) will not provide ---reload functionality])
1255])
0fc74be1 1256
48d7b13a 1257
1eb16fd7
KZ
1258AC_ARG_ENABLE([plymouth_support],
1259 AS_HELP_STRING([--disable-plymouth_support], [don not care about plymouth in sylogin(8) and agetty(8)]),
d67f61c0 1260 [], [enable_plymouth_support=check]
1eb16fd7
KZ
1261)
1262UL_BUILD_INIT([plymouth_support])
1263UL_REQUIRES_HAVE([plymouth_support], [tiocglcktrmios], [TIOCGLCKTRMIOS flag])
1264UL_REQUIRES_HAVE([plymouth_support], [sock_cloexec], [SOCK_CLOEXEC flag])
1265UL_REQUIRES_HAVE([plymouth_support], [sock_nonblock], [SOCK_NONBLOCK flag])
1266UL_REQUIRES_HAVE([plymouth_support], [so_passcred], [SO_PASSCRED flag])
1267AM_CONDITIONAL([USE_PLYMOUTH_SUPPORT], [test "x$build_plymouth_support" = xyes])
1268AS_IF([test "x$build_plymouth_support" = xyes ], [
1269 AC_DEFINE([USE_PLYMOUTH_SUPPORT], [1], [Enable plymouth support feature for sulogin and aggety])
1270])
1271
1272
17d71034
KZ
1273AC_ARG_WITH([libz],
1274 AS_HELP_STRING([--without-libz], [compile without libz]),
1275 [], [with_libz=auto]
1276)
1277AS_IF([test "x$with_libz" = xno], [have_z=no], [
1278 AC_CHECK_LIB([z], [crc32], [have_z=yes], [have_z=no])
1279])
1280
1281
9cb68977 1282AC_ARG_ENABLE([cramfs],
7fa4f112 1283 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
08b1c219 1284 [], [UL_DEFAULT_ENABLE([cramfs], [check])]
9cb68977 1285)
61a074f7 1286UL_BUILD_INIT([cramfs])
d81b5a52 1287UL_REQUIRES_HAVE([cramfs], [z], [z library])
034d378b 1288AM_CONDITIONAL([BUILD_CRAMFS], [test "x$build_cramfs" = xyes])
9cb68977 1289
a13cdb7a 1290
8d6f0bae 1291AC_ARG_ENABLE([bfs],
834fc88c 1292 AS_HELP_STRING([--disable-bfs], [do not build mkfs.bfs]),
08b1c219 1293 [], [UL_DEFAULT_ENABLE([bfs], [yes])]
834fc88c
KZ
1294)
1295UL_BUILD_INIT([bfs])
034d378b 1296AM_CONDITIONAL([BUILD_BFS], [test "x$build_bfs" = xyes])
834fc88c
KZ
1297
1298
3d9fdac5
KZ
1299AC_ARG_ENABLE([minix],
1300 AS_HELP_STRING([--disable-minix], [do not build fsck.minix, mkfs.minix]),
08b1c219 1301 [], [UL_DEFAULT_ENABLE([minix], [yes])]
3d9fdac5
KZ
1302)
1303UL_BUILD_INIT([minix])
1304AM_CONDITIONAL([BUILD_MINIX], [test "x$build_minix" = xyes])
1305
1306
8d6f0bae
KZ
1307AC_ARG_ENABLE([fdformat],
1308 AS_HELP_STRING([--disable-fdformat], [do not build fdformat]),
08b1c219 1309 [], [UL_DEFAULT_ENABLE([fdformat], [check])]
8d6f0bae
KZ
1310)
1311UL_BUILD_INIT([fdformat])
1312UL_REQUIRES_LINUX([fdformat])
034d378b 1313AM_CONDITIONAL([BUILD_FDFORMAT], [test "x$build_fdformat" = xyes])
8d6f0bae
KZ
1314
1315
6acf31ac
KZ
1316AC_ARG_ENABLE([hwclock],
1317 AS_HELP_STRING([--disable-hwclock], [do not build hwclock]),
08b1c219 1318 [], [UL_DEFAULT_ENABLE([hwclock], [check])]
6acf31ac
KZ
1319)
1320have_linuxdummy=$linux_os
1321
1322UL_BUILD_INIT([hwclock])
1323UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])
034d378b 1324AM_CONDITIONAL([BUILD_HWCLOCK], [test "x$build_hwclock" = xyes])
e09ebf22
KZ
1325
1326
ecc6047e
KZ
1327UL_BUILD_INIT([mkfs], [yes])
1328AM_CONDITIONAL([BUILD_MKFS], [test "x$build_mkfs" = xyes])
1329
1330UL_BUILD_INIT([isosize], [yes])
1331AM_CONDITIONAL([BUILD_ISOSIZE], [test "x$build_isosize" = xyes])
1332
3d9fdac5 1333
7b040214
KZ
1334UL_BUILD_INIT([fstrim], [check])
1335UL_REQUIRES_LINUX([fstrim])
1336UL_REQUIRES_BUILD([fstrim], [libmount])
1337AM_CONDITIONAL([BUILD_FSTRIM], [test "x$build_fstrim" = xyes])
1338
1339
143635c9
KZ
1340UL_BUILD_INIT([swapon], [check])
1341UL_REQUIRES_LINUX([swapon])
1342UL_REQUIRES_BUILD([swapon], [libblkid])
7770e7df 1343UL_REQUIRES_BUILD([swapon], [libmount])
7477f356 1344UL_REQUIRES_BUILD([swapon], [libsmartcols])
034d378b 1345AM_CONDITIONAL([BUILD_SWAPON], [test "x$build_swapon" = xyes])
143635c9
KZ
1346
1347
61a074f7 1348UL_BUILD_INIT([lsblk], [check])
a13cdb7a
KZ
1349UL_REQUIRES_LINUX([lsblk])
1350UL_REQUIRES_BUILD([lsblk], [libblkid])
9554f7ab 1351UL_REQUIRES_BUILD([lsblk], [libmount])
7477f356 1352UL_REQUIRES_BUILD([lsblk], [libsmartcols])
034d378b 1353AM_CONDITIONAL([BUILD_LSBLK], [test "x$build_lsblk" = xyes])
9cb68977 1354
a3d3b770 1355
61a074f7 1356UL_BUILD_INIT([lscpu], [check])
da396d88 1357UL_REQUIRES_LINUX([lscpu])
7477f356 1358UL_REQUIRES_BUILD([lscpu], [libsmartcols])
da396d88 1359UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
034d378b 1360AM_CONDITIONAL([BUILD_LSCPU], [test "x$build_lscpu" = xyes])
da396d88 1361
a3d3b770 1362
50e6f15b
RM
1363AC_ARG_ENABLE([lslogins],
1364 AS_HELP_STRING([--disable-lslogins], [do not build lslogins]),
1365 [], [UL_DEFAULT_ENABLE([lslogins], [check])]
1366)
1367UL_BUILD_INIT([lslogins])
ab1cfad5 1368UL_REQUIRES_BUILD([lslogins], [libsmartcols])
d00c10ed
RM
1369UL_REQUIRES_HAVE([lslogins], [shadow_h], [shadow.h header])
1370UL_REQUIRES_HAVE([lslogins], [utmp_h], [utmp.h header])
ab1cfad5
OO
1371AM_CONDITIONAL([BUILD_LSLOGINS], [test "x$build_lslogins" = xyes])
1372
1373
61a074f7 1374UL_BUILD_INIT([chcpu], [check])
da396d88
KZ
1375UL_REQUIRES_LINUX([chcpu])
1376UL_REQUIRES_HAVE([chcpu], [cpu_set_t], [cpu_set_t type])
034d378b 1377AM_CONDITIONAL([BUILD_CHCPU], [test "x$build_chcpu" = xyes])
da396d88 1378
a13cdb7a 1379
7fcccbdf
KZ
1380AC_ARG_ENABLE([wdctl],
1381 AS_HELP_STRING([--disable-wdctl], [do not build wdctl]),
08b1c219 1382 [], [UL_DEFAULT_ENABLE([wdctl], [check])]
7fcccbdf
KZ
1383)
1384UL_BUILD_INIT([wdctl])
5b0289b9 1385UL_REQUIRES_LINUX([wdctl])
7477f356 1386UL_REQUIRES_BUILD([wdctl], [libsmartcols])
5b0289b9 1387UL_REQUIRES_HAVE([wdctl], [linux_watchdog_h], [linux/watchdog.h header file])
034d378b 1388AM_CONDITIONAL([BUILD_WDCTL], [test "x$build_wdctl" = xyes])
5b0289b9
KZ
1389
1390
54dbc8cf
KZ
1391UL_BUILD_INIT([swaplabel], [check])
1392UL_REQUIRES_BUILD([swaplabel], [libblkid])
034d378b 1393AM_CONDITIONAL([BUILD_SWAPLABEL], [test "x$build_swaplabel" = xyes])
54dbc8cf
KZ
1394
1395
ecc6047e
KZ
1396UL_BUILD_INIT([mkswap], [yes])
1397AM_CONDITIONAL([BUILD_MKSWAP], [test "x$build_mkswap" = xyes])
08b1c219
KZ
1398AS_IF([test "x$build_mkswap" = xyes -a "x$build_libuuid" != xyes], [
1399 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
1400])
ecc6047e 1401
328eb445
KZ
1402
1403AC_ARG_ENABLE([cal],
1404 AS_HELP_STRING([--disable-cal], [do not build cal]),
1405 [], [UL_DEFAULT_ENABLE([cal], [check])]
1406)
1407UL_BUILD_INIT([cal])
1b15cbd1
KZ
1408AM_CONDITIONAL([BUILD_CAL], [test "x$build_cal" = xyes])
1409
50e6f15b
RM
1410AC_ARG_ENABLE([logger],
1411 AS_HELP_STRING([--disable-logger], [do not build logger]),
1412 [], [UL_DEFAULT_ENABLE([logger], [check])]
1413)
1414UL_BUILD_INIT([logger])
1b15cbd1
KZ
1415AM_CONDITIONAL([BUILD_LOGGER], [test "x$build_logger" = xyes])
1416
4c838e6c 1417UL_BUILD_INIT([look], [yes])
1b15cbd1
KZ
1418AM_CONDITIONAL([BUILD_LOOK], [test "x$build_look" = xyes])
1419
1420UL_BUILD_INIT([mcookie], [yes])
1421AM_CONDITIONAL([BUILD_MCOOKIE], [test "x$build_mcookie" = xyes])
1422
1423UL_BUILD_INIT([namei], [yes])
1424AM_CONDITIONAL([BUILD_NAMEI], [test "x$build_namei" = xyes])
1425
1426UL_BUILD_INIT([whereis], [yes])
1427AM_CONDITIONAL([BUILD_WHEREIS], [test "x$build_whereis" = xyes])
1428
3adaaa15
KZ
1429UL_BUILD_INIT([getopt], [yes])
1430AM_CONDITIONAL([BUILD_GETOPT], [test "x$build_getopt" = xyes])
1431
ecc6047e
KZ
1432
1433UL_BUILD_INIT([blockdev], [check])
1434UL_REQUIRES_LINUX([blockdev])
1435AM_CONDITIONAL([BUILD_BLOCKDEV], [test "x$build_blockdev" = xyes])
1436
1437
945ac250
KZ
1438UL_BUILD_INIT([prlimit], [check])
1439UL_REQUIRES_LINUX([prlimit])
7477f356 1440UL_REQUIRES_BUILD([prlimit], [libsmartcols])
945ac250 1441UL_REQUIRES_SYSCALL_CHECK([prlimit], [UL_CHECK_SYSCALL([prlimit64])], [prlimit64])
034d378b 1442AM_CONDITIONAL([BUILD_PRLIMIT], [test "x$build_prlimit" = xyes])
3013eb9d 1443AS_IF([test "x$build_prlimit" = xyes], [
945ac250 1444 AC_CHECK_FUNCS([prlimit])
3013eb9d 1445])
945ac250
KZ
1446
1447
3dc02ef4
DB
1448UL_BUILD_INIT([lslocks], [check])
1449UL_REQUIRES_LINUX([lslocks])
ec1204dc 1450UL_REQUIRES_BUILD([lslocks], [libmount])
7477f356 1451UL_REQUIRES_BUILD([lslocks], [libsmartcols])
034d378b 1452AM_CONDITIONAL([BUILD_LSLOCKS], [test "x$build_lslocks" = xyes])
3dc02ef4
DB
1453
1454
bd671347
KZ
1455AC_ARG_ENABLE([switch_root],
1456 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
08b1c219 1457 [], [UL_DEFAULT_ENABLE([switch_root], [check])]
bd671347 1458)
61a074f7 1459UL_BUILD_INIT([switch_root])
a3d3b770
KZ
1460UL_REQUIRES_LINUX([switch_root])
1461UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
034d378b 1462AM_CONDITIONAL([BUILD_SWITCH_ROOT], [test "x$build_switch_root" = xyes])
bd671347
KZ
1463
1464
11125e7a
KZ
1465AC_ARG_ENABLE([pivot_root],
1466 AS_HELP_STRING([--disable-pivot_root], [do not build pivot_root]),
08b1c219 1467 [], [UL_DEFAULT_ENABLE([pivot_root], [check])]
11125e7a 1468)
61a074f7 1469UL_BUILD_INIT([pivot_root])
5cbbdfbf 1470UL_REQUIRES_LINUX([pivot_root])
9f632667 1471UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
034d378b 1472AM_CONDITIONAL([BUILD_PIVOT_ROOT], [test "x$build_pivot_root" = xyes])
11125e7a
KZ
1473
1474
c12fc5e1 1475UL_BUILD_INIT([flock], [check])
254743e4 1476UL_REQUIRES_HAVE([flock], [timer], [timer_create function])
205dbb7a
KZ
1477AM_CONDITIONAL([BUILD_FLOCK], [test "x$build_flock" = xyes])
1478
1479UL_BUILD_INIT([ipcmk], [yes])
1480AM_CONDITIONAL([BUILD_IPCMK], [test "x$build_ipcmk" = xyes])
1481
42a4a152
RM
1482AC_ARG_ENABLE([ipcrm],
1483 AS_HELP_STRING([--disable-ipcrm], [do not build ipcrm]),
1484 [], [UL_DEFAULT_ENABLE([ipcrm], [yes])]
1485)
1486UL_BUILD_INIT([ipcrm])
205dbb7a
KZ
1487AM_CONDITIONAL([BUILD_IPCRM], [test "x$build_ipcrm" = xyes])
1488
42a4a152
RM
1489AC_ARG_ENABLE([ipcs],
1490 AS_HELP_STRING([--disable-ipcs], [do not build ipcs]),
1491 [], [UL_DEFAULT_ENABLE([ipcs], [yes])]
1492)
1493UL_BUILD_INIT([ipcs])
205dbb7a
KZ
1494AM_CONDITIONAL([BUILD_IPCS], [test "x$build_ipcs" = xyes])
1495
9d20ffda
KZ
1496UL_BUILD_INIT([lsipc], [check])
1497UL_REQUIRES_LINUX([lsipc])
1498UL_REQUIRES_BUILD([lsipc], [libsmartcols])
1499AM_CONDITIONAL([BUILD_LSIPC], [test "x$build_lsipc" = xyes])
1500
8a204562
KZ
1501UL_BUILD_INIT([lsns], [check])
1502UL_REQUIRES_LINUX([lsns])
1503UL_REQUIRES_BUILD([lsns], [libsmartcols])
1504AM_CONDITIONAL([BUILD_LSNS], [test "x$build_lsns" = xyes])
1505
205dbb7a
KZ
1506UL_BUILD_INIT([renice], [yes])
1507AM_CONDITIONAL([BUILD_RENICE], [test "x$build_renice" = xyes])
1508
1509UL_BUILD_INIT([setsid], [yes])
1510AM_CONDITIONAL([BUILD_SETSID], [test "x$build_setsid" = xyes])
1511
1512UL_BUILD_INIT([readprofile], [check])
1513UL_REQUIRES_LINUX([readprofile])
1514AM_CONDITIONAL([BUILD_READPROFILE], [test "x$build_readprofile" = xyes])
1515
1516UL_BUILD_INIT([dmesg], [check])
1517UL_REQUIRES_LINUX([dmesg])
1518AM_CONDITIONAL([BUILD_DMESG], [test "x$build_dmesg" = xyes])
1519
1520UL_BUILD_INIT([ctrlaltdel], [check])
1521UL_REQUIRES_LINUX([ctrlaltdel])
e52b58e6
CTV
1522dnl we assume reboot() to be the 1-argument variant, because even considering
1523dnl widely used alternative C libraries like uclibc, dietlibc and musl,
1524dnl reboot() with multiple arguments is yet only found in glibc versions
1525dnl earlier than 2.x.
9dd55a04 1526UL_REQUIRES_HAVE([ctrlaltdel], [reboot], [reboot function])
205dbb7a
KZ
1527AM_CONDITIONAL([BUILD_CTRLALTDEL], [test "x$build_ctrlaltdel" = xyes])
1528
1529UL_BUILD_INIT([fsfreeze], [check])
1530UL_REQUIRES_LINUX([fsfreeze])
1531AM_CONDITIONAL([BUILD_FSFREEZE], [test "x$build_fsfreeze" = xyes])
1532
1533UL_BUILD_INIT([blkdiscard], [check])
1534UL_REQUIRES_LINUX([blkdiscard])
1535AM_CONDITIONAL([BUILD_BLKDISCARD], [test "x$build_blkdiscard" = xyes])
1536
1537UL_BUILD_INIT([ldattach], [check])
1538UL_REQUIRES_LINUX([ldattach])
1539AM_CONDITIONAL([BUILD_LDATTACH], [test "x$build_ldattach" = xyes])
1540
1541UL_BUILD_INIT([rtcwake], [check])
1542UL_REQUIRES_LINUX([rtcwake])
1543AM_CONDITIONAL([BUILD_RTCWAKE], [test "x$build_rtcwake" = xyes])
1544
1545UL_BUILD_INIT([setarch], [check])
1546UL_REQUIRES_LINUX([setarch])
1547AM_CONDITIONAL([BUILD_SETARCH], [test "x$build_setarch" = xyes])
1548
d3a1e3bf 1549UL_BUILD_INIT([script], [check])
651b25cd 1550UL_REQUIRES_HAVE([script], [sys_signalfd_h], [sys/signalfd.h header])
3f91b990
KZ
1551AM_CONDITIONAL([BUILD_SCRIPT], [test "x$build_script" = xyes])
1552
1553UL_BUILD_INIT([scriptreplay], [yes])
1554AM_CONDITIONAL([BUILD_SCRIPTREPLAY], [test "x$build_scriptreplay" = xyes])
1555
cb45354e
KZ
1556UL_BUILD_INIT([col], [yes])
1557AM_CONDITIONAL([BUILD_COL], [test "x$build_col" = xyes])
1558
1559UL_BUILD_INIT([colcrt], [yes])
1560AM_CONDITIONAL([BUILD_COLCRT], [test "x$build_colcrt" = xyes])
1561
1562UL_BUILD_INIT([colrm], [yes])
1563AM_CONDITIONAL([BUILD_COLRM], [test "x$build_colrm" = xyes])
1564
1565UL_BUILD_INIT([column], [yes])
1566AM_CONDITIONAL([BUILD_COLUMN], [test "x$build_column" = xyes])
1567
1568UL_BUILD_INIT([hexdump], [yes])
1569AM_CONDITIONAL([BUILD_HEXDUMP], [test "x$build_hexdump" = xyes])
1570
1571UL_BUILD_INIT([rev], [yes])
1572AM_CONDITIONAL([BUILD_REV], [test "x$build_rev" = xyes])
1573
1574UL_BUILD_INIT([tailf], [yes])
1575AM_CONDITIONAL([BUILD_TAILF], [test "x$build_tailf" = xyes])
1576
3f91b990 1577
1342ffcb
SK
1578AC_ARG_ENABLE([tunelp],
1579 AS_HELP_STRING([--enable-tunelp], [build tunelp]),
08b1c219 1580 [], [UL_DEFAULT_ENABLE([tunelp], [no])]
1342ffcb
SK
1581)
1582UL_BUILD_INIT([tunelp])
1583UL_REQUIRES_LINUX([tunelp])
034d378b 1584AM_CONDITIONAL([BUILD_TUNELP], [test "x$build_tunelp" = xyes])
1342ffcb
SK
1585
1586
48d7b13a 1587AC_ARG_ENABLE([kill],
4be753aa 1588 AS_HELP_STRING([--disable-kill], [do not build kill]),
08b1c219 1589 [], [UL_DEFAULT_ENABLE([kill], [check])]
48d7b13a 1590)
61a074f7 1591UL_BUILD_INIT([kill])
4be753aa 1592UL_REQUIRES_LINUX([kill])
034d378b 1593AM_CONDITIONAL([BUILD_KILL], [test "x$build_kill" = xyes])
48d7b13a 1594
ce602720 1595
48d7b13a 1596AC_ARG_ENABLE([last],
ce602720 1597 AS_HELP_STRING([--disable-last], [do not build last]),
08b1c219 1598 [], [UL_DEFAULT_ENABLE([last], [check])]
48d7b13a 1599)
61a074f7 1600UL_BUILD_INIT([last])
d00c10ed 1601UL_REQUIRES_HAVE([last], [utmp_h], [utmp.h header])
034d378b 1602AM_CONDITIONAL([BUILD_LAST], [test "x$build_last" = xyes])
2dc68529 1603
48d7b13a 1604
78d5ceac 1605AC_ARG_ENABLE([utmpdump],
c9b53461 1606 AS_HELP_STRING([--disable-utmpdump], [do not build utmpdump]),
d00c10ed 1607 [], [UL_DEFAULT_ENABLE([utmpdump], [check])]
78d5ceac
KZ
1608)
1609UL_BUILD_INIT([utmpdump])
d00c10ed 1610UL_REQUIRES_HAVE([utmpdump], [utmp_h], [utmp.h header])
034d378b 1611AM_CONDITIONAL([BUILD_UTMPDUMP], [test "x$build_utmpdump" = xyes])
78d5ceac
KZ
1612
1613
c135a8bd
SK
1614AC_ARG_ENABLE([line],
1615 AS_HELP_STRING([--enable-line], [build line]),
08b1c219 1616 [], [UL_DEFAULT_ENABLE([line], [no])]
c135a8bd 1617)
61a074f7 1618UL_BUILD_INIT([line])
034d378b 1619AM_CONDITIONAL([BUILD_LINE], [test "x$build_line" = xyes])
2dc68529 1620
48d7b13a
KZ
1621
1622AC_ARG_ENABLE([mesg],
5c0b406d 1623 AS_HELP_STRING([--disable-mesg], [do not build mesg]),
08b1c219 1624 [], [UL_DEFAULT_ENABLE([mesg], [yes])]
48d7b13a 1625)
61a074f7 1626UL_BUILD_INIT([mesg])
034d378b 1627AM_CONDITIONAL([BUILD_MESG], [test "x$build_mesg" = xyes])
48d7b13a
KZ
1628
1629
48d7b13a 1630AC_ARG_ENABLE([raw],
5c0b406d 1631 AS_HELP_STRING([--disable-raw], [do not build raw]),
08b1c219 1632 [], [UL_DEFAULT_ENABLE([raw], [check])]
48d7b13a 1633)
61a074f7 1634UL_BUILD_INIT([raw])
16ba8d58
KZ
1635UL_REQUIRES_LINUX([raw])
1636UL_REQUIRES_HAVE([raw], [linux_raw_h], [raw.h header file])
034d378b 1637AM_CONDITIONAL([BUILD_RAW], [test "x$build_raw" = xyes])
48d7b13a
KZ
1638
1639
48d7b13a 1640AC_ARG_ENABLE([rename],
7fa4f112 1641 AS_HELP_STRING([--disable-rename], [do not build rename]),
08b1c219 1642 [], [UL_DEFAULT_ENABLE([rename], [yes])]
48d7b13a 1643)
61a074f7 1644UL_BUILD_INIT([rename])
034d378b 1645AM_CONDITIONAL([BUILD_RENAME], [test "x$build_rename" = xyes])
48d7b13a
KZ
1646
1647
1648AC_ARG_ENABLE([reset],
7fa4f112 1649 AS_HELP_STRING([--enable-reset], [build reset]),
08b1c219 1650 [], [UL_DEFAULT_ENABLE([reset], [no])]
48d7b13a 1651)
61a074f7 1652UL_BUILD_INIT([reset])
034d378b 1653AM_CONDITIONAL([BUILD_RESET], [test "x$build_reset" = xyes])
48d7b13a
KZ
1654
1655
cc76731e
KZ
1656AC_ARG_ENABLE([vipw],
1657 AS_HELP_STRING([--enable-vipw], [build vipw]),
08b1c219 1658 [], [UL_DEFAULT_ENABLE([vipw], [no])]
48d7b13a 1659)
cc76731e 1660UL_BUILD_INIT([vipw])
d00c10ed 1661UL_REQUIRES_HAVE([vipw], [shadow_h], [shadow.h header])
034d378b 1662AM_CONDITIONAL([BUILD_VIPW], [test "x$build_vipw" = xyes])
9cb68977 1663
c94b3604 1664
aec9ecbd
KZ
1665AC_ARG_ENABLE([newgrp],
1666 AS_HELP_STRING([--enable-newgrp], [build newgrp]),
08b1c219 1667 [], [UL_DEFAULT_ENABLE([newgrp], [no])]
aec9ecbd
KZ
1668)
1669UL_BUILD_INIT([newgrp])
034d378b 1670AM_CONDITIONAL([BUILD_NEWGRP], [test "x$build_newgrp" = xyes])
aec9ecbd
KZ
1671
1672
d86918b6 1673AC_ARG_WITH([user], AS_HELP_STRING([--without-user], [compile without libuser (remote chsh)]),
034d378b 1674 [], [with_user=check]
7e4714f2 1675)
6e93c52f 1676have_user=no
3013eb9d 1677AS_IF([test "x$with_user" != xno], [
2771954b 1678 PKG_CHECK_MODULES(LIBUSER,[libuser >= 0.58], [have_user=yes], [have_user=no])
9f57e6e8
SK
1679 AS_CASE([$with_user:$have_user],
1680 [yes:no],
1681 [AC_MSG_ERROR([user selected but libuser not found])],
1682 [*:yes],
1683 [AC_DEFINE([HAVE_LIBUSER], [1], [Define if libuser is available])]
1684 )
1f6ec24c
KZ
1685 # temporary solution, libuser has stupid .pc where are exported all
1686 # private dependencies to Requires: instead of Requires.private:
3013eb9d 1687 AS_IF([test "x$have_user" = xyes], [
1f6ec24c 1688 LIBUSER_LIBS=-luser
3013eb9d
SK
1689 ])
1690])
034d378b 1691AM_CONDITIONAL([HAVE_USER], [test "x$have_user" = xyes])
7e4714f2 1692
d86918b6
KZ
1693AC_ARG_ENABLE([chfn-chsh-password],
1694 AS_HELP_STRING([--disable-chfn-chsh-password], [do not require the user to enter the password in chfn and chsh]),
034d378b 1695 [], [enable_chfn_chsh_password=yes]
d86918b6
KZ
1696)
1697
1698AC_ARG_ENABLE([chfn-chsh],
1699 AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]),
9a4e9c9d 1700 [], [UL_DEFAULT_ENABLE([chfn_chsh], [check])]
d86918b6
KZ
1701)
1702UL_BUILD_INIT([chfn_chsh])
d00c10ed 1703UL_REQUIRES_HAVE([chfn_chsh], [shadow_h], [shadow.h header])
d86918b6 1704
3013eb9d 1705AS_IF([test "x$enable_chfn_chsh_password" = xyes -o "x$have_user" = xyes], [
fe2c9909 1706 UL_REQUIRES_HAVE([chfn_chsh], [security_pam_appl_h], [PAM header file])
034d378b 1707 AC_DEFINE([CHFN_CHSH_PASSWORD], [1], [Should chfn and chsh require the user to enter the password?])
3013eb9d 1708])
034d378b
SK
1709AM_CONDITIONAL([BUILD_CHFN_CHSH], [test "x$build_chfn_chsh" = xyes])
1710AM_CONDITIONAL([CHFN_CHSH_PASSWORD], [test "x$enable_chfn_chsh_password" = xyes])
d86918b6
KZ
1711
1712AC_ARG_ENABLE([chsh-only-listed],
5c0b406d
BS
1713 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
1714 [], enable_chsh_only_listed=yes
d86918b6 1715)
7e4714f2 1716
3013eb9d
SK
1717AS_IF([test "x$enable_chsh_only_listed" = xyes], [
1718 AC_DEFINE([ONLY_LISTED_SHELLS], [1], [Should chsh allow only shells in /etc/shells?])
1719])
71681ee5 1720
2c8a3e16 1721
e7614a07
KZ
1722AC_ARG_ENABLE([login],
1723 AS_HELP_STRING([--disable-login], [do not build login]),
08b1c219 1724 [], [UL_DEFAULT_ENABLE([login], [check])]
e7614a07
KZ
1725)
1726UL_BUILD_INIT([login])
fe2c9909
WJ
1727UL_REQUIRES_HAVE([login], [security_pam_appl_h], [PAM header file])
1728UL_REQUIRES_HAVE([login], [security_pam_misc_h, security_openpam_h], [PAM conversation functions])
d00c10ed 1729UL_REQUIRES_HAVE([login], [utmp_h], [utmp.h header])
034d378b 1730AM_CONDITIONAL([BUILD_LOGIN], [test "x$build_login" = xyes])
e7614a07 1731
71681ee5
KZ
1732AC_ARG_ENABLE([login-chown-vcs],
1733 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
034d378b 1734 [], [enable_login_chown_vcs=no]
71681ee5
KZ
1735)
1736
3013eb9d 1737AS_IF([test "x$enable_login_chown_vcs" = xyes], [
034d378b 1738 AC_DEFINE([LOGIN_CHOWN_VCS], [1], [Should login chown /dev/vcsN?])
3013eb9d 1739])
71681ee5
KZ
1740
1741AC_ARG_ENABLE([login-stat-mail],
1742 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
034d378b 1743 [], [enable_login_stat_mail=no]
71681ee5
KZ
1744)
1745
3013eb9d 1746AS_IF([test "x$enable_login_stat_mail" = xyes], [
034d378b 1747 AC_DEFINE([LOGIN_STAT_MAIL], [1], [Should login stat() the mailbox?])
3013eb9d 1748])
71681ee5 1749
e7614a07 1750
88407b93
KZ
1751AC_ARG_ENABLE([nologin],
1752 AS_HELP_STRING([--disable-nologin], [do not build nologin]),
08b1c219 1753 [], [UL_DEFAULT_ENABLE([nologin], [yes])]
88407b93
KZ
1754)
1755UL_BUILD_INIT([nologin])
1756AM_CONDITIONAL([BUILD_NOLOGIN], [test "x$build_nologin" = xyes])
1757
1758
e7614a07
KZ
1759AC_ARG_ENABLE([sulogin],
1760 AS_HELP_STRING([--disable-sulogin], [do not build sulogin]),
d00c10ed 1761 [], [UL_DEFAULT_ENABLE([sulogin], [check])]
e7614a07
KZ
1762)
1763UL_BUILD_INIT([sulogin])
d00c10ed 1764UL_REQUIRES_HAVE([sulogin], [shadow_h], [shadow.h header])
034d378b 1765AM_CONDITIONAL([BUILD_SULOGIN], [test "x$build_sulogin" = xyes])
e7614a07 1766
f17f5f48 1767
ff4c5555
KZ
1768AC_ARG_ENABLE([su],
1769 AS_HELP_STRING([--disable-su], [do not build su]),
08b1c219 1770 [], [UL_DEFAULT_ENABLE([su], [check])]
ff4c5555
KZ
1771)
1772UL_BUILD_INIT([su])
fe2c9909 1773UL_REQUIRES_HAVE([su], [security_pam_appl_h], [PAM header file])
d00c10ed 1774UL_REQUIRES_HAVE([su], [utmp_h], [utmp.h header])
034d378b 1775AM_CONDITIONAL([BUILD_SU], [test "x$build_su" = xyes])
ff4c5555
KZ
1776
1777
7ec6adb1
KZ
1778AC_ARG_ENABLE([runuser],
1779 AS_HELP_STRING([--disable-runuser], [do not build runuser]),
08b1c219 1780 [], [UL_DEFAULT_ENABLE([runuser], [check])]
7ec6adb1
KZ
1781)
1782UL_BUILD_INIT([runuser])
fe2c9909 1783UL_REQUIRES_HAVE([runuser], [security_pam_appl_h], [PAM header file])
d00c10ed 1784UL_REQUIRES_HAVE([runuser], [utmp_h], [utmp.h header])
034d378b 1785AM_CONDITIONAL([BUILD_RUNUSER], [test "x$build_runuser" = xyes])
7ec6adb1
KZ
1786
1787
53b22add
KZ
1788AC_ARG_ENABLE([ul],
1789 AS_HELP_STRING([--disable-ul], [do not build ul]),
08b1c219 1790 [], [UL_DEFAULT_ENABLE([ul], [check])]
53b22add
KZ
1791)
1792UL_BUILD_INIT([ul])
4ffcc7a9 1793UL_REQUIRES_HAVE([ul], [ncursesw, tinfo, ncurses], [ncursesw, ncurses or tinfo libraries])
034d378b 1794AM_CONDITIONAL([BUILD_UL], [test "x$build_ul" = xyes])
53b22add
KZ
1795
1796
1797AC_ARG_ENABLE([more],
1798 AS_HELP_STRING([--disable-more], [do not build more]),
08b1c219 1799 [], [UL_DEFAULT_ENABLE([more], [check])]
53b22add
KZ
1800)
1801UL_BUILD_INIT([more])
4ffcc7a9 1802UL_REQUIRES_HAVE([more], [ncursesw, tinfo, ncurses, termcap], [ncursesw, ncurses, tinfo or termcap libraries])
034d378b 1803AM_CONDITIONAL([BUILD_MORE], [test "x$build_more" = xyes])
53b22add
KZ
1804
1805
1806AC_ARG_ENABLE([pg],
00971cca
SK
1807 AS_HELP_STRING([--enable-pg], [build pg]),
1808 [], [UL_DEFAULT_ENABLE([pg], [no])]
53b22add
KZ
1809)
1810UL_BUILD_INIT([pg])
4ffcc7a9 1811UL_REQUIRES_HAVE([pg], [ncursesw, ncurses], [ncurses or ncursesw library])
034d378b 1812AM_CONDITIONAL([BUILD_PG], [test "x$build_pg" = xyes])
53b22add
KZ
1813
1814
d78d0409
KZ
1815AC_ARG_ENABLE([setterm],
1816 AS_HELP_STRING([--disable-setterm], [do not build setterm]),
08b1c219 1817 [], [UL_DEFAULT_ENABLE([setterm], [check])]
d78d0409
KZ
1818)
1819UL_BUILD_INIT([setterm])
1820UL_REQUIRES_LINUX([setterm])
4ffcc7a9 1821UL_REQUIRES_HAVE([setterm], [ncursesw, ncurses], [ncurses or ncurses library])
034d378b 1822AM_CONDITIONAL([BUILD_SETTERM], [test "x$build_setterm" = xyes])
d78d0409 1823
d6ace0b8
KZ
1824# build_schedutils= is just configure-only variable to control
1825# ionice, taskset and chrt
48d7b13a 1826AC_ARG_ENABLE([schedutils],
34228e69 1827 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, taskset]),
08b1c219 1828 [], [UL_DEFAULT_ENABLE([schedutils], [yes])]
48d7b13a 1829)
61a074f7 1830UL_BUILD_INIT([schedutils])
17d5e11b 1831
61a074f7 1832UL_BUILD_INIT([ionice], [check])
17d5e11b
KZ
1833UL_REQUIRES_BUILD([ionice], [schedutils])
1834UL_REQUIRES_SYSCALL_CHECK([ionice],
1835 [UL_CHECK_SYSCALL([ioprio_set],
f06b4328
SK
1836 [alpha], [442],
1837 [i*86], [289],
1838 [ia64*], [1274],
1839 [powerpc*], [273],
1840 [s390*], [282],
1841 [sparc*], [196],
1842 [sh*], [288],
1843 [x86_64*], [251])],
17d5e11b
KZ
1844 [ioprio_set])
1845
1846UL_REQUIRES_SYSCALL_CHECK([ionice],
1847 [UL_CHECK_SYSCALL([ioprio_get],
f06b4328
SK
1848 [alpha], [443],
1849 [i*86], [290],
1850 [ia64*], [1275],
1851 [powerpc*], [274],
1852 [s390*], [283],
1853 [sparc*], [218],
1854 [sh*], [289],
1855 [x86_64*], [252])],
17d5e11b
KZ
1856 [ioprio_get])
1857
034d378b 1858AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes])
17d5e11b 1859
61a074f7 1860UL_BUILD_INIT([taskset], [check])
17d5e11b 1861UL_REQUIRES_BUILD([taskset], [schedutils])
e21e6d26 1862UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
17d5e11b
KZ
1863UL_REQUIRES_SYSCALL_CHECK([taskset],
1864 [UL_CHECK_SYSCALL([sched_getaffinity])],
1865 [sched_getaffinity])
034d378b 1866AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes])
48d7b13a 1867
ee20c303
RM
1868
1869have_schedsetter=no
1870AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
1871 [test "x$ac_cv_func_sched_setattr" = xyes], [have_schedsetter=yes])
1872
d6ace0b8
KZ
1873UL_BUILD_INIT([chrt], [check])
1874UL_REQUIRES_BUILD([chrt], [schedutils])
ee20c303 1875UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
d6ace0b8
KZ
1876AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
1877
15167589
KZ
1878AS_IF([test "x$build_chrt" = xyes], [
1879 UL_CHECK_SYSCALL([sched_setattr])
1880])
1881
48d7b13a
KZ
1882
1883AC_ARG_ENABLE([wall],
7fa4f112 1884 AS_HELP_STRING([--disable-wall], [do not build wall]),
d00c10ed 1885 [], [UL_DEFAULT_ENABLE([wall], [check])]
48d7b13a 1886)
8fc8888b 1887UL_BUILD_INIT([wall])
d00c10ed 1888UL_REQUIRES_HAVE([wall], [utmp_h], [utmp.h header])
034d378b 1889AM_CONDITIONAL([BUILD_WALL], [test "x$build_wall" = xyes])
48d7b13a
KZ
1890
1891
1892AC_ARG_ENABLE([write],
7fa4f112 1893 AS_HELP_STRING([--enable-write], [build write]),
08b1c219 1894 [], [UL_DEFAULT_ENABLE([write], [no])]
48d7b13a 1895)
61a074f7 1896UL_BUILD_INIT([write])
d00c10ed 1897UL_REQUIRES_HAVE([write], [utmp_h], [utmp.h header])
034d378b 1898AM_CONDITIONAL([BUILD_WRITE], [test "x$build_write" = xyes])
48d7b13a
KZ
1899
1900
5a971329
KZ
1901AC_ARG_WITH([btrfs],
1902 AS_HELP_STRING([--with-btrfs], [build with support for btrfs]),
1903 [], [with_btrfs=check]
1904)
1905have_btrfs=no
1906AS_IF([test "x$with_btrfs" != xno], [
1907 AS_CASE([$with_btrfs:$have_linux_btrfs_h],
1908 [yes:no],
1909 [AC_MSG_ERROR([btrfs selected but linux/btrfs.h not found])],
1910 [check:no],
1911 [AC_MSG_WARN([linux/btrfs.h not found, do not build with btrfs support])],
1912 [*:yes],
1913 [have_btrfs=yes
1914 AC_DEFINE([HAVE_BTRFS_SUPPORT], [1], [Define if btrfs stuff is available])]
1915 )
1916])
1917AM_CONDITIONAL([HAVE_BTRFS], [test "x$have_btrfs" = xyes])
1918
1919
ebff016a
KZ
1920AC_ARG_WITH([systemd],
1921 AS_HELP_STRING([--with-systemd], [build with support for systemd]),
1922 [], [with_systemd=check]
1923)
1924
1925have_systemd=no
1926AS_IF([test "x$with_systemd" != xno], [
1927 # new version -- all libsystemd-* libs merged into libsystemd
1928 PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], [have_systemd=no])
1929 # old versions
1930 AS_IF([test "x$have_systemd" != "xyes"], [
1931 PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
1932 [have_systemd_daemon=yes], [have_systemd_daemon=no])
1933 PKG_CHECK_MODULES([SYSTEMD_JOURNAL], [libsystemd-journal],
1934 [have_systemd_journal=yes], [have_systemd_journal=no])
1935 AS_IF([test "x$have_systemd_daemon" = "xyes" -a "x$have_systemd_journal" = "xyes" ],[
1936 have_systemd=yes])
ea45d34c 1937 ])
ebff016a
KZ
1938 AS_CASE([$with_systemd:$have_systemd],
1939 [yes:no],
1940 [AC_MSG_ERROR([systemd expected but libsystemd not found])],
1941 [*:yes],
1942 AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available])
1943 )
3013eb9d 1944])
ebff016a
KZ
1945AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes])
1946
bbe289c4 1947
1b68c379
PU
1948AC_ARG_WITH([systemdsystemunitdir],
1949 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files]),
c8498f2f 1950 [], [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`])
1b68c379 1951
3013eb9d 1952AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
1b68c379 1953 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
3013eb9d 1954])
1b68c379 1955
bbe289c4 1956
b8095d25
KZ
1957AC_ARG_WITH([smack],
1958 AS_HELP_STRING([--with-smack], [build with SMACK support]),
1959 [], [with_smack=no]
1960)
1961AS_IF([test "x$with_smack" = xyes], [
1962 AC_DEFINE([HAVE_SMACK], [1], [Add SMACK support])
1963])
1964
1965
9cc36e9f
SK
1966AC_ARG_WITH([bashcompletiondir],
1967 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
1968 [],
c8498f2f
SK
1969 [AS_IF([`$PKG_CONFIG --exists bash-completion`], [
1970 with_bashcompletiondir=`$PKG_CONFIG --variable=completionsdir bash-completion`
9cc36e9f
SK
1971 ], [
1972 with_bashcompletiondir=${datadir}/bash-completion/completions
1973 ])
1974])
1975AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1976
ece777e9
KZ
1977AC_ARG_ENABLE([bash-completion],
1978 AS_HELP_STRING([--disable-bash-completion], [do not install bash completion files]),
034d378b 1979 [], [enable_bash_completion=yes]
ece777e9
KZ
1980)
1981
034d378b 1982AM_CONDITIONAL([BUILD_BASH_COMPLETION], [test "x$enable_bash_completion" = xyes])
ece777e9 1983
9cc36e9f 1984
d78df0ac 1985AC_ARG_WITH([python],
4c54effb
KZ
1986 AS_HELP_STRING([--without-python], [do not build python bindings, use --with-python={2,3} to force version]),
1987 [], [with_python=check withval=check]
d78df0ac 1988)
8e5c4675 1989
d78df0ac 1990have_python=no
b2ae8c57 1991have_libpython=no
8e5c4675
KZ
1992AS_IF([test "x$with_python" != xno], [
1993 # We follow distributions default and look for PKG module name "python"
1994 # (minimal version is 2) but if major version is explicitly specified by
1995 # --with-python=2 or --with-python=3 then we look for PKG module "python2" or
1996 # "python3".
4c54effb 1997 AS_IF([test "x$withval" != xno -a "x$withval" != xyes -a "x$withval" != xcheck],
0b567ae5 1998 [pymajor="$withval"; PYTHON=python${pymajor}], [pymajor="2"])
b2ae8c57
KZ
1999
2000 # check for python interpreter
0b567ae5 2001 AM_PATH_PYTHON([$pymajor], [have_python=yes], [have_python=no])
8e5c4675
KZ
2002 AS_CASE([$with_python:$have_python],
2003 [yes:no],
b2ae8c57 2004 [AC_MSG_ERROR([python selected but python interpreter not found])],
4c54effb 2005 [check:no],
b2ae8c57 2006 [AC_MSG_WARN([python interpreter not found, do not build python bindings])],
4c54effb 2007 [*:yes],
b2ae8c57
KZ
2008 # check for python development stuff
2009 [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],
2010 [have_libpython=yes], [have_libpython=no])]
8e5c4675 2011 )
d78df0ac
KZ
2012])
2013
da0ec90b
KZ
2014
2015AC_ARG_ENABLE([pylibmount],
2016 AS_HELP_STRING([--disable-pylibmount], [do not build pylibmount]),
2017 [], [UL_DEFAULT_ENABLE([pylibmount], [check])]
2018)
2019UL_BUILD_INIT([pylibmount])
b2ae8c57 2020UL_REQUIRES_HAVE([pylibmount], [libpython], [libpython])
da0ec90b 2021UL_REQUIRES_BUILD([pylibmount], [libmount])
d78df0ac
KZ
2022AM_CONDITIONAL([BUILD_PYLIBMOUNT], [test "x$build_pylibmount" = "xyes"])
2023
324330ac
FB
2024# We need to introduce a verbatim dependency into the Makefile, without automake
2025# trying to interpret it, so push it as a AM_SUBST_NOTMAKE variable.
2026verbatim_pylibmount_dependency='
2027
2028# pylibmountexec module must be installed after usrlib_exec libraries,
2029# otherwise the libtool relink step will fail to find libmount.la and
2030# will try -lmount which is possibly not available.
2031install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES
2032
2033'
2034AC_SUBST([verbatim_pylibmount_dependency])
2035AM_SUBST_NOTMAKE([verbatim_pylibmount_dependency])
d78df0ac 2036
48d7b13a 2037AC_ARG_ENABLE([pg-bell],
7fa4f112 2038 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
034d378b 2039 [], [enable_pg_bell=yes]
48d7b13a
KZ
2040)
2041
3013eb9d 2042AS_IF([test "x$enable_pg_bell" = xyes], [
034d378b 2043 AC_DEFINE([PG_BELL], [1], [Should pg ring the bell on invalid keys?])
3013eb9d 2044])
48d7b13a
KZ
2045
2046
bb4cb69d
MF
2047AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
2048AC_ARG_ENABLE([fs-paths-default],
2049 AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
9f57e6e8
SK
2050 [AS_CASE([$enableval],
2051 [yes], [fs_paths_defaults="FS_PATHS_DEFAULT"],
2052 [no], [fs_paths_defaults=""],
2053 [fs_paths_defaults="$enableval"]
2054 )],
bb4cb69d
MF
2055 [fs_paths_defaults="FS_PATHS_DEFAULT"]
2056)
2057AC_ARG_ENABLE([fs-paths-extra],
2058 AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
9f57e6e8
SK
2059 [AS_CASE([$enableval],
2060 [yes|no], [fs_paths_extra=""],
2061 [fs_paths_extra="$enableval"]
2062 )],
bb4cb69d
MF
2063 [fs_paths_extra=""]
2064)
2065fs_paths="$fs_paths_defaults"
3013eb9d
SK
2066AS_IF([test "x$fs_paths_extra" != "x"], [
2067 AS_IF([test "x$fs_paths" != "x"], [
bb4cb69d 2068 fs_paths="${fs_paths}:"
3013eb9d 2069 ])
bb4cb69d 2070 fs_paths="${fs_paths}${fs_paths_extra}"
3013eb9d 2071])
bb4cb69d
MF
2072AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
2073
2074
48d7b13a 2075AC_ARG_ENABLE([use-tty-group],
7fa4f112 2076 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
034d378b 2077 [], [enable_use_tty_group=yes]
48d7b13a 2078)
034d378b 2079AM_CONDITIONAL([USE_TTY_GROUP], [test "x$enable_use_tty_group" = xyes])
48d7b13a 2080
3013eb9d 2081AS_IF([test "x$enable_use_tty_group" = xyes], [
034d378b 2082 AC_DEFINE([USE_TTY_GROUP], [1], [Should wall and write be installed setgid tty?])
3013eb9d 2083])
48d7b13a 2084
ab6478ef
WF
2085
2086AC_ARG_ENABLE([sulogin-emergency-mount],
479d50bd
DR
2087 AS_HELP_STRING([--enable-sulogin-emergency-mount],
2088 [use emergency mount of /dev and /proc for sulogin]),
034d378b 2089 [], [enable_sulogin_emergency_mount=no]
ab6478ef
WF
2090)
2091
3013eb9d 2092AS_IF([test "x$enable_sulogin_emergency_mount" = xyes], [
034d378b 2093 AC_DEFINE([USE_SULOGIN_EMERGENCY_MOUNT], [1],
ab6478ef 2094 [Should sulogin use a emergency mount of /dev and /proc?])
3013eb9d 2095])
ab6478ef
WF
2096
2097
f71d1104
KZ
2098AC_ARG_ENABLE([usrdir-path],
2099 AS_HELP_STRING([--enable-usrdir-path], [use only /usr paths in PATH env. variable (recommended on systems with /bin -> /usr/bin symlinks)]),
2100 [], [enable_usrdir_path=no]
2101)
2102
2103AS_IF([test "x$enable_usrdir_path" == xyes], [
2104 AC_DEFINE([USE_USRDIR_PATHS_ONLY], [1], [Define to 1 to remove /bin and /sbin from PATH env.variable])
2105])
2106
2107
f3831bbd
KZ
2108AC_ARG_ENABLE([makeinstall-chown],
2109 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
034d378b 2110 [], [enable_makeinstall_chown=yes]
f3831bbd 2111)
034d378b 2112AM_CONDITIONAL([MAKEINSTALL_DO_CHOWN], [test "x$enable_makeinstall_chown" = xyes])
f3831bbd 2113
81f55ab9 2114
4c24a7ae
KZ
2115AC_ARG_ENABLE([makeinstall-setuid],
2116 AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
034d378b 2117 [], [enable_makeinstall_setuid=yes]
4c24a7ae 2118)
034d378b 2119AM_CONDITIONAL([MAKEINSTALL_DO_SETUID], [test "x$enable_makeinstall_setuid" = xyes])
4c24a7ae 2120
06bcee19 2121
81f55ab9
KZ
2122AC_ARG_ENABLE([colors-default],
2123 AS_HELP_STRING([--disable-colors-default], [do not colorize output from utils by default]),
2124 [], [enable_colors_default=yes]
2125)
2126AS_IF([test "x$enable_colors_default" = xyes], [
2127 AC_DEFINE([USE_COLORS_BY_DEFAULT], [1], [Enables colorized output from utils by default])
2128])
2129
2130
1f10890f
SK
2131AC_ARG_VAR([SUID_CFLAGS],
2132 [CFLAGS used for binaries which are usually with the suid bit])
2133AC_ARG_VAR([SUID_LDFLAGS],
2134 [LDFLAGS used for binaries which are usually with the suid bit])
06bcee19 2135
03d00d49
KZ
2136AC_ARG_VAR([DAEMON_CFLAGS],
2137 [CFLAGS used for binaries which are usually executed as daemons])
2138AC_ARG_VAR([DAEMON_LDFLAGS],
2139 [LDFLAGS used for binaries which are usually executed as daemons])
2140
2141AC_ARG_VAR([SOLIB_CFLAGS],
2142 [CFLAGS used for shared libraries])
2143AC_ARG_VAR([SOLIB_LDFLAGS],
2144 [LDFLAGS used for shared libraries])
2145
2ad21963
KZ
2146AC_ARG_VAR([ADJTIME_PATH],
2147 [Path to hwclock adjtime file, default /etc/adjtime])
2148AS_IF([test "x$ADJTIME_PATH" = x], [ADJTIME_PATH="/etc/adjtime"])
2149AC_DEFINE_UNQUOTED([CONFIG_ADJTIME_PATH], "$ADJTIME_PATH", [Path to hwclock adjtime file])
2150
2151
9cb68977 2152LIBS=""
48d7b13a 2153
48d7b13a 2154
034d378b 2155AC_CONFIG_HEADERS([config.h])
48d7b13a 2156
d4baf92e
KZ
2157#
2158# Don't use configure.ac to replace install paths! See Makefile PATHFILES for
2159# more details.
2160#
8eeb575c 2161AC_CONFIG_FILES([
f06b4328 2162Makefile
31a938ac 2163libblkid/docs/Makefile
8fb4efae 2164libblkid/docs/version.xml
8fb4efae 2165libblkid/src/blkid.h
705854f3
KZ
2166libfdisk/docs/Makefile
2167libfdisk/docs/version.xml
2168libfdisk/src/libfdisk.h
31a938ac 2169libmount/docs/Makefile
2aefc0a8 2170libmount/docs/version.xml
f06b4328 2171libmount/src/libmount.h
1d90bcb1
OO
2172libsmartcols/docs/Makefile
2173libsmartcols/docs/version.xml
1a4d989e 2174libsmartcols/src/libsmartcols.h
f06b4328 2175po/Makefile.in
8eeb575c 2176])
48d7b13a
KZ
2177
2178AC_OUTPUT
4e1073c2
KZ
2179
2180AC_MSG_RESULT([
2181 ${PACKAGE} ${VERSION}
2182
2183 prefix: ${prefix}
2184 exec prefix: ${exec_prefix}
2185
5c0b406d
BS
2186 localstatedir: ${localstatedir}
2187 bindir: ${bindir}
4e1073c2
KZ
2188 sbindir: ${sbindir}
2189 libdir: ${libdir}
2190 includedir: ${includedir}
5c0b406d
BS
2191 usrbin_execdir: ${usrbin_execdir}
2192 usrsbin_execdir: ${usrsbin_execdir}
2193 usrlib_execdir: ${usrlib_execdir}
4e1073c2
KZ
2194
2195 compiler: ${CC}
2196 cflags: ${CFLAGS}
2197 suid cflags: ${SUID_CFLAGS}
2198 ldflags: ${LDFLAGS}
2199 suid ldflags: ${SUID_LDFLAGS}
8e5c4675 2200
0b567ae5
SK
2201 Python: ${PYTHON}
2202 Python version: ${PYTHON_VERSION}
3745d4a9
KZ
2203 Python libs: ${pyexecdir}
2204
8e5c4675 2205 Bash completions: ${with_bashcompletiondir}
ebff016a 2206 Systemd support: ${have_systemd}
5a971329 2207 Btrfs support: ${have_btrfs}
18dae5d8 2208 Wide-char support: ${build_widechar}
4e1073c2
KZ
2209
2210 warnings:
2211
2212${WARN_CFLAGS}
b4b84389
KZ
2213
2214 Type 'make' or 'make <utilname>' to compile.
4e1073c2 2215])