]> git.ipfire.org Git - thirdparty/util-linux.git/blame - configure.ac
tests: avoid &>> for bash compatibility
[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"
d7b32ebe 33LIBBLKID_DATE="19-Oct-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], [
e5cc93b5
KZ
781 UL_NCURSES_CHECK([ncursesw])
782 AS_IF([test "x$have_ncursesw" = xyes], [
4ffcc7a9 783 AC_DEFINE([HAVE_LIBNCURSESW], [1], [Define if ncursesw library available])
f1512be8 784 CURSES_LIB_NAME="ncursesw"
4ffcc7a9 785 AC_CHECK_HEADERS([ncursesw/ncurses.h ncurses.h])
e5cc93b5 786 ])
4ffcc7a9
KZ
787])
788AS_CASE([$with_ncursesw:$have_ncursesw],
789 [yes:no], [AC_MSG_ERROR([ncursesw selected, but library not found])])
2b8f22bd 790
43cc76e2 791
4ffcc7a9
KZ
792dnl non-wide ncurses
793AC_ARG_WITH([ncurses],
794 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, disabled by default]),
795 [], [with_ncurses=auto]
796)
797have_ncurses=no
18dae5d8
KZ
798
799AS_CASE([$with_ncurses:$build_widechar],
800 [yes:yes], [AC_MSG_ERROR([wide-char support enabled, but non-wide ncurses selects])])
801
4ffcc7a9 802AS_IF([test "x$have_ncursesw" = xno -a "x$with_ncurses" != xno ], [
e5cc93b5
KZ
803 UL_NCURSES_CHECK([ncurses])
804 AS_IF([test "x$have_ncurses" = xyes], [
4ffcc7a9
KZ
805 AC_DEFINE([HAVE_LIBNCURSES], [1], [Define if ncurses library available])
806 CURSES_LIB_NAME="ncurses"
807 AC_CHECK_HEADERS([ncurses/ncurses.h ncurses.h])
e5cc93b5 808 ])
3013eb9d 809])
4ffcc7a9
KZ
810AS_CASE([$with_ncurses:$have_ncurses],
811 [yes:no], [AC_MSG_ERROR([ncurses selected, but library not found])])
812
2b8f22bd 813AC_SUBST([NCURSES_CFLAGS])
75ad4910 814AC_SUBST([NCURSES_LIBS])
4ffcc7a9 815AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncursesw" = xyes -o "x$have_ncurses" = xyes])
75ad4910
KZ
816
817
818AC_ARG_WITH([slang],
4ffcc7a9 819 AS_HELP_STRING([--with-slang], [compile cfdisk with slang rather than ncurses]),
034d378b 820 [], [with_slang=no]
75ad4910 821)
50ea6795 822have_slang=no
3013eb9d 823AS_IF([test "x$with_slang" = xyes], [
75ad4910
KZ
824 AC_CHECK_HEADERS([slang.h slang/slang.h])
825 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h],
50ea6795 826 [have_slang=yes], [], [
75ad4910
KZ
827#ifdef HAVE_SLANG_H
828#include <slang.h>
829#elif defined(HAVE_SLANG_SLANG_H)
830#include <slang/slang.h>
831#endif
832])
3013eb9d 833 AS_IF([test "x$have_slang" = xno], [
f1512be8
KZ
834 AC_MSG_ERROR([slang selected but slcurses.h not found])],
835 [CURSES_LIB_NAME=slang
3013eb9d
SK
836 ])
837])
034d378b 838AM_CONDITIONAL([HAVE_SLANG], [test "x$have_slang" = xyes])
50ea6795 839
50ea6795 840
4ffcc7a9 841AS_IF([test "x$have_slang" = xyes -o "x$have_ncursesw" = xyes -o "x$have_ncurses" = xyes], [
f1512be8
KZ
842 AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, [
843 AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1,
7556c944
KZ
844 [Define if curses library has the use_default_colors().])
845 ])
846 AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, [
847 AC_DEFINE(HAVE_RESIZETERM, 1,
848 [Define if curses library has the resizeterm().])
f1512be8
KZ
849 ])
850])
851
50ea6795 852
17d71034
KZ
853AC_ARG_WITH([tinfo], AS_HELP_STRING([--without-tinfo], [compile without libtinfo]),
854 [], [with_tinfo=auto]
855)
856have_tinfo=no
857AS_IF([test "x$with_tinfo" != xno], [
858 dnl Try pkg-config for libtinfo
859 PKG_CHECK_MODULES(TINFO, [tinfo], [
860 dnl pkg-config success
861 have_tinfo=yes
862 UL_PKG_STATIC([TINFO_LIBS_STATIC], [tinfo])], [
863
864 dnl If pkg-config failed, fall back to classic searching.
865 AC_CHECK_LIB([tinfo], [tgetent], [
ccf92e6d
KZ
866 have_tinfo=yes
867 TINFO_LIBS="-ltinfo"
587652b4 868 TINFO_LIBS_STATIC="-ltinfo"
ccf92e6d 869 TINFO_CFLAGS=""])
17d71034 870 ])
2b8f22bd
MF
871])
872AC_SUBST([TINFO_LIBS])
0b28c2ec 873AC_SUBST([TINFO_LIBS_STATIC])
ccf92e6d 874AC_SUBST([TINFO_CFLAGS])
b88e6b02 875AM_CONDITIONAL([HAVE_TINFO], [test "x$have_tinfo" = xyes])
254743e4 876AS_IF([test "x$have_tinfo" = xyes], [
17d71034 877 AC_DEFINE(HAVE_LIBTINFO, 1, [Define if libtinfo available.])
4310faf9 878])
75ad4910
KZ
879
880
0b28c2ec
KZ
881AC_ARG_WITH([readline],
882 AS_HELP_STRING([--with-readline], [compile with GNU Readline support]),
883 [], [with_readline=auto]
884)
885
886AS_IF([test "x$with_readline" = xno], [
887 AM_CONDITIONAL([HAVE_READLINE], [false])
888], [
889 UL_CHECK_LIB([readline], [readline])
890 AS_CASE([$with_readline:$have_readline],
891 [yes:no],
892 [AC_MSG_ERROR([readline selected but libreadline not found ])],
893 [*:yes],
894 [READLINE_LIBS="-lreadline"
895 READLINE_LIBS_STATIC="-lreadline $TINFO_LIBS_STATIC"]
896 )
897])
898AC_SUBST([READLINE_LIBS])
899AC_SUBST([READLINE_LIBS_STATIC])
900
901
75ad4910
KZ
902AC_ARG_WITH([utempter],
903 AS_HELP_STRING([--with-utempter], [compile script(1) with libutempter]),
034d378b 904 [], [with_utempter=no]
75ad4910
KZ
905)
906
3013eb9d 907AS_IF([test "x$with_utempter" = xyes], [
034d378b 908 UL_CHECK_LIB([utempter], [utempter_add_record])
3013eb9d 909 AS_IF([test "x$have_utempter" = xno], [
75ad4910 910 AC_MSG_ERROR([utempter selected but libutempter not found])
3013eb9d
SK
911 ])
912], [
034d378b 913 AM_CONDITIONAL([HAVE_UTEMPTER], [false])
3013eb9d 914])
75ad4910
KZ
915
916
1dbbde66
KZ
917dnl
918dnl libuuid
919dnl
17afb032
KZ
920AC_ARG_ENABLE([libuuid],
921 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
08b1c219 922 [], [UL_DEFAULT_ENABLE([libuuid], [yes])]
17afb032 923)
fa7be20e 924UL_BUILD_INIT([libuuid])
dc2b8d87
KZ
925AC_SUBST([LIBUUID_VERSION])
926AC_SUBST([LIBUUID_VERSION_INFO])
fa7be20e 927AM_CONDITIONAL(BUILD_LIBUUID, test "x$build_libuuid" = xyes)
9dc801d2 928
3e584e85
RM
929AC_ARG_ENABLE([libuuid-force-uuidd],
930 AS_HELP_STRING([--enable-libuuid-force-uuidd], [support uuidd even though the daemon is not built]),
931 [], [enable_libuuid_force_uuidd=no]
932)
933
13985252 934AS_IF([test "x$build_libuuid" = xyes], [
17afb032 935 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
3013eb9d 936])
48d7b13a 937
1dbbde66
KZ
938dnl
939dnl libblkid
940dnl
f910b559 941AC_ARG_ENABLE([libblkid],
1d12ed57 942 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and many related utilities]),
dc049516 943 [], [UL_DEFAULT_ENABLE([libblkid], [check])]
40f07ff7 944)
61a074f7 945UL_BUILD_INIT([libblkid])
dc049516 946UL_REQUIRES_HAVE([libblkid], [openat], [openat functions])
033cf439 947AC_SUBST([LIBBLKID_DATE])
dc2b8d87
KZ
948AC_SUBST([LIBBLKID_VERSION])
949AC_SUBST([LIBBLKID_VERSION_INFO])
034d378b
SK
950AC_DEFINE_UNQUOTED([LIBBLKID_VERSION], ["$LIBBLKID_VERSION"], [libblkid version string])
951AC_DEFINE_UNQUOTED([LIBBLKID_DATE], ["$LIBBLKID_DATE"], [libblkid date string])
3013eb9d 952AS_IF([test "x$build_libblkid" = xyes], [
034d378b 953 AC_DEFINE([HAVE_LIBBLKID], [1], [Define to 1 if you have the -lblkid.])
3013eb9d 954])
034d378b
SK
955AM_CONDITIONAL([BUILD_LIBBLKID], [test "x$build_libblkid" = xyes])
956AM_CONDITIONAL([BUILD_LIBBLKID_TESTS], [test "x$build_libblkid" = xyes -a "x$enable_static" = xyes])
f910b559 957
1dbbde66
KZ
958dnl
959dnl libmount
960dnl
f1cde479
KZ
961AC_ARG_ENABLE([libmount],
962 AS_HELP_STRING([--disable-libmount], [do not build libmount]),
08b1c219 963 [], [UL_DEFAULT_ENABLE([libmount], [check])]
f1cde479 964)
61a074f7 965UL_BUILD_INIT([libmount])
13f5473e
KZ
966UL_REQUIRES_BUILD([libmount], [libblkid])
967UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
034d378b
SK
968AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
969AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
30c34afb
KZ
970AS_IF([test "x$build_libmount" = xyes], [
971 AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount available.])
972])
8e368761 973
f1cde479 974AC_SUBST([LIBMOUNT_VERSION])
10e1d2e5
SH
975AC_SUBST([LIBMOUNT_MAJOR_VERSION], $PACKAGE_VERSION_MAJOR)
976AC_SUBST([LIBMOUNT_MINOR_VERSION], $PACKAGE_VERSION_MINOR)
977AC_SUBST([LIBMOUNT_PATCH_VERSION], $PACKAGE_VERSION_RELEASE)
f1cde479 978AC_SUBST([LIBMOUNT_VERSION_INFO])
034d378b 979AC_DEFINE_UNQUOTED([LIBMOUNT_VERSION], ["$LIBMOUNT_VERSION"], [libmount version string])
13f5473e 980
e778642a
KZ
981AC_ARG_ENABLE([libmount-support-mtab],
982 AS_HELP_STRING([--enable-libmount-support-mtab], [support /etc/mtab (default is use /proc/self/mountinfo)]),
983 [], [enable_libmount_support_mtab=no]
e3f72275
KZ
984)
985
e778642a
KZ
986AS_IF([test "x$enable_libmount_support_mtab" == xyes], [
987 AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.])
e3f72275
KZ
988])
989
f1cde479 990
1a4d989e
OO
991dnl
992dnl libsmartcols
993dnl
994AC_ARG_ENABLE([libsmartcols],
995 AS_HELP_STRING([--disable-libsmartcols], [do not build libsmartcols]),
08b1c219 996 [], [UL_DEFAULT_ENABLE([libsmartcols], [yes])]
1a4d989e
OO
997)
998UL_BUILD_INIT([libsmartcols])
1a4d989e 999AM_CONDITIONAL([BUILD_LIBSMARTCOLS], [test "x$build_libsmartcols" = xyes])
1a4d989e
OO
1000
1001AC_SUBST([LIBSMARTCOLS_VERSION])
1002AC_SUBST([LIBSMARTCOLS_VERSION_INFO])
1003AC_DEFINE_UNQUOTED([LIBSMARTCOLS_VERSION], ["$LIBSMARTCOLS_VERSION"], [libsmartcols version string])
1004
1005
eb6a03f3 1006dnl
0bb4c979 1007dnl libfdisk
eb6a03f3 1008dnl
0bb4c979
KZ
1009AC_ARG_ENABLE([libfdisk],
1010 AS_HELP_STRING([--disable-libfdisk], [do not build libfdisk]),
1011 [], [UL_DEFAULT_ENABLE([libfdisk], [check])]
1012)
1013UL_BUILD_INIT([libfdisk])
eb6a03f3 1014UL_REQUIRES_BUILD([libfdisk], [libuuid])
034d378b 1015AM_CONDITIONAL([BUILD_LIBFDISK], [test "x$build_libfdisk" = xyes])
0bb4c979
KZ
1016AM_CONDITIONAL([BUILD_LIBFDISK_TESTS], [test "x$build_libfdisk" = xyes -a "x$enable_static" = xyes])
1017
ed79557e
KZ
1018AS_IF([test "x$build_libblkid" = xyes],
1019 [LIBFDISK_PC_REQUIRES="uuid blkid"],[LIBFDISK_PC_REQUIRES="uuid"])
1020AC_SUBST([LIBFDISK_PC_REQUIRES])
1021
0bb4c979 1022AC_SUBST([LIBFDISK_VERSION])
791da22d
KZ
1023AC_SUBST([LIBFDISK_MAJOR_VERSION], $PACKAGE_VERSION_MAJOR)
1024AC_SUBST([LIBFDISK_MINOR_VERSION], $PACKAGE_VERSION_MINOR)
1025AC_SUBST([LIBFDISK_PATCH_VERSION], $PACKAGE_VERSION_RELEASE)
0bb4c979
KZ
1026AC_SUBST([LIBFDISK_VERSION_INFO])
1027AC_DEFINE_UNQUOTED([LIBFDISK_VERSION], ["$LIBFDISK_VERSION"], [libfdisk version string])
1028
eb6a03f3
KZ
1029
1030UL_BUILD_INIT([fdisk], [check])
dc049516 1031UL_REQUIRES_HAVE([fdisk], [openat], [openat functions])
eb6a03f3 1032UL_REQUIRES_BUILD([fdisk], [libfdisk])
d44115f3 1033UL_REQUIRES_BUILD([fdisk], [libsmartcols])
034d378b 1034AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes])
eb6a03f3
KZ
1035
1036
62b2c024 1037UL_BUILD_INIT([sfdisk], [check])
dc049516 1038UL_REQUIRES_HAVE([sfdisk], [openat], [openat functions])
9c1f9dd3
KZ
1039UL_REQUIRES_BUILD([sfdisk], [libfdisk])
1040UL_REQUIRES_BUILD([sfdisk], [libsmartcols])
ecc6047e
KZ
1041AM_CONDITIONAL([BUILD_SFDISK], [test "x$build_sfdisk" = xyes])
1042
1043
08b1c219
KZ
1044UL_BUILD_INIT([cfdisk], [check])
1045UL_REQUIRES_BUILD([cfdisk], [libfdisk])
1046UL_REQUIRES_BUILD([cfdisk], [libsmartcols])
9dd55a04 1047UL_REQUIRES_HAVE([cfdisk], [open_memstream], [open_memstream function])
4ffcc7a9 1048UL_REQUIRES_HAVE([cfdisk], [ncursesw,slang,ncurses], [ncursesw, ncurses or slang library])
08b1c219
KZ
1049AM_CONDITIONAL([BUILD_CFDISK], [test "x$build_cfdisk" = xyes])
1050
1051
434b07a0
KZ
1052AC_ARG_ENABLE([mount],
1053 AS_HELP_STRING([--disable-mount], [do not build mount(8) and umount(8)]),
08b1c219 1054 [], [UL_DEFAULT_ENABLE([mount], [check])]
ecdba5dd 1055)
434b07a0 1056UL_BUILD_INIT([mount])
53e8c16e 1057UL_REQUIRES_LINUX([mount])
434b07a0 1058UL_REQUIRES_BUILD([mount], [libmount])
034d378b 1059AM_CONDITIONAL([BUILD_MOUNT], [test "x$build_mount" = xyes])
ecdba5dd
KZ
1060
1061
bafe1a75
KZ
1062AC_ARG_ENABLE([losetup],
1063 AS_HELP_STRING([--disable-losetup], [do not build losetup]),
08b1c219 1064 [], [UL_DEFAULT_ENABLE([losetup], [check])]
bafe1a75
KZ
1065)
1066UL_BUILD_INIT([losetup])
1067UL_REQUIRES_LINUX([losetup])
7477f356 1068UL_REQUIRES_BUILD([losetup], [libsmartcols])
034d378b 1069AM_CONDITIONAL([BUILD_LOSETUP], [test "x$build_losetup" = xyes])
bafe1a75 1070
0624d840
KZ
1071AC_ARG_ENABLE([zramctl],
1072 AS_HELP_STRING([--disable-zramctl], [do not build zramctl]),
1073 [], [UL_DEFAULT_ENABLE([zramctl], [check])]
1074)
1075UL_BUILD_INIT([zramctl])
1076UL_REQUIRES_LINUX([zramctl])
1077UL_REQUIRES_BUILD([zramctl], [libsmartcols])
1078AM_CONDITIONAL([BUILD_ZRAMCTL], [test "x$build_zramctl" = xyes])
bafe1a75 1079
1dbbde66
KZ
1080AC_ARG_ENABLE([fsck],
1081 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
08b1c219 1082 [], [UL_DEFAULT_ENABLE([fsck], [check])]
1dbbde66 1083)
61a074f7 1084UL_BUILD_INIT([fsck])
a7b585ea 1085UL_REQUIRES_BUILD([fsck], [libmount])
034d378b 1086AM_CONDITIONAL([BUILD_FSCK], [test "x$build_fsck" = xyes])
1dbbde66
KZ
1087
1088
1089AC_ARG_ENABLE([partx],
1090 AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
08b1c219 1091 [], [UL_DEFAULT_ENABLE([partx], [check])]
1dbbde66 1092)
61a074f7 1093UL_BUILD_INIT([partx])
ecde2536
KZ
1094UL_REQUIRES_LINUX([partx])
1095UL_REQUIRES_BUILD([partx], [libblkid])
08b1c219 1096UL_REQUIRES_BUILD([partx], [libsmartcols])
034d378b 1097AM_CONDITIONAL([BUILD_PARTX], [test "x$build_partx" = xyes])
1dbbde66
KZ
1098
1099
1dbbde66
KZ
1100AC_ARG_ENABLE([uuidd],
1101 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
08b1c219 1102 [], [UL_DEFAULT_ENABLE([uuidd], [check])]
1dbbde66 1103)
61a074f7 1104UL_BUILD_INIT([uuidd])
bcdab497 1105UL_REQUIRES_BUILD([uuidd], [libuuid])
651b25cd
RM
1106UL_REQUIRES_HAVE([uuidd], [timer], [timer_create function])
1107UL_REQUIRES_HAVE([uuidd], [sys_signalfd_h], [sys/signalfd.h header])
3e584e85 1108AS_IF([test "x$build_uuidd" = xyes || test "x$enable_libuuid_force_uuidd" == xyes ], [
034d378b 1109 AC_DEFINE([HAVE_UUIDD], [1], [Define to 1 if you want to use uuid daemon.])
3013eb9d 1110])
034d378b 1111AM_CONDITIONAL([BUILD_UUIDD], [test "x$build_uuidd" = xyes])
1dbbde66
KZ
1112
1113
1b15cbd1
KZ
1114UL_BUILD_INIT([uuidgen], [check])
1115UL_REQUIRES_BUILD([uuidgen], [libuuid])
1116AM_CONDITIONAL([BUILD_UUIDGEN], [test "x$build_uuidgen" = xyes])
1117
15a2c741
KZ
1118UL_BUILD_INIT([blkid], [check])
1119UL_REQUIRES_BUILD([blkid], [libblkid])
1120AM_CONDITIONAL([BUILD_BLKID], [test "x$build_blkid" = xyes])
1121
1122UL_BUILD_INIT([findfs], [check])
1123UL_REQUIRES_BUILD([findfs], [libblkid])
1124AM_CONDITIONAL([BUILD_FINDFS], [test "x$build_findfs" = xyes])
1125
1126UL_BUILD_INIT([wipefs], [check])
1127UL_REQUIRES_BUILD([wipefs], [libblkid])
1128AM_CONDITIONAL([BUILD_WIPEFS], [test "x$build_wipefs" = xyes])
1129
1130UL_BUILD_INIT([findmnt], [check])
1131UL_REQUIRES_BUILD([findmnt], [libmount])
169b4a8c 1132UL_REQUIRES_BUILD([findmnt], [libblkid])
15a2c741
KZ
1133UL_REQUIRES_BUILD([findmnt], [libsmartcols])
1134AM_CONDITIONAL([BUILD_FINDMNT], [test "x$build_findmnt" = xyes])
1135
1b15cbd1 1136
0164c245 1137AC_ARG_ENABLE([mountpoint],
2023ccc4 1138 AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
08b1c219 1139 [], [UL_DEFAULT_ENABLE([mountpoint], [check])]
0164c245 1140)
61a074f7 1141UL_BUILD_INIT([mountpoint])
a9127bc1 1142UL_REQUIRES_BUILD([mountpoint], [libmount])
034d378b 1143AM_CONDITIONAL([BUILD_MOUNTPOINT], [test "x$build_mountpoint" = xyes])
0164c245
KZ
1144
1145
10e56b49
KZ
1146AC_ARG_ENABLE([fallocate],
1147 AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
08b1c219 1148 [], [UL_DEFAULT_ENABLE([fallocate], [check])]
10e56b49 1149)
61a074f7 1150UL_BUILD_INIT([fallocate])
10e56b49
KZ
1151UL_REQUIRES_LINUX([fallocate])
1152UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
034d378b 1153AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes])
10e56b49 1154
3013eb9d 1155AS_IF([test "x$build_fallocate" = xyes], [
10e56b49
KZ
1156 dnl check for valid fallocate() function
1157 dnl with 32 bits glibc 2.10, fallocate() exists but not fallocate64()
1158 dnl when _FILE_OFFSET_BITS==64, fallocate() is redirect to fallocate64()
1159 dnl and program can't be linked.
1160 dnl AC_CHECK_FUNC can't catch such errors since it's redefining
1161 dnl function prototype.
1162 AC_MSG_CHECKING([for valid fallocate() function])
1163 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
b832c2fe
YD
1164#ifdef HAVE_UNISTD_H
1165# include <unistd.h>
1166#endif
1167#ifdef HAVE_SYS_TYPES_H
1168# include <sys/types.h>
1169#endif
1170#ifdef HAVE_LINUX_FALLOC_H
1171# include <linux/falloc.h>
1172#endif
1173#ifdef HAVE_FCNTL_H
1174# include <fcntl.h>
1175#endif
1176]],[[
1177 long ret;
b832c2fe 1178 ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0xfffffffful, 0xfffffffful);
b832c2fe
YD
1179 if (ret != 0) {
1180 return 1;
1181 }
1182 ]])],[
10e56b49 1183 AC_MSG_RESULT([yes])
034d378b 1184 AC_DEFINE([HAVE_FALLOCATE], [1], [Have valid fallocate() function])],[
10e56b49 1185 AC_MSG_RESULT([no])])
3013eb9d 1186])
10e56b49 1187
19a224ad 1188
a2ea6670
KZ
1189AC_ARG_ENABLE([unshare],
1190 AS_HELP_STRING([--disable-unshare], [do not build unshare]),
08b1c219 1191 [], [UL_DEFAULT_ENABLE([unshare], [check])]
a2ea6670 1192)
61a074f7 1193UL_BUILD_INIT([unshare])
a2ea6670
KZ
1194UL_REQUIRES_LINUX([unshare])
1195UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
034d378b 1196AM_CONDITIONAL([BUILD_UNSHARE], [test "x$build_unshare" = xyes])
bdd384d1 1197AC_CHECK_FUNCS([unshare])
b3425806 1198
f8aa8e94
EB
1199AC_ARG_ENABLE([nsenter],
1200 AS_HELP_STRING([--disable-nsenter], [do not build nsenter]),
08b1c219 1201 [], [UL_DEFAULT_ENABLE([nsenter], [check])]
f8aa8e94
EB
1202)
1203UL_BUILD_INIT([nsenter])
1204UL_REQUIRES_LINUX([nsenter])
6cd4beac 1205UL_REQUIRES_SYSCALL_CHECK([nsenter], [UL_CHECK_SYSCALL([setns])], [setns])
034d378b 1206AM_CONDITIONAL([BUILD_NSENTER], [test "x$build_nsenter" = xyes])
bdd384d1 1207AC_CHECK_FUNCS([setns])
b3425806 1208
17d71034
KZ
1209
1210AC_ARG_WITH([cap_ng],
801afcb0 1211 AS_HELP_STRING([--without-cap-ng], [compile without libcap-ng]),
17d71034
KZ
1212 [], [with_cap_ng=auto]
1213)
801afcb0
MF
1214AS_IF([test "x$with_cap_ng" = xno], [
1215 AM_CONDITIONAL([HAVE_CAP_NG], [false])
1216 have_cap_ng=no
1217],[
17d71034
KZ
1218 UL_CHECK_LIB([cap-ng], [capng_apply], [cap_ng])
1219])
1220
1221
5600c405
AL
1222AC_ARG_ENABLE([setpriv],
1223 AS_HELP_STRING([--disable-setpriv], [do not build setpriv]),
08b1c219 1224 [], [UL_DEFAULT_ENABLE([setpriv], [check])]
5600c405
AL
1225)
1226UL_BUILD_INIT([setpriv])
1227UL_REQUIRES_LINUX([setpriv])
48469f90 1228UL_REQUIRES_HAVE([setpriv], [linux_securebits_h], [securebits.h header file])
e1b8ba20 1229UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng library])
034d378b 1230AM_CONDITIONAL([BUILD_SETPRIV], [test "x$build_setpriv" = xyes])
5600c405
AL
1231
1232
539feec1
ML
1233AC_ARG_ENABLE([eject],
1234 AS_HELP_STRING([--disable-eject], [do not build eject]),
08b1c219 1235 [], [UL_DEFAULT_ENABLE([eject], [check])]
539feec1
ML
1236)
1237UL_BUILD_INIT([eject])
1238UL_REQUIRES_LINUX([eject])
7770e7df 1239UL_REQUIRES_BUILD([eject], [libmount])
034d378b 1240AM_CONDITIONAL([BUILD_EJECT], [test "x$build_eject" = xyes])
539feec1
ML
1241
1242
48d7b13a 1243AC_ARG_ENABLE([agetty],
7fa4f112 1244 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
d00c10ed 1245 [], [UL_DEFAULT_ENABLE([agetty], [check])]
48d7b13a 1246)
61a074f7 1247UL_BUILD_INIT([agetty])
d00c10ed 1248UL_REQUIRES_HAVE([agetty], [utmp_h], [utmp.h header])
034d378b 1249AM_CONDITIONAL([BUILD_AGETTY], [test "x$build_agetty" = xyes])
90d5285d
KZ
1250AS_IF([test "x$have_futimens" = xyes -a "x$have_inotify_init1" = xyes ], [
1251 AC_DEFINE([AGETTY_RELOAD], [1], [Enable agetty --reload feature])
1252],[
1253 AC_MSG_WARN([futimens or inotify_init1 not found; agetty(8) will not provide ---reload functionality])
1254])
0fc74be1 1255
48d7b13a 1256
1eb16fd7
KZ
1257AC_ARG_ENABLE([plymouth_support],
1258 AS_HELP_STRING([--disable-plymouth_support], [don not care about plymouth in sylogin(8) and agetty(8)]),
d67f61c0 1259 [], [enable_plymouth_support=check]
1eb16fd7
KZ
1260)
1261UL_BUILD_INIT([plymouth_support])
1262UL_REQUIRES_HAVE([plymouth_support], [tiocglcktrmios], [TIOCGLCKTRMIOS flag])
1263UL_REQUIRES_HAVE([plymouth_support], [sock_cloexec], [SOCK_CLOEXEC flag])
1264UL_REQUIRES_HAVE([plymouth_support], [sock_nonblock], [SOCK_NONBLOCK flag])
1265UL_REQUIRES_HAVE([plymouth_support], [so_passcred], [SO_PASSCRED flag])
1266AM_CONDITIONAL([USE_PLYMOUTH_SUPPORT], [test "x$build_plymouth_support" = xyes])
1267AS_IF([test "x$build_plymouth_support" = xyes ], [
1268 AC_DEFINE([USE_PLYMOUTH_SUPPORT], [1], [Enable plymouth support feature for sulogin and aggety])
1269])
1270
1271
17d71034
KZ
1272AC_ARG_WITH([libz],
1273 AS_HELP_STRING([--without-libz], [compile without libz]),
1274 [], [with_libz=auto]
1275)
1276AS_IF([test "x$with_libz" = xno], [have_z=no], [
1277 AC_CHECK_LIB([z], [crc32], [have_z=yes], [have_z=no])
1278])
1279
1280
9cb68977 1281AC_ARG_ENABLE([cramfs],
7fa4f112 1282 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
08b1c219 1283 [], [UL_DEFAULT_ENABLE([cramfs], [check])]
9cb68977 1284)
61a074f7 1285UL_BUILD_INIT([cramfs])
d81b5a52 1286UL_REQUIRES_HAVE([cramfs], [z], [z library])
034d378b 1287AM_CONDITIONAL([BUILD_CRAMFS], [test "x$build_cramfs" = xyes])
9cb68977 1288
a13cdb7a 1289
8d6f0bae 1290AC_ARG_ENABLE([bfs],
834fc88c 1291 AS_HELP_STRING([--disable-bfs], [do not build mkfs.bfs]),
08b1c219 1292 [], [UL_DEFAULT_ENABLE([bfs], [yes])]
834fc88c
KZ
1293)
1294UL_BUILD_INIT([bfs])
034d378b 1295AM_CONDITIONAL([BUILD_BFS], [test "x$build_bfs" = xyes])
834fc88c
KZ
1296
1297
3d9fdac5
KZ
1298AC_ARG_ENABLE([minix],
1299 AS_HELP_STRING([--disable-minix], [do not build fsck.minix, mkfs.minix]),
08b1c219 1300 [], [UL_DEFAULT_ENABLE([minix], [yes])]
3d9fdac5
KZ
1301)
1302UL_BUILD_INIT([minix])
1303AM_CONDITIONAL([BUILD_MINIX], [test "x$build_minix" = xyes])
1304
1305
8d6f0bae
KZ
1306AC_ARG_ENABLE([fdformat],
1307 AS_HELP_STRING([--disable-fdformat], [do not build fdformat]),
08b1c219 1308 [], [UL_DEFAULT_ENABLE([fdformat], [check])]
8d6f0bae
KZ
1309)
1310UL_BUILD_INIT([fdformat])
1311UL_REQUIRES_LINUX([fdformat])
034d378b 1312AM_CONDITIONAL([BUILD_FDFORMAT], [test "x$build_fdformat" = xyes])
8d6f0bae
KZ
1313
1314
6acf31ac
KZ
1315AC_ARG_ENABLE([hwclock],
1316 AS_HELP_STRING([--disable-hwclock], [do not build hwclock]),
08b1c219 1317 [], [UL_DEFAULT_ENABLE([hwclock], [check])]
6acf31ac
KZ
1318)
1319have_linuxdummy=$linux_os
1320
1321UL_BUILD_INIT([hwclock])
1322UL_REQUIRES_HAVE([hwclock], [io, linuxdummy], [ioperm iopl function or Linux])
034d378b 1323AM_CONDITIONAL([BUILD_HWCLOCK], [test "x$build_hwclock" = xyes])
e09ebf22
KZ
1324
1325
ecc6047e
KZ
1326UL_BUILD_INIT([mkfs], [yes])
1327AM_CONDITIONAL([BUILD_MKFS], [test "x$build_mkfs" = xyes])
1328
1329UL_BUILD_INIT([isosize], [yes])
1330AM_CONDITIONAL([BUILD_ISOSIZE], [test "x$build_isosize" = xyes])
1331
3d9fdac5 1332
7b040214
KZ
1333UL_BUILD_INIT([fstrim], [check])
1334UL_REQUIRES_LINUX([fstrim])
1335UL_REQUIRES_BUILD([fstrim], [libmount])
1336AM_CONDITIONAL([BUILD_FSTRIM], [test "x$build_fstrim" = xyes])
1337
1338
143635c9
KZ
1339UL_BUILD_INIT([swapon], [check])
1340UL_REQUIRES_LINUX([swapon])
1341UL_REQUIRES_BUILD([swapon], [libblkid])
7770e7df 1342UL_REQUIRES_BUILD([swapon], [libmount])
7477f356 1343UL_REQUIRES_BUILD([swapon], [libsmartcols])
034d378b 1344AM_CONDITIONAL([BUILD_SWAPON], [test "x$build_swapon" = xyes])
143635c9
KZ
1345
1346
61a074f7 1347UL_BUILD_INIT([lsblk], [check])
a13cdb7a
KZ
1348UL_REQUIRES_LINUX([lsblk])
1349UL_REQUIRES_BUILD([lsblk], [libblkid])
9554f7ab 1350UL_REQUIRES_BUILD([lsblk], [libmount])
7477f356 1351UL_REQUIRES_BUILD([lsblk], [libsmartcols])
034d378b 1352AM_CONDITIONAL([BUILD_LSBLK], [test "x$build_lsblk" = xyes])
9cb68977 1353
a3d3b770 1354
61a074f7 1355UL_BUILD_INIT([lscpu], [check])
da396d88 1356UL_REQUIRES_LINUX([lscpu])
7477f356 1357UL_REQUIRES_BUILD([lscpu], [libsmartcols])
da396d88 1358UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
034d378b 1359AM_CONDITIONAL([BUILD_LSCPU], [test "x$build_lscpu" = xyes])
da396d88 1360
a3d3b770 1361
50e6f15b
RM
1362AC_ARG_ENABLE([lslogins],
1363 AS_HELP_STRING([--disable-lslogins], [do not build lslogins]),
1364 [], [UL_DEFAULT_ENABLE([lslogins], [check])]
1365)
1366UL_BUILD_INIT([lslogins])
ab1cfad5 1367UL_REQUIRES_BUILD([lslogins], [libsmartcols])
d00c10ed
RM
1368UL_REQUIRES_HAVE([lslogins], [shadow_h], [shadow.h header])
1369UL_REQUIRES_HAVE([lslogins], [utmp_h], [utmp.h header])
ab1cfad5
OO
1370AM_CONDITIONAL([BUILD_LSLOGINS], [test "x$build_lslogins" = xyes])
1371
1372
61a074f7 1373UL_BUILD_INIT([chcpu], [check])
da396d88
KZ
1374UL_REQUIRES_LINUX([chcpu])
1375UL_REQUIRES_HAVE([chcpu], [cpu_set_t], [cpu_set_t type])
034d378b 1376AM_CONDITIONAL([BUILD_CHCPU], [test "x$build_chcpu" = xyes])
da396d88 1377
a13cdb7a 1378
7fcccbdf
KZ
1379AC_ARG_ENABLE([wdctl],
1380 AS_HELP_STRING([--disable-wdctl], [do not build wdctl]),
08b1c219 1381 [], [UL_DEFAULT_ENABLE([wdctl], [check])]
7fcccbdf
KZ
1382)
1383UL_BUILD_INIT([wdctl])
5b0289b9 1384UL_REQUIRES_LINUX([wdctl])
7477f356 1385UL_REQUIRES_BUILD([wdctl], [libsmartcols])
5b0289b9 1386UL_REQUIRES_HAVE([wdctl], [linux_watchdog_h], [linux/watchdog.h header file])
034d378b 1387AM_CONDITIONAL([BUILD_WDCTL], [test "x$build_wdctl" = xyes])
5b0289b9
KZ
1388
1389
54dbc8cf
KZ
1390UL_BUILD_INIT([swaplabel], [check])
1391UL_REQUIRES_BUILD([swaplabel], [libblkid])
034d378b 1392AM_CONDITIONAL([BUILD_SWAPLABEL], [test "x$build_swaplabel" = xyes])
54dbc8cf
KZ
1393
1394
ecc6047e
KZ
1395UL_BUILD_INIT([mkswap], [yes])
1396AM_CONDITIONAL([BUILD_MKSWAP], [test "x$build_mkswap" = xyes])
08b1c219
KZ
1397AS_IF([test "x$build_mkswap" = xyes -a "x$build_libuuid" != xyes], [
1398 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
1399])
ecc6047e 1400
328eb445
KZ
1401
1402AC_ARG_ENABLE([cal],
1403 AS_HELP_STRING([--disable-cal], [do not build cal]),
1404 [], [UL_DEFAULT_ENABLE([cal], [check])]
1405)
1406UL_BUILD_INIT([cal])
1b15cbd1
KZ
1407AM_CONDITIONAL([BUILD_CAL], [test "x$build_cal" = xyes])
1408
50e6f15b
RM
1409AC_ARG_ENABLE([logger],
1410 AS_HELP_STRING([--disable-logger], [do not build logger]),
1411 [], [UL_DEFAULT_ENABLE([logger], [check])]
1412)
1413UL_BUILD_INIT([logger])
1b15cbd1
KZ
1414AM_CONDITIONAL([BUILD_LOGGER], [test "x$build_logger" = xyes])
1415
4c838e6c 1416UL_BUILD_INIT([look], [yes])
1b15cbd1
KZ
1417AM_CONDITIONAL([BUILD_LOOK], [test "x$build_look" = xyes])
1418
1419UL_BUILD_INIT([mcookie], [yes])
1420AM_CONDITIONAL([BUILD_MCOOKIE], [test "x$build_mcookie" = xyes])
1421
1422UL_BUILD_INIT([namei], [yes])
1423AM_CONDITIONAL([BUILD_NAMEI], [test "x$build_namei" = xyes])
1424
1425UL_BUILD_INIT([whereis], [yes])
1426AM_CONDITIONAL([BUILD_WHEREIS], [test "x$build_whereis" = xyes])
1427
3adaaa15
KZ
1428UL_BUILD_INIT([getopt], [yes])
1429AM_CONDITIONAL([BUILD_GETOPT], [test "x$build_getopt" = xyes])
1430
ecc6047e
KZ
1431
1432UL_BUILD_INIT([blockdev], [check])
1433UL_REQUIRES_LINUX([blockdev])
1434AM_CONDITIONAL([BUILD_BLOCKDEV], [test "x$build_blockdev" = xyes])
1435
1436
945ac250
KZ
1437UL_BUILD_INIT([prlimit], [check])
1438UL_REQUIRES_LINUX([prlimit])
7477f356 1439UL_REQUIRES_BUILD([prlimit], [libsmartcols])
945ac250 1440UL_REQUIRES_SYSCALL_CHECK([prlimit], [UL_CHECK_SYSCALL([prlimit64])], [prlimit64])
034d378b 1441AM_CONDITIONAL([BUILD_PRLIMIT], [test "x$build_prlimit" = xyes])
3013eb9d 1442AS_IF([test "x$build_prlimit" = xyes], [
945ac250 1443 AC_CHECK_FUNCS([prlimit])
3013eb9d 1444])
945ac250
KZ
1445
1446
3dc02ef4
DB
1447UL_BUILD_INIT([lslocks], [check])
1448UL_REQUIRES_LINUX([lslocks])
ec1204dc 1449UL_REQUIRES_BUILD([lslocks], [libmount])
7477f356 1450UL_REQUIRES_BUILD([lslocks], [libsmartcols])
034d378b 1451AM_CONDITIONAL([BUILD_LSLOCKS], [test "x$build_lslocks" = xyes])
3dc02ef4
DB
1452
1453
bd671347
KZ
1454AC_ARG_ENABLE([switch_root],
1455 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
08b1c219 1456 [], [UL_DEFAULT_ENABLE([switch_root], [check])]
bd671347 1457)
61a074f7 1458UL_BUILD_INIT([switch_root])
a3d3b770
KZ
1459UL_REQUIRES_LINUX([switch_root])
1460UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
034d378b 1461AM_CONDITIONAL([BUILD_SWITCH_ROOT], [test "x$build_switch_root" = xyes])
bd671347
KZ
1462
1463
11125e7a
KZ
1464AC_ARG_ENABLE([pivot_root],
1465 AS_HELP_STRING([--disable-pivot_root], [do not build pivot_root]),
08b1c219 1466 [], [UL_DEFAULT_ENABLE([pivot_root], [check])]
11125e7a 1467)
61a074f7 1468UL_BUILD_INIT([pivot_root])
5cbbdfbf 1469UL_REQUIRES_LINUX([pivot_root])
9f632667 1470UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
034d378b 1471AM_CONDITIONAL([BUILD_PIVOT_ROOT], [test "x$build_pivot_root" = xyes])
11125e7a
KZ
1472
1473
c12fc5e1 1474UL_BUILD_INIT([flock], [check])
254743e4 1475UL_REQUIRES_HAVE([flock], [timer], [timer_create function])
205dbb7a
KZ
1476AM_CONDITIONAL([BUILD_FLOCK], [test "x$build_flock" = xyes])
1477
1478UL_BUILD_INIT([ipcmk], [yes])
1479AM_CONDITIONAL([BUILD_IPCMK], [test "x$build_ipcmk" = xyes])
1480
42a4a152
RM
1481AC_ARG_ENABLE([ipcrm],
1482 AS_HELP_STRING([--disable-ipcrm], [do not build ipcrm]),
1483 [], [UL_DEFAULT_ENABLE([ipcrm], [yes])]
1484)
1485UL_BUILD_INIT([ipcrm])
205dbb7a
KZ
1486AM_CONDITIONAL([BUILD_IPCRM], [test "x$build_ipcrm" = xyes])
1487
42a4a152
RM
1488AC_ARG_ENABLE([ipcs],
1489 AS_HELP_STRING([--disable-ipcs], [do not build ipcs]),
1490 [], [UL_DEFAULT_ENABLE([ipcs], [yes])]
1491)
1492UL_BUILD_INIT([ipcs])
205dbb7a
KZ
1493AM_CONDITIONAL([BUILD_IPCS], [test "x$build_ipcs" = xyes])
1494
9d20ffda
KZ
1495UL_BUILD_INIT([lsipc], [check])
1496UL_REQUIRES_LINUX([lsipc])
1497UL_REQUIRES_BUILD([lsipc], [libsmartcols])
1498AM_CONDITIONAL([BUILD_LSIPC], [test "x$build_lsipc" = xyes])
1499
8a204562
KZ
1500UL_BUILD_INIT([lsns], [check])
1501UL_REQUIRES_LINUX([lsns])
1502UL_REQUIRES_BUILD([lsns], [libsmartcols])
1503AM_CONDITIONAL([BUILD_LSNS], [test "x$build_lsns" = xyes])
1504
205dbb7a
KZ
1505UL_BUILD_INIT([renice], [yes])
1506AM_CONDITIONAL([BUILD_RENICE], [test "x$build_renice" = xyes])
1507
1508UL_BUILD_INIT([setsid], [yes])
1509AM_CONDITIONAL([BUILD_SETSID], [test "x$build_setsid" = xyes])
1510
1511UL_BUILD_INIT([readprofile], [check])
1512UL_REQUIRES_LINUX([readprofile])
1513AM_CONDITIONAL([BUILD_READPROFILE], [test "x$build_readprofile" = xyes])
1514
1515UL_BUILD_INIT([dmesg], [check])
1516UL_REQUIRES_LINUX([dmesg])
1517AM_CONDITIONAL([BUILD_DMESG], [test "x$build_dmesg" = xyes])
1518
1519UL_BUILD_INIT([ctrlaltdel], [check])
1520UL_REQUIRES_LINUX([ctrlaltdel])
e52b58e6
CTV
1521dnl we assume reboot() to be the 1-argument variant, because even considering
1522dnl widely used alternative C libraries like uclibc, dietlibc and musl,
1523dnl reboot() with multiple arguments is yet only found in glibc versions
1524dnl earlier than 2.x.
9dd55a04 1525UL_REQUIRES_HAVE([ctrlaltdel], [reboot], [reboot function])
205dbb7a
KZ
1526AM_CONDITIONAL([BUILD_CTRLALTDEL], [test "x$build_ctrlaltdel" = xyes])
1527
1528UL_BUILD_INIT([fsfreeze], [check])
1529UL_REQUIRES_LINUX([fsfreeze])
1530AM_CONDITIONAL([BUILD_FSFREEZE], [test "x$build_fsfreeze" = xyes])
1531
1532UL_BUILD_INIT([blkdiscard], [check])
1533UL_REQUIRES_LINUX([blkdiscard])
1534AM_CONDITIONAL([BUILD_BLKDISCARD], [test "x$build_blkdiscard" = xyes])
1535
1536UL_BUILD_INIT([ldattach], [check])
1537UL_REQUIRES_LINUX([ldattach])
1538AM_CONDITIONAL([BUILD_LDATTACH], [test "x$build_ldattach" = xyes])
1539
1540UL_BUILD_INIT([rtcwake], [check])
1541UL_REQUIRES_LINUX([rtcwake])
1542AM_CONDITIONAL([BUILD_RTCWAKE], [test "x$build_rtcwake" = xyes])
1543
1544UL_BUILD_INIT([setarch], [check])
1545UL_REQUIRES_LINUX([setarch])
1546AM_CONDITIONAL([BUILD_SETARCH], [test "x$build_setarch" = xyes])
1547
d3a1e3bf 1548UL_BUILD_INIT([script], [check])
651b25cd 1549UL_REQUIRES_HAVE([script], [sys_signalfd_h], [sys/signalfd.h header])
3f91b990
KZ
1550AM_CONDITIONAL([BUILD_SCRIPT], [test "x$build_script" = xyes])
1551
1552UL_BUILD_INIT([scriptreplay], [yes])
1553AM_CONDITIONAL([BUILD_SCRIPTREPLAY], [test "x$build_scriptreplay" = xyes])
1554
cb45354e
KZ
1555UL_BUILD_INIT([col], [yes])
1556AM_CONDITIONAL([BUILD_COL], [test "x$build_col" = xyes])
1557
1558UL_BUILD_INIT([colcrt], [yes])
1559AM_CONDITIONAL([BUILD_COLCRT], [test "x$build_colcrt" = xyes])
1560
1561UL_BUILD_INIT([colrm], [yes])
1562AM_CONDITIONAL([BUILD_COLRM], [test "x$build_colrm" = xyes])
1563
1564UL_BUILD_INIT([column], [yes])
1565AM_CONDITIONAL([BUILD_COLUMN], [test "x$build_column" = xyes])
1566
1567UL_BUILD_INIT([hexdump], [yes])
1568AM_CONDITIONAL([BUILD_HEXDUMP], [test "x$build_hexdump" = xyes])
1569
1570UL_BUILD_INIT([rev], [yes])
1571AM_CONDITIONAL([BUILD_REV], [test "x$build_rev" = xyes])
1572
1573UL_BUILD_INIT([tailf], [yes])
1574AM_CONDITIONAL([BUILD_TAILF], [test "x$build_tailf" = xyes])
1575
3f91b990 1576
1342ffcb
SK
1577AC_ARG_ENABLE([tunelp],
1578 AS_HELP_STRING([--enable-tunelp], [build tunelp]),
08b1c219 1579 [], [UL_DEFAULT_ENABLE([tunelp], [no])]
1342ffcb
SK
1580)
1581UL_BUILD_INIT([tunelp])
1582UL_REQUIRES_LINUX([tunelp])
034d378b 1583AM_CONDITIONAL([BUILD_TUNELP], [test "x$build_tunelp" = xyes])
1342ffcb
SK
1584
1585
48d7b13a 1586AC_ARG_ENABLE([kill],
4be753aa 1587 AS_HELP_STRING([--disable-kill], [do not build kill]),
08b1c219 1588 [], [UL_DEFAULT_ENABLE([kill], [check])]
48d7b13a 1589)
61a074f7 1590UL_BUILD_INIT([kill])
4be753aa 1591UL_REQUIRES_LINUX([kill])
034d378b 1592AM_CONDITIONAL([BUILD_KILL], [test "x$build_kill" = xyes])
48d7b13a 1593
ce602720 1594
48d7b13a 1595AC_ARG_ENABLE([last],
ce602720 1596 AS_HELP_STRING([--disable-last], [do not build last]),
08b1c219 1597 [], [UL_DEFAULT_ENABLE([last], [check])]
48d7b13a 1598)
61a074f7 1599UL_BUILD_INIT([last])
d00c10ed 1600UL_REQUIRES_HAVE([last], [utmp_h], [utmp.h header])
034d378b 1601AM_CONDITIONAL([BUILD_LAST], [test "x$build_last" = xyes])
2dc68529 1602
48d7b13a 1603
78d5ceac 1604AC_ARG_ENABLE([utmpdump],
c9b53461 1605 AS_HELP_STRING([--disable-utmpdump], [do not build utmpdump]),
d00c10ed 1606 [], [UL_DEFAULT_ENABLE([utmpdump], [check])]
78d5ceac
KZ
1607)
1608UL_BUILD_INIT([utmpdump])
d00c10ed 1609UL_REQUIRES_HAVE([utmpdump], [utmp_h], [utmp.h header])
034d378b 1610AM_CONDITIONAL([BUILD_UTMPDUMP], [test "x$build_utmpdump" = xyes])
78d5ceac
KZ
1611
1612
c135a8bd
SK
1613AC_ARG_ENABLE([line],
1614 AS_HELP_STRING([--enable-line], [build line]),
08b1c219 1615 [], [UL_DEFAULT_ENABLE([line], [no])]
c135a8bd 1616)
61a074f7 1617UL_BUILD_INIT([line])
034d378b 1618AM_CONDITIONAL([BUILD_LINE], [test "x$build_line" = xyes])
2dc68529 1619
48d7b13a
KZ
1620
1621AC_ARG_ENABLE([mesg],
5c0b406d 1622 AS_HELP_STRING([--disable-mesg], [do not build mesg]),
08b1c219 1623 [], [UL_DEFAULT_ENABLE([mesg], [yes])]
48d7b13a 1624)
61a074f7 1625UL_BUILD_INIT([mesg])
034d378b 1626AM_CONDITIONAL([BUILD_MESG], [test "x$build_mesg" = xyes])
48d7b13a
KZ
1627
1628
48d7b13a 1629AC_ARG_ENABLE([raw],
5c0b406d 1630 AS_HELP_STRING([--disable-raw], [do not build raw]),
08b1c219 1631 [], [UL_DEFAULT_ENABLE([raw], [check])]
48d7b13a 1632)
61a074f7 1633UL_BUILD_INIT([raw])
16ba8d58
KZ
1634UL_REQUIRES_LINUX([raw])
1635UL_REQUIRES_HAVE([raw], [linux_raw_h], [raw.h header file])
034d378b 1636AM_CONDITIONAL([BUILD_RAW], [test "x$build_raw" = xyes])
48d7b13a
KZ
1637
1638
48d7b13a 1639AC_ARG_ENABLE([rename],
7fa4f112 1640 AS_HELP_STRING([--disable-rename], [do not build rename]),
08b1c219 1641 [], [UL_DEFAULT_ENABLE([rename], [yes])]
48d7b13a 1642)
61a074f7 1643UL_BUILD_INIT([rename])
034d378b 1644AM_CONDITIONAL([BUILD_RENAME], [test "x$build_rename" = xyes])
48d7b13a
KZ
1645
1646
1647AC_ARG_ENABLE([reset],
7fa4f112 1648 AS_HELP_STRING([--enable-reset], [build reset]),
08b1c219 1649 [], [UL_DEFAULT_ENABLE([reset], [no])]
48d7b13a 1650)
61a074f7 1651UL_BUILD_INIT([reset])
034d378b 1652AM_CONDITIONAL([BUILD_RESET], [test "x$build_reset" = xyes])
48d7b13a
KZ
1653
1654
cc76731e
KZ
1655AC_ARG_ENABLE([vipw],
1656 AS_HELP_STRING([--enable-vipw], [build vipw]),
08b1c219 1657 [], [UL_DEFAULT_ENABLE([vipw], [no])]
48d7b13a 1658)
cc76731e 1659UL_BUILD_INIT([vipw])
d00c10ed 1660UL_REQUIRES_HAVE([vipw], [shadow_h], [shadow.h header])
034d378b 1661AM_CONDITIONAL([BUILD_VIPW], [test "x$build_vipw" = xyes])
9cb68977 1662
c94b3604 1663
aec9ecbd
KZ
1664AC_ARG_ENABLE([newgrp],
1665 AS_HELP_STRING([--enable-newgrp], [build newgrp]),
08b1c219 1666 [], [UL_DEFAULT_ENABLE([newgrp], [no])]
aec9ecbd
KZ
1667)
1668UL_BUILD_INIT([newgrp])
034d378b 1669AM_CONDITIONAL([BUILD_NEWGRP], [test "x$build_newgrp" = xyes])
aec9ecbd
KZ
1670
1671
d86918b6 1672AC_ARG_WITH([user], AS_HELP_STRING([--without-user], [compile without libuser (remote chsh)]),
034d378b 1673 [], [with_user=check]
7e4714f2 1674)
6e93c52f 1675have_user=no
3013eb9d 1676AS_IF([test "x$with_user" != xno], [
2771954b 1677 PKG_CHECK_MODULES(LIBUSER,[libuser >= 0.58], [have_user=yes], [have_user=no])
9f57e6e8
SK
1678 AS_CASE([$with_user:$have_user],
1679 [yes:no],
1680 [AC_MSG_ERROR([user selected but libuser not found])],
1681 [*:yes],
1682 [AC_DEFINE([HAVE_LIBUSER], [1], [Define if libuser is available])]
1683 )
1f6ec24c
KZ
1684 # temporary solution, libuser has stupid .pc where are exported all
1685 # private dependencies to Requires: instead of Requires.private:
3013eb9d 1686 AS_IF([test "x$have_user" = xyes], [
1f6ec24c 1687 LIBUSER_LIBS=-luser
3013eb9d
SK
1688 ])
1689])
034d378b 1690AM_CONDITIONAL([HAVE_USER], [test "x$have_user" = xyes])
7e4714f2 1691
d86918b6
KZ
1692AC_ARG_ENABLE([chfn-chsh-password],
1693 AS_HELP_STRING([--disable-chfn-chsh-password], [do not require the user to enter the password in chfn and chsh]),
034d378b 1694 [], [enable_chfn_chsh_password=yes]
d86918b6
KZ
1695)
1696
1697AC_ARG_ENABLE([chfn-chsh],
1698 AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]),
9a4e9c9d 1699 [], [UL_DEFAULT_ENABLE([chfn_chsh], [check])]
d86918b6
KZ
1700)
1701UL_BUILD_INIT([chfn_chsh])
d00c10ed 1702UL_REQUIRES_HAVE([chfn_chsh], [shadow_h], [shadow.h header])
d86918b6 1703
3013eb9d 1704AS_IF([test "x$enable_chfn_chsh_password" = xyes -o "x$have_user" = xyes], [
fe2c9909 1705 UL_REQUIRES_HAVE([chfn_chsh], [security_pam_appl_h], [PAM header file])
034d378b 1706 AC_DEFINE([CHFN_CHSH_PASSWORD], [1], [Should chfn and chsh require the user to enter the password?])
3013eb9d 1707])
034d378b
SK
1708AM_CONDITIONAL([BUILD_CHFN_CHSH], [test "x$build_chfn_chsh" = xyes])
1709AM_CONDITIONAL([CHFN_CHSH_PASSWORD], [test "x$enable_chfn_chsh_password" = xyes])
d86918b6
KZ
1710
1711AC_ARG_ENABLE([chsh-only-listed],
5c0b406d
BS
1712 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
1713 [], enable_chsh_only_listed=yes
d86918b6 1714)
7e4714f2 1715
3013eb9d
SK
1716AS_IF([test "x$enable_chsh_only_listed" = xyes], [
1717 AC_DEFINE([ONLY_LISTED_SHELLS], [1], [Should chsh allow only shells in /etc/shells?])
1718])
71681ee5 1719
2c8a3e16 1720
e7614a07
KZ
1721AC_ARG_ENABLE([login],
1722 AS_HELP_STRING([--disable-login], [do not build login]),
08b1c219 1723 [], [UL_DEFAULT_ENABLE([login], [check])]
e7614a07
KZ
1724)
1725UL_BUILD_INIT([login])
fe2c9909
WJ
1726UL_REQUIRES_HAVE([login], [security_pam_appl_h], [PAM header file])
1727UL_REQUIRES_HAVE([login], [security_pam_misc_h, security_openpam_h], [PAM conversation functions])
d00c10ed 1728UL_REQUIRES_HAVE([login], [utmp_h], [utmp.h header])
034d378b 1729AM_CONDITIONAL([BUILD_LOGIN], [test "x$build_login" = xyes])
e7614a07 1730
71681ee5
KZ
1731AC_ARG_ENABLE([login-chown-vcs],
1732 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
034d378b 1733 [], [enable_login_chown_vcs=no]
71681ee5
KZ
1734)
1735
3013eb9d 1736AS_IF([test "x$enable_login_chown_vcs" = xyes], [
034d378b 1737 AC_DEFINE([LOGIN_CHOWN_VCS], [1], [Should login chown /dev/vcsN?])
3013eb9d 1738])
71681ee5
KZ
1739
1740AC_ARG_ENABLE([login-stat-mail],
1741 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
034d378b 1742 [], [enable_login_stat_mail=no]
71681ee5
KZ
1743)
1744
3013eb9d 1745AS_IF([test "x$enable_login_stat_mail" = xyes], [
034d378b 1746 AC_DEFINE([LOGIN_STAT_MAIL], [1], [Should login stat() the mailbox?])
3013eb9d 1747])
71681ee5 1748
e7614a07 1749
88407b93
KZ
1750AC_ARG_ENABLE([nologin],
1751 AS_HELP_STRING([--disable-nologin], [do not build nologin]),
08b1c219 1752 [], [UL_DEFAULT_ENABLE([nologin], [yes])]
88407b93
KZ
1753)
1754UL_BUILD_INIT([nologin])
1755AM_CONDITIONAL([BUILD_NOLOGIN], [test "x$build_nologin" = xyes])
1756
1757
e7614a07
KZ
1758AC_ARG_ENABLE([sulogin],
1759 AS_HELP_STRING([--disable-sulogin], [do not build sulogin]),
d00c10ed 1760 [], [UL_DEFAULT_ENABLE([sulogin], [check])]
e7614a07
KZ
1761)
1762UL_BUILD_INIT([sulogin])
d00c10ed 1763UL_REQUIRES_HAVE([sulogin], [shadow_h], [shadow.h header])
034d378b 1764AM_CONDITIONAL([BUILD_SULOGIN], [test "x$build_sulogin" = xyes])
e7614a07 1765
f17f5f48 1766
ff4c5555
KZ
1767AC_ARG_ENABLE([su],
1768 AS_HELP_STRING([--disable-su], [do not build su]),
08b1c219 1769 [], [UL_DEFAULT_ENABLE([su], [check])]
ff4c5555
KZ
1770)
1771UL_BUILD_INIT([su])
fe2c9909 1772UL_REQUIRES_HAVE([su], [security_pam_appl_h], [PAM header file])
d00c10ed 1773UL_REQUIRES_HAVE([su], [utmp_h], [utmp.h header])
034d378b 1774AM_CONDITIONAL([BUILD_SU], [test "x$build_su" = xyes])
ff4c5555
KZ
1775
1776
7ec6adb1
KZ
1777AC_ARG_ENABLE([runuser],
1778 AS_HELP_STRING([--disable-runuser], [do not build runuser]),
08b1c219 1779 [], [UL_DEFAULT_ENABLE([runuser], [check])]
7ec6adb1
KZ
1780)
1781UL_BUILD_INIT([runuser])
fe2c9909 1782UL_REQUIRES_HAVE([runuser], [security_pam_appl_h], [PAM header file])
d00c10ed 1783UL_REQUIRES_HAVE([runuser], [utmp_h], [utmp.h header])
034d378b 1784AM_CONDITIONAL([BUILD_RUNUSER], [test "x$build_runuser" = xyes])
7ec6adb1
KZ
1785
1786
53b22add
KZ
1787AC_ARG_ENABLE([ul],
1788 AS_HELP_STRING([--disable-ul], [do not build ul]),
08b1c219 1789 [], [UL_DEFAULT_ENABLE([ul], [check])]
53b22add
KZ
1790)
1791UL_BUILD_INIT([ul])
4ffcc7a9 1792UL_REQUIRES_HAVE([ul], [ncursesw, tinfo, ncurses], [ncursesw, ncurses or tinfo libraries])
034d378b 1793AM_CONDITIONAL([BUILD_UL], [test "x$build_ul" = xyes])
53b22add
KZ
1794
1795
1796AC_ARG_ENABLE([more],
1797 AS_HELP_STRING([--disable-more], [do not build more]),
08b1c219 1798 [], [UL_DEFAULT_ENABLE([more], [check])]
53b22add
KZ
1799)
1800UL_BUILD_INIT([more])
4ffcc7a9 1801UL_REQUIRES_HAVE([more], [ncursesw, tinfo, ncurses, termcap], [ncursesw, ncurses, tinfo or termcap libraries])
034d378b 1802AM_CONDITIONAL([BUILD_MORE], [test "x$build_more" = xyes])
53b22add
KZ
1803
1804
1805AC_ARG_ENABLE([pg],
00971cca
SK
1806 AS_HELP_STRING([--enable-pg], [build pg]),
1807 [], [UL_DEFAULT_ENABLE([pg], [no])]
53b22add
KZ
1808)
1809UL_BUILD_INIT([pg])
4ffcc7a9 1810UL_REQUIRES_HAVE([pg], [ncursesw, ncurses], [ncurses or ncursesw library])
034d378b 1811AM_CONDITIONAL([BUILD_PG], [test "x$build_pg" = xyes])
53b22add
KZ
1812
1813
d78d0409
KZ
1814AC_ARG_ENABLE([setterm],
1815 AS_HELP_STRING([--disable-setterm], [do not build setterm]),
08b1c219 1816 [], [UL_DEFAULT_ENABLE([setterm], [check])]
d78d0409
KZ
1817)
1818UL_BUILD_INIT([setterm])
1819UL_REQUIRES_LINUX([setterm])
4ffcc7a9 1820UL_REQUIRES_HAVE([setterm], [ncursesw, ncurses], [ncurses or ncurses library])
034d378b 1821AM_CONDITIONAL([BUILD_SETTERM], [test "x$build_setterm" = xyes])
d78d0409 1822
d6ace0b8
KZ
1823# build_schedutils= is just configure-only variable to control
1824# ionice, taskset and chrt
48d7b13a 1825AC_ARG_ENABLE([schedutils],
34228e69 1826 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, taskset]),
08b1c219 1827 [], [UL_DEFAULT_ENABLE([schedutils], [yes])]
48d7b13a 1828)
61a074f7 1829UL_BUILD_INIT([schedutils])
17d5e11b 1830
61a074f7 1831UL_BUILD_INIT([ionice], [check])
17d5e11b
KZ
1832UL_REQUIRES_BUILD([ionice], [schedutils])
1833UL_REQUIRES_SYSCALL_CHECK([ionice],
1834 [UL_CHECK_SYSCALL([ioprio_set],
f06b4328
SK
1835 [alpha], [442],
1836 [i*86], [289],
1837 [ia64*], [1274],
1838 [powerpc*], [273],
1839 [s390*], [282],
1840 [sparc*], [196],
1841 [sh*], [288],
1842 [x86_64*], [251])],
17d5e11b
KZ
1843 [ioprio_set])
1844
1845UL_REQUIRES_SYSCALL_CHECK([ionice],
1846 [UL_CHECK_SYSCALL([ioprio_get],
f06b4328
SK
1847 [alpha], [443],
1848 [i*86], [290],
1849 [ia64*], [1275],
1850 [powerpc*], [274],
1851 [s390*], [283],
1852 [sparc*], [218],
1853 [sh*], [289],
1854 [x86_64*], [252])],
17d5e11b
KZ
1855 [ioprio_get])
1856
034d378b 1857AM_CONDITIONAL([BUILD_IONICE], [test "x$build_ionice" = xyes])
17d5e11b 1858
61a074f7 1859UL_BUILD_INIT([taskset], [check])
17d5e11b 1860UL_REQUIRES_BUILD([taskset], [schedutils])
e21e6d26 1861UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
17d5e11b
KZ
1862UL_REQUIRES_SYSCALL_CHECK([taskset],
1863 [UL_CHECK_SYSCALL([sched_getaffinity])],
1864 [sched_getaffinity])
034d378b 1865AM_CONDITIONAL([BUILD_TASKSET], [test "x$build_taskset" = xyes])
48d7b13a 1866
ee20c303
RM
1867
1868have_schedsetter=no
1869AS_IF([test "x$ac_cv_func_sched_setscheduler" = xyes], [have_schedsetter=yes],
1870 [test "x$ac_cv_func_sched_setattr" = xyes], [have_schedsetter=yes])
1871
d6ace0b8
KZ
1872UL_BUILD_INIT([chrt], [check])
1873UL_REQUIRES_BUILD([chrt], [schedutils])
ee20c303 1874UL_REQUIRES_HAVE([chrt], [schedsetter], [sched_set functions])
d6ace0b8
KZ
1875AM_CONDITIONAL([BUILD_CHRT], [test "x$build_chrt" = xyes])
1876
15167589
KZ
1877AS_IF([test "x$build_chrt" = xyes], [
1878 UL_CHECK_SYSCALL([sched_setattr])
1879])
1880
48d7b13a
KZ
1881
1882AC_ARG_ENABLE([wall],
7fa4f112 1883 AS_HELP_STRING([--disable-wall], [do not build wall]),
d00c10ed 1884 [], [UL_DEFAULT_ENABLE([wall], [check])]
48d7b13a 1885)
8fc8888b 1886UL_BUILD_INIT([wall])
d00c10ed 1887UL_REQUIRES_HAVE([wall], [utmp_h], [utmp.h header])
034d378b 1888AM_CONDITIONAL([BUILD_WALL], [test "x$build_wall" = xyes])
48d7b13a
KZ
1889
1890
1891AC_ARG_ENABLE([write],
7fa4f112 1892 AS_HELP_STRING([--enable-write], [build write]),
08b1c219 1893 [], [UL_DEFAULT_ENABLE([write], [no])]
48d7b13a 1894)
61a074f7 1895UL_BUILD_INIT([write])
d00c10ed 1896UL_REQUIRES_HAVE([write], [utmp_h], [utmp.h header])
034d378b 1897AM_CONDITIONAL([BUILD_WRITE], [test "x$build_write" = xyes])
48d7b13a
KZ
1898
1899
5a971329
KZ
1900AC_ARG_WITH([btrfs],
1901 AS_HELP_STRING([--with-btrfs], [build with support for btrfs]),
1902 [], [with_btrfs=check]
1903)
1904have_btrfs=no
1905AS_IF([test "x$with_btrfs" != xno], [
1906 AS_CASE([$with_btrfs:$have_linux_btrfs_h],
1907 [yes:no],
1908 [AC_MSG_ERROR([btrfs selected but linux/btrfs.h not found])],
1909 [check:no],
1910 [AC_MSG_WARN([linux/btrfs.h not found, do not build with btrfs support])],
1911 [*:yes],
1912 [have_btrfs=yes
1913 AC_DEFINE([HAVE_BTRFS_SUPPORT], [1], [Define if btrfs stuff is available])]
1914 )
1915])
1916AM_CONDITIONAL([HAVE_BTRFS], [test "x$have_btrfs" = xyes])
1917
1918
ebff016a
KZ
1919AC_ARG_WITH([systemd],
1920 AS_HELP_STRING([--with-systemd], [build with support for systemd]),
1921 [], [with_systemd=check]
1922)
1923
1924have_systemd=no
1925AS_IF([test "x$with_systemd" != xno], [
1926 # new version -- all libsystemd-* libs merged into libsystemd
1927 PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [have_systemd=yes], [have_systemd=no])
1928 # old versions
1929 AS_IF([test "x$have_systemd" != "xyes"], [
1930 PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
1931 [have_systemd_daemon=yes], [have_systemd_daemon=no])
1932 PKG_CHECK_MODULES([SYSTEMD_JOURNAL], [libsystemd-journal],
1933 [have_systemd_journal=yes], [have_systemd_journal=no])
1934 AS_IF([test "x$have_systemd_daemon" = "xyes" -a "x$have_systemd_journal" = "xyes" ],[
1935 have_systemd=yes])
ea45d34c 1936 ])
ebff016a
KZ
1937 AS_CASE([$with_systemd:$have_systemd],
1938 [yes:no],
1939 [AC_MSG_ERROR([systemd expected but libsystemd not found])],
1940 [*:yes],
1941 AC_DEFINE([HAVE_LIBSYSTEMD], [1], [Define if libsystemd is available])
1942 )
3013eb9d 1943])
ebff016a
KZ
1944AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes])
1945
bbe289c4 1946
1b68c379
PU
1947AC_ARG_WITH([systemdsystemunitdir],
1948 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files]),
c8498f2f 1949 [], [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`])
1b68c379 1950
3013eb9d 1951AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
1b68c379 1952 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
3013eb9d 1953])
1b68c379 1954
bbe289c4 1955
b8095d25
KZ
1956AC_ARG_WITH([smack],
1957 AS_HELP_STRING([--with-smack], [build with SMACK support]),
1958 [], [with_smack=no]
1959)
1960AS_IF([test "x$with_smack" = xyes], [
1961 AC_DEFINE([HAVE_SMACK], [1], [Add SMACK support])
1962])
1963
1964
9cc36e9f
SK
1965AC_ARG_WITH([bashcompletiondir],
1966 AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
1967 [],
c8498f2f
SK
1968 [AS_IF([`$PKG_CONFIG --exists bash-completion`], [
1969 with_bashcompletiondir=`$PKG_CONFIG --variable=completionsdir bash-completion`
9cc36e9f
SK
1970 ], [
1971 with_bashcompletiondir=${datadir}/bash-completion/completions
1972 ])
1973])
1974AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1975
ece777e9
KZ
1976AC_ARG_ENABLE([bash-completion],
1977 AS_HELP_STRING([--disable-bash-completion], [do not install bash completion files]),
034d378b 1978 [], [enable_bash_completion=yes]
ece777e9
KZ
1979)
1980
034d378b 1981AM_CONDITIONAL([BUILD_BASH_COMPLETION], [test "x$enable_bash_completion" = xyes])
ece777e9 1982
9cc36e9f 1983
d78df0ac 1984AC_ARG_WITH([python],
4c54effb
KZ
1985 AS_HELP_STRING([--without-python], [do not build python bindings, use --with-python={2,3} to force version]),
1986 [], [with_python=check withval=check]
d78df0ac 1987)
8e5c4675 1988
d78df0ac 1989have_python=no
b2ae8c57 1990have_libpython=no
8e5c4675
KZ
1991AS_IF([test "x$with_python" != xno], [
1992 # We follow distributions default and look for PKG module name "python"
1993 # (minimal version is 2) but if major version is explicitly specified by
1994 # --with-python=2 or --with-python=3 then we look for PKG module "python2" or
1995 # "python3".
4c54effb 1996 AS_IF([test "x$withval" != xno -a "x$withval" != xyes -a "x$withval" != xcheck],
0b567ae5 1997 [pymajor="$withval"; PYTHON=python${pymajor}], [pymajor="2"])
b2ae8c57
KZ
1998
1999 # check for python interpreter
0b567ae5 2000 AM_PATH_PYTHON([$pymajor], [have_python=yes], [have_python=no])
8e5c4675
KZ
2001 AS_CASE([$with_python:$have_python],
2002 [yes:no],
b2ae8c57 2003 [AC_MSG_ERROR([python selected but python interpreter not found])],
4c54effb 2004 [check:no],
b2ae8c57 2005 [AC_MSG_WARN([python interpreter not found, do not build python bindings])],
4c54effb 2006 [*:yes],
b2ae8c57
KZ
2007 # check for python development stuff
2008 [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION],
2009 [have_libpython=yes], [have_libpython=no])]
8e5c4675 2010 )
d78df0ac
KZ
2011])
2012
da0ec90b
KZ
2013
2014AC_ARG_ENABLE([pylibmount],
2015 AS_HELP_STRING([--disable-pylibmount], [do not build pylibmount]),
2016 [], [UL_DEFAULT_ENABLE([pylibmount], [check])]
2017)
2018UL_BUILD_INIT([pylibmount])
b2ae8c57 2019UL_REQUIRES_HAVE([pylibmount], [libpython], [libpython])
da0ec90b 2020UL_REQUIRES_BUILD([pylibmount], [libmount])
d78df0ac
KZ
2021AM_CONDITIONAL([BUILD_PYLIBMOUNT], [test "x$build_pylibmount" = "xyes"])
2022
324330ac
FB
2023# We need to introduce a verbatim dependency into the Makefile, without automake
2024# trying to interpret it, so push it as a AM_SUBST_NOTMAKE variable.
2025verbatim_pylibmount_dependency='
2026
2027# pylibmountexec module must be installed after usrlib_exec libraries,
2028# otherwise the libtool relink step will fail to find libmount.la and
2029# will try -lmount which is possibly not available.
2030install-pylibmountexecLTLIBRARIES: install-usrlib_execLTLIBRARIES
2031
2032'
2033AC_SUBST([verbatim_pylibmount_dependency])
2034AM_SUBST_NOTMAKE([verbatim_pylibmount_dependency])
d78df0ac 2035
48d7b13a 2036AC_ARG_ENABLE([pg-bell],
7fa4f112 2037 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
034d378b 2038 [], [enable_pg_bell=yes]
48d7b13a
KZ
2039)
2040
3013eb9d 2041AS_IF([test "x$enable_pg_bell" = xyes], [
034d378b 2042 AC_DEFINE([PG_BELL], [1], [Should pg ring the bell on invalid keys?])
3013eb9d 2043])
48d7b13a
KZ
2044
2045
bb4cb69d
MF
2046AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
2047AC_ARG_ENABLE([fs-paths-default],
2048 AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
9f57e6e8
SK
2049 [AS_CASE([$enableval],
2050 [yes], [fs_paths_defaults="FS_PATHS_DEFAULT"],
2051 [no], [fs_paths_defaults=""],
2052 [fs_paths_defaults="$enableval"]
2053 )],
bb4cb69d
MF
2054 [fs_paths_defaults="FS_PATHS_DEFAULT"]
2055)
2056AC_ARG_ENABLE([fs-paths-extra],
2057 AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
9f57e6e8
SK
2058 [AS_CASE([$enableval],
2059 [yes|no], [fs_paths_extra=""],
2060 [fs_paths_extra="$enableval"]
2061 )],
bb4cb69d
MF
2062 [fs_paths_extra=""]
2063)
2064fs_paths="$fs_paths_defaults"
3013eb9d
SK
2065AS_IF([test "x$fs_paths_extra" != "x"], [
2066 AS_IF([test "x$fs_paths" != "x"], [
bb4cb69d 2067 fs_paths="${fs_paths}:"
3013eb9d 2068 ])
bb4cb69d 2069 fs_paths="${fs_paths}${fs_paths_extra}"
3013eb9d 2070])
bb4cb69d
MF
2071AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
2072
2073
48d7b13a 2074AC_ARG_ENABLE([use-tty-group],
7fa4f112 2075 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
034d378b 2076 [], [enable_use_tty_group=yes]
48d7b13a 2077)
034d378b 2078AM_CONDITIONAL([USE_TTY_GROUP], [test "x$enable_use_tty_group" = xyes])
48d7b13a 2079
3013eb9d 2080AS_IF([test "x$enable_use_tty_group" = xyes], [
034d378b 2081 AC_DEFINE([USE_TTY_GROUP], [1], [Should wall and write be installed setgid tty?])
3013eb9d 2082])
48d7b13a 2083
ab6478ef
WF
2084
2085AC_ARG_ENABLE([sulogin-emergency-mount],
479d50bd
DR
2086 AS_HELP_STRING([--enable-sulogin-emergency-mount],
2087 [use emergency mount of /dev and /proc for sulogin]),
034d378b 2088 [], [enable_sulogin_emergency_mount=no]
ab6478ef
WF
2089)
2090
3013eb9d 2091AS_IF([test "x$enable_sulogin_emergency_mount" = xyes], [
034d378b 2092 AC_DEFINE([USE_SULOGIN_EMERGENCY_MOUNT], [1],
ab6478ef 2093 [Should sulogin use a emergency mount of /dev and /proc?])
3013eb9d 2094])
ab6478ef
WF
2095
2096
f71d1104
KZ
2097AC_ARG_ENABLE([usrdir-path],
2098 AS_HELP_STRING([--enable-usrdir-path], [use only /usr paths in PATH env. variable (recommended on systems with /bin -> /usr/bin symlinks)]),
2099 [], [enable_usrdir_path=no]
2100)
2101
2102AS_IF([test "x$enable_usrdir_path" == xyes], [
2103 AC_DEFINE([USE_USRDIR_PATHS_ONLY], [1], [Define to 1 to remove /bin and /sbin from PATH env.variable])
2104])
2105
2106
f3831bbd
KZ
2107AC_ARG_ENABLE([makeinstall-chown],
2108 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
034d378b 2109 [], [enable_makeinstall_chown=yes]
f3831bbd 2110)
034d378b 2111AM_CONDITIONAL([MAKEINSTALL_DO_CHOWN], [test "x$enable_makeinstall_chown" = xyes])
f3831bbd 2112
81f55ab9 2113
4c24a7ae
KZ
2114AC_ARG_ENABLE([makeinstall-setuid],
2115 AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
034d378b 2116 [], [enable_makeinstall_setuid=yes]
4c24a7ae 2117)
034d378b 2118AM_CONDITIONAL([MAKEINSTALL_DO_SETUID], [test "x$enable_makeinstall_setuid" = xyes])
4c24a7ae 2119
06bcee19 2120
81f55ab9
KZ
2121AC_ARG_ENABLE([colors-default],
2122 AS_HELP_STRING([--disable-colors-default], [do not colorize output from utils by default]),
2123 [], [enable_colors_default=yes]
2124)
2125AS_IF([test "x$enable_colors_default" = xyes], [
2126 AC_DEFINE([USE_COLORS_BY_DEFAULT], [1], [Enables colorized output from utils by default])
2127])
2128
2129
1f10890f
SK
2130AC_ARG_VAR([SUID_CFLAGS],
2131 [CFLAGS used for binaries which are usually with the suid bit])
2132AC_ARG_VAR([SUID_LDFLAGS],
2133 [LDFLAGS used for binaries which are usually with the suid bit])
06bcee19 2134
03d00d49
KZ
2135AC_ARG_VAR([DAEMON_CFLAGS],
2136 [CFLAGS used for binaries which are usually executed as daemons])
2137AC_ARG_VAR([DAEMON_LDFLAGS],
2138 [LDFLAGS used for binaries which are usually executed as daemons])
2139
2140AC_ARG_VAR([SOLIB_CFLAGS],
2141 [CFLAGS used for shared libraries])
2142AC_ARG_VAR([SOLIB_LDFLAGS],
2143 [LDFLAGS used for shared libraries])
2144
2ad21963
KZ
2145AC_ARG_VAR([ADJTIME_PATH],
2146 [Path to hwclock adjtime file, default /etc/adjtime])
2147AS_IF([test "x$ADJTIME_PATH" = x], [ADJTIME_PATH="/etc/adjtime"])
2148AC_DEFINE_UNQUOTED([CONFIG_ADJTIME_PATH], "$ADJTIME_PATH", [Path to hwclock adjtime file])
2149
2150
9cb68977 2151LIBS=""
48d7b13a 2152
48d7b13a 2153
034d378b 2154AC_CONFIG_HEADERS([config.h])
48d7b13a 2155
d4baf92e
KZ
2156#
2157# Don't use configure.ac to replace install paths! See Makefile PATHFILES for
2158# more details.
2159#
8eeb575c 2160AC_CONFIG_FILES([
f06b4328 2161Makefile
31a938ac 2162libblkid/docs/Makefile
8fb4efae 2163libblkid/docs/version.xml
8fb4efae 2164libblkid/src/blkid.h
705854f3
KZ
2165libfdisk/docs/Makefile
2166libfdisk/docs/version.xml
2167libfdisk/src/libfdisk.h
31a938ac 2168libmount/docs/Makefile
2aefc0a8 2169libmount/docs/version.xml
f06b4328 2170libmount/src/libmount.h
1d90bcb1
OO
2171libsmartcols/docs/Makefile
2172libsmartcols/docs/version.xml
1a4d989e 2173libsmartcols/src/libsmartcols.h
f06b4328 2174po/Makefile.in
8eeb575c 2175])
48d7b13a
KZ
2176
2177AC_OUTPUT
4e1073c2
KZ
2178
2179AC_MSG_RESULT([
2180 ${PACKAGE} ${VERSION}
2181
2182 prefix: ${prefix}
2183 exec prefix: ${exec_prefix}
2184
5c0b406d
BS
2185 localstatedir: ${localstatedir}
2186 bindir: ${bindir}
4e1073c2
KZ
2187 sbindir: ${sbindir}
2188 libdir: ${libdir}
2189 includedir: ${includedir}
5c0b406d
BS
2190 usrbin_execdir: ${usrbin_execdir}
2191 usrsbin_execdir: ${usrsbin_execdir}
2192 usrlib_execdir: ${usrlib_execdir}
4e1073c2
KZ
2193
2194 compiler: ${CC}
2195 cflags: ${CFLAGS}
2196 suid cflags: ${SUID_CFLAGS}
2197 ldflags: ${LDFLAGS}
2198 suid ldflags: ${SUID_LDFLAGS}
8e5c4675 2199
0b567ae5
SK
2200 Python: ${PYTHON}
2201 Python version: ${PYTHON_VERSION}
3745d4a9
KZ
2202 Python libs: ${pyexecdir}
2203
8e5c4675 2204 Bash completions: ${with_bashcompletiondir}
ebff016a 2205 Systemd support: ${have_systemd}
5a971329 2206 Btrfs support: ${have_btrfs}
18dae5d8 2207 Wide-char support: ${build_widechar}
4e1073c2
KZ
2208
2209 warnings:
2210
2211${WARN_CFLAGS}
b4b84389
KZ
2212
2213 Type 'make' or 'make <utilname>' to compile.
4e1073c2 2214])