]> git.ipfire.org Git - thirdparty/util-linux.git/blame - configure.ac
tailf: inotify based reimplementation
[thirdparty/util-linux.git] / configure.ac
CommitLineData
7fc9786b 1AC_INIT(util-linux-ng, 2.14, kzak@redhat.com)
baf39af1 2
7fc9786b 3AC_PREREQ(2.60)
48d7b13a
KZ
4
5AC_CONFIG_AUX_DIR(config)
6
42d2a7ba 7AM_INIT_AUTOMAKE([check-news -Wall foreign 1.9 dist-bzip2])
48d7b13a
KZ
8
9AC_CONFIG_SRCDIR(mount/mount.c)
10
15a9b48c
SK
11AC_PREFIX_DEFAULT([/usr])
12
13# Check whether exec_prefix=/usr:
14case $exec_prefix:$prefix in
15NONE:NONE | NONE:/usr | /usr:*)
16 AC_MSG_NOTICE([Default --exec-prefix detected.])
17 case $bindir in
18 '${exec_prefix}/bin') bindir=/bin
19 AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
20 esac
21 case $sbindir in
22 '${exec_prefix}/sbin') sbindir=/sbin
23 AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
24 esac ;;
25esac
48d7b13a
KZ
26
27AC_PROG_CC_STDC
240f7101 28AC_GNU_SOURCE
48d7b13a
KZ
29
30AC_PATH_PROG(PERL, perl)
3f5bda01
KZ
31AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin])
32AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
48d7b13a
KZ
33
34AC_SYS_LARGEFILE
35
e460a5bf 36AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
48d7b13a
KZ
37#ifdef HAVE_LINUX_COMPILER_H
38#include <linux/compiler.h>
39#endif
40])
bf962c0a
SK
41AC_CHECK_HEADERS(
42 [scsi/scsi.h \
43 langinfo.h \
8b7f16fc 44 locale.h \
bf962c0a
SK
45 sys/user.h \
46 rpcsvc/nfs_prot.h \
47 sys/io.h \
66ed63a1 48 pty.h \
5d2c98e1
SK
49 err.h \
50 linux/version.h])
fd67be31
SK
51AC_CHECK_HEADERS([linux/raw.h],
52 [AM_CONDITIONAL([HAVE_RAW], [true])],
53 [AM_CONDITIONAL([HAVE_RAW], [false])])
48d7b13a 54
bf962c0a
SK
55AC_CHECK_FUNCS(
56 [inet_aton \
57 fsync \
58 getdomainname \
e27a08ab 59 get_current_dir_name \
bf962c0a
SK
60 nanosleep \
61 personality \
62 updwtmp \
63 lchown \
fc7aeb09 64 inotify_init \
bf962c0a 65 rpmatch])
48d7b13a 66AC_FUNC_FSEEKO
48d7b13a 67
fd67be31
SK
68dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION)
69dnl ---------------------------------
70AC_DEFUN([UTIL_CHECK_LIB], [
71 dnl The trick is to keep the third argument to AC_CHECK_LIB empty,
72 dnl and thus keep the default action.
73 have_$1=yes
74 AC_CHECK_LIB([$1], [$2], [], [have_$1=no])
75 AM_CONDITIONAL(AS_TR_CPP(HAVE_$1), [test $have_$1 = yes])
76])
9dc801d2 77
fd67be31 78UTIL_CHECK_LIB(uuid, uuid_is_null)
9dc801d2
KZ
79if test $have_uuid = no; then
80 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
81fi
82
fd67be31
SK
83UTIL_CHECK_LIB(util, openpty)
84UTIL_CHECK_LIB(termcap, tgetnum)
48d7b13a 85
40f07ff7 86AC_ARG_WITH([fsprobe],
baae33d0
KZ
87 [AS_HELP_STRING([--with-fsprobe], [library to guess filesystems (blkid|volume_id), default is blkid])],
88 [], [with_fsprobe=blkid]
40f07ff7
KZ
89)
90
91AM_CONDITIONAL(HAVE_BLKID, false)
92AM_CONDITIONAL(HAVE_VOLUME_ID, false)
93
94have_blkid=no
95have_volume_id=no
96if test x$with_fsprobe = xblkid; then
97 UTIL_CHECK_LIB(blkid, blkid_known_fstype)
98elif test x$with_fsprobe = xvolume_id; then
9f70f8b1 99 UTIL_CHECK_LIB(volume_id, volume_id_encode_string)
40f07ff7
KZ
100fi
101
102if test $have_blkid = no && test $have_volume_id = no; then
baae33d0 103 AC_MSG_ERROR([blkid or volume_id is needed to build util-linux-ng.])
40f07ff7 104fi
48d7b13a 105
8eeb575c 106AM_GNU_GETTEXT_VERSION([0.14.1])
48d7b13a 107AM_GNU_GETTEXT([external])
1b4a3d89 108if test -d $srcdir/po
8eeb575c 109then
1b4a3d89 110 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
8eeb575c
KZ
111else
112 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"
113fi
48d7b13a 114
fd67be31
SK
115have_ncurses=no
116AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [have_ncurses=yes])
117case $have_ncurses in
4445728f
KZ
118yes)
119 AC_MSG_NOTICE([you have ncurses])
120 AC_DEFINE(HAVE_NCURSES, 1, [Do we have -lncurses?])
121 ;;
122no)
123 AC_MSG_NOTICE([you do not have ncurses])
124 ;;
fd67be31 125esac
48d7b13a
KZ
126AM_CONDITIONAL(HAVE_NCURSES, test x$have_ncurses = xyes)
127
48d7b13a 128AC_ARG_WITH([slang],
7fa4f112 129 AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
271d98e0 130 [], with_slang=no
48d7b13a
KZ
131)
132
46e71118
AM
133have_tinfo=no
134AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
135AM_CONDITIONAL(HAVE_TINFO, test x$have_tinfo = xyes)
136
fd67be31 137use_slang=no
48d7b13a 138if test x$with_slang = xyes; then
fd67be31
SK
139 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
140 if test $use_slang = no; then
48d7b13a
KZ
141 AC_MSG_ERROR([slang selected but slcurses.h not found])
142 fi
143fi
fd67be31 144AM_CONDITIONAL(USE_SLANG, test $use_slang = yes)
48d7b13a
KZ
145
146
cf002530 147AC_LINK_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
148#define _XOPEN_SOURCE
149#include <unistd.h>
cf002530 150]], [[
48d7b13a 151char *c = crypt("abc","pw");
cf002530 152]])],[],[
48d7b13a 153 LIBS="$LIBS -lcrypt"
cf002530 154 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
155 #define _XOPEN_SOURCE
156 #include <unistd.h>
cf002530 157 ]], [[
48d7b13a 158 char *c = crypt("abc","pw");
cf002530 159 ]])],[
48d7b13a
KZ
160 AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
161 need_libcrypt=yes
162 ],[
163 AC_MSG_ERROR([crypt() is not available])
164 ])
48d7b13a
KZ
165])
166
167AM_CONDITIONAL(NEED_LIBCRYPT, test x$need_libcrypt = xyes)
168
cf002530 169AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a 170#include <stdio.h>
cf002530 171]], [[
48d7b13a 172printf(__progname);
cf002530
SK
173]])],
174[AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
175])
48d7b13a
KZ
176
177
cf002530 178AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
179#include <wchar.h>
180#include <wctype.h>
181#include <stdio.h>
cf002530 182]], [[
48d7b13a
KZ
183 wchar_t wc;
184 wint_t w;
185 w = fgetwc(stdin);
186 if (w == WEOF) exit(1);
187 wc = w;
188 fputwc(wc,stdout);
cf002530
SK
189]])],
190[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
191])
48d7b13a
KZ
192
193
72065909
MF
194dnl UTIL_CHECK_SYSCALL(SYSCALL, FALLBACK, ...)
195dnl Only specify FALLBACK if the SYSCALL
196dnl you're checking for is a "newish" one
197dnl -------------------------------------
198AC_DEFUN([UTIL_CHECK_SYSCALL], [
199 dnl This macro uses host_cpu.
200 AC_REQUIRE([AC_CANONICAL_HOST])
201 AC_CACHE_CHECK([for syscall $1],
202 [util_cv_syscall_$1],
203 [_UTIL_SYSCALL_CHECK_DECL([SYS_$1],
204 [syscall=SYS_$1],
205 [dnl Our libc failed use, so see if we can get the kernel
206 dnl headers to play ball ...
207 _UTIL_SYSCALL_CHECK_DECL([_NR_$1],
208 [syscall=_NR_$1],
209 [
210 syscall=no
211 case $host_cpu in
212 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@))
213 esac
214 ])
215 ])
216 util_cv_syscall_$1=$syscall
217 ])
218 AM_CONDITIONAL([HAVE_]m4_toupper($1), [test $util_cv_syscall_$1 != no])
219 case $util_cv_syscall_$1 in #(
220 no) AC_MSG_WARN([Unable to detect syscall $1.]) ;;
221 SYS_*) ;;
222 *) AC_DEFINE_UNQUOTED([SYS_$1], [$util_cv_syscall_$1],
223 [Fallback syscall number for $1]) ;;
224 esac
225])
226
227dnl _UTIL_SYSCALL_CHECK_DECL(SYMBOL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
228dnl Check if SYMBOL is declared, using the headers needed for syscall checks.
229dnl -------------------------------------
230m4_define([_UTIL_SYSCALL_CHECK_DECL],
231[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
232#include <sys/syscall.h>
233#include <unistd.h>
72065909
MF
234]], [[int test = $1;]])],
235[$2], [$3])
236])
48d7b13a 237
72065909
MF
238dnl _UTIL_CHECK_SYSCALL_FALLBACK(PATTERN, VALUE, ...)
239dnl Helper macro to create the body for the above `case'.
240dnl -------------------------------------
241m4_define([_UTIL_CHECK_SYSCALL_FALLBACK],
242[m4_ifval([$1],
243 [#(
244 $1) syscall="$2" ;;dnl
245 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shiftn(2, $@))])dnl
246])
48d7b13a 247
72065909
MF
248
249UTIL_CHECK_SYSCALL([pivot_root])
250UTIL_CHECK_SYSCALL([sched_getaffinity])
251UTIL_CHECK_SYSCALL([ioprio_set],
252 [alpha], [442],
253 [i*86], [289],
254 [ia64*], [1274],
255 [powerpc*], [273],
256 [s390*], [282],
257 [sparc*], [196],
258 [x86_64*], [251])
259UTIL_CHECK_SYSCALL([ioprio_get],
260 [alpha], [443],
261 [i*86], [290],
262 [ia64*], [1275],
263 [powerpc*], [274],
264 [s390*], [283],
265 [sparc*], [218],
266 [x86_64*], [252])
19a224ad
MF
267
268
cf002530 269AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
270#include <time.h>
271#include <unistd.h>
cf002530 272]], [[
48d7b13a
KZ
273 int a = 0;
274 struct tm *tm = localtime(0);
275 if (a == -1) /* false */
276 sleep(tm->tm_gmtoff);
cf002530
SK
277]])],
278[AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
279])
48d7b13a
KZ
280
281
22d36665 282AC_CHECK_HEADERS([sys/swap.h])
b3425806
SK
283
284AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
285[[
b3425806
SK
286#ifdef HAVE_SYS_SWAP_H
287# include <sys/swap.h>
288#endif
289#include <unistd.h>
290]],
291[[swapon("/dev/null", 0);]])],
292[AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
293],
294[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
295])
296
3bbc9320
ST
297case ${host_os} in
298 *linux*)
299 AM_CONDITIONAL([LINUX], [true])
300 ;;
301 *)
302 AM_CONDITIONAL([LINUX], [false])
303 ;;
304esac
b3425806 305
e782f1d4
KZ
306dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
307dnl ---------------------------------
308AC_DEFUN([UTIL_SET_ARCH], [
309 cpu_$1=false
310 case "$host" in
311 $2) cpu_$1=true ;;
312 esac
313 AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test x$cpu_$1 = xtrue])
314])
48d7b13a 315
e782f1d4
KZ
316UTIL_SET_ARCH(I86, i?86-*)
317UTIL_SET_ARCH(86_64, x86_64*)
318UTIL_SET_ARCH(IA64, ia64*)
319UTIL_SET_ARCH(S390, s390*)
320UTIL_SET_ARCH(SPARC, sparc*)
321UTIL_SET_ARCH(PPC, ppc*|powerpc*)
322UTIL_SET_ARCH(M68K, m68*)
323UTIL_SET_ARCH(MIPS, mips*)
eeadb4f4 324UTIL_SET_ARCH(HPPA, hppa*)
48d7b13a 325
6a97809b
KZ
326AC_ARG_ENABLE([arch],
327 AS_HELP_STRING([--enable-arch], [do build arch]),
328 [], enable_arch=no
329)
330AM_CONDITIONAL(BUILD_ARCH, test x$enable_arch = xyes)
48d7b13a
KZ
331
332AC_ARG_ENABLE([agetty],
7fa4f112 333 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
271d98e0 334 [], enable_agetty=yes
48d7b13a 335)
baf39af1 336AM_CONDITIONAL(BUILD_AGETTY, test x$enable_agetty = xyes)
48d7b13a 337
9cb68977 338AC_ARG_ENABLE([cramfs],
7fa4f112 339 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
271d98e0 340 [], enable_cramfs=check
9cb68977
KZ
341)
342
fd67be31
SK
343if test $enable_cramfs = no; then
344 build_cramfs=no
345else
346 build_cramfs=yes
347 dnl Trick: leave the third parameter empty to get the default action.
348 AC_CHECK_LIB(z, crc32, [], build_cramfs=no)
349 case $enable_cramfs:$build_cramfs in
350 yes:no) AC_MSG_ERROR([cramfs selected but libz not found]);;
351 esac
9cb68977 352fi
fd67be31 353AM_CONDITIONAL(BUILD_CRAMFS, test $build_cramfs = yes)
9cb68977
KZ
354
355
48d7b13a 356AC_ARG_ENABLE([elvtune],
7fa4f112 357 AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
271d98e0 358 [], enable_elvtune=no
48d7b13a 359)
baf39af1 360AM_CONDITIONAL(BUILD_ELVTUNE, test x$enable_elvtune = xyes)
48d7b13a
KZ
361
362
363AC_ARG_ENABLE([init],
7fa4f112 364 AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
271d98e0 365 [], enable_init=no
48d7b13a 366)
baf39af1 367AM_CONDITIONAL(BUILD_INIT, test x$enable_init = xyes)
48d7b13a
KZ
368
369
370AC_ARG_ENABLE([kill],
7fa4f112 371 AS_HELP_STRING([--enable-kill], [build kill]),
271d98e0 372 [], enable_kill=no
48d7b13a 373)
baf39af1 374AM_CONDITIONAL(BUILD_KILL, test x$enable_kill = xyes)
48d7b13a
KZ
375
376
377AC_ARG_ENABLE([last],
7fa4f112 378 AS_HELP_STRING([--enable-last], [build last]),
271d98e0 379 [], enable_last=no
48d7b13a 380)
baf39af1 381AM_CONDITIONAL(BUILD_LAST, test x$enable_last = xyes)
48d7b13a
KZ
382
383
384AC_ARG_ENABLE([mesg],
7fa4f112 385 AS_HELP_STRING([--enable-mesg], [build mesg]),
271d98e0 386 [], enable_mesg=no
48d7b13a 387)
baf39af1 388AM_CONDITIONAL(BUILD_MESG, test x$enable_mesg = xyes)
48d7b13a
KZ
389
390
391AC_ARG_ENABLE([partx],
7fa4f112 392 AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
271d98e0 393 [], enable_partx=no
48d7b13a 394)
baf39af1 395AM_CONDITIONAL(BUILD_PARTX, test x$enable_partx = xyes)
48d7b13a
KZ
396
397
398AC_ARG_ENABLE([raw],
7fa4f112 399 AS_HELP_STRING([--enable-raw], [build raw]),
271d98e0 400 [], enable_raw=no
48d7b13a 401)
baf39af1 402AM_CONDITIONAL(BUILD_RAW, test x$enable_raw = xyes)
48d7b13a
KZ
403
404
405AC_ARG_ENABLE([rdev],
7fa4f112 406 AS_HELP_STRING([--enable-rdev], [build rdev on i386]),
271d98e0 407 [], enable_rdev=no
48d7b13a 408)
baf39af1 409AM_CONDITIONAL(BUILD_RDEV, test x$enable_rdev = xyes)
48d7b13a
KZ
410
411
412AC_ARG_ENABLE([rename],
7fa4f112 413 AS_HELP_STRING([--disable-rename], [do not build rename]),
271d98e0 414 [], enable_rename=yes
48d7b13a 415)
baf39af1 416AM_CONDITIONAL(BUILD_RENAME, test x$enable_rename = xyes)
48d7b13a
KZ
417
418
419AC_ARG_ENABLE([reset],
7fa4f112 420 AS_HELP_STRING([--enable-reset], [build reset]),
271d98e0 421 [], enable_reset=no
48d7b13a 422)
baf39af1 423AM_CONDITIONAL(BUILD_RESET, test x$enable_reset = xyes)
48d7b13a
KZ
424
425
426AC_ARG_ENABLE([login-utils],
7fa4f112 427 AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
271d98e0 428 [], enable_login_utils=no
48d7b13a 429)
baf39af1 430AM_CONDITIONAL(BUILD_LOGIN_UTILS, test x$enable_login_utils = xyes)
48d7b13a 431
9cb68977 432AC_ARG_WITH([pam],
7fa4f112 433 [AS_HELP_STRING([--without-pam], [compile login-utils without PAM support])])
9cb68977 434
fd67be31 435AM_CONDITIONAL(HAVE_PAM, false)
9cb68977 436if test x$enable_login_utils = xyes && test x$with_pam != xno; then
fd67be31
SK
437 AC_CHECK_HEADERS([security/pam_misc.h],
438 [AM_CONDITIONAL(HAVE_PAM, true)],
439 [if test x$with_pam = xyes; then
440 AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
441 fi
442 ])
9cb68977 443fi
9cb68977
KZ
444
445AC_ARG_WITH([selinux],
7fa4f112 446 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
271d98e0 447 [], with_selinux=no
9cb68977
KZ
448)
449
fd67be31
SK
450if test x$with_selinux = xno; then
451 AM_CONDITIONAL(HAVE_SELINUX, false)
452else
453 UTIL_CHECK_LIB(selinux, getprevcon)
454 case $with_selinux:$have_selinux in
455 yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
456 esac
9cb68977 457fi
9cb68977
KZ
458
459
bbae9cb0 460AC_ARG_WITH([audit],
7fa4f112 461 AS_HELP_STRING([--with-audit], [compile with audit support]),
271d98e0 462 [], with_audit=no
bbae9cb0
KZ
463)
464
fd67be31
SK
465if test x$with_audit = xno; then
466 AM_CONDITIONAL(HAVE_AUDIT, false)
467else
468 UTIL_CHECK_LIB(audit, audit_log_user_message)
469 case $with_audit:$have_audit in
470 yes:no)
471 AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
472 ;;
473 esac
bbae9cb0 474fi
bbae9cb0 475
48d7b13a
KZ
476
477AC_ARG_ENABLE([schedutils],
7fa4f112 478 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
271d98e0 479 [], enable_schedutils=yes
48d7b13a 480)
baf39af1 481AM_CONDITIONAL(BUILD_SCHEDUTILS, test x$enable_schedutils = xyes)
48d7b13a
KZ
482
483
484AC_ARG_ENABLE([wall],
7fa4f112 485 AS_HELP_STRING([--disable-wall], [do not build wall]),
271d98e0 486 [], enable_wall=yes
48d7b13a 487)
baf39af1 488AM_CONDITIONAL(BUILD_WALL, test x$enable_wall = xyes)
48d7b13a
KZ
489
490
491AC_ARG_ENABLE([write],
7fa4f112 492 AS_HELP_STRING([--enable-write], [build write]),
271d98e0 493 [], enable_write=no
48d7b13a 494)
baf39af1 495AM_CONDITIONAL(BUILD_WRITE, test x$enable_write = xyes)
48d7b13a
KZ
496
497
498AC_ARG_ENABLE([chsh-only-listed],
7fa4f112 499 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
271d98e0 500 [], enable_chsh_only_listed=yes
48d7b13a
KZ
501)
502
baf39af1 503if test x$enable_chsh_only_listed = xyes; then
48d7b13a
KZ
504 AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
505fi
506
507
508AC_ARG_ENABLE([login-chown-vcs],
7fa4f112 509 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
271d98e0 510 [], enable_login_chown_vcs=no
48d7b13a
KZ
511)
512
baf39af1 513if test x$enable_login_chown_vcs = xyes; then
48d7b13a
KZ
514 AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
515fi
516
517
518AC_ARG_ENABLE([login-stat-mail],
7fa4f112 519 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
271d98e0 520 [], enable_login_stat_mail=no
48d7b13a
KZ
521)
522
baf39af1 523if test x$enable_login_stat_mail = xyes; then
48d7b13a
KZ
524 AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
525fi
526
527
528AC_ARG_ENABLE([pg-bell],
7fa4f112 529 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
271d98e0 530 [], enable_pg_bell=yes
48d7b13a
KZ
531)
532
baf39af1 533if test x$enable_pg_bell = xyes; then
48d7b13a
KZ
534 AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
535fi
536
537
538AC_ARG_ENABLE([require-password],
7fa4f112 539 AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
271d98e0 540 [], enable_require_password=yes
48d7b13a
KZ
541)
542
baf39af1 543if test x$enable_require_password = xyes; then
48d7b13a
KZ
544 AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
545fi
546
547
548AC_ARG_ENABLE([use-tty-group],
7fa4f112 549 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
271d98e0 550 [], enable_use_tty_group=yes
48d7b13a 551)
baf39af1 552AM_CONDITIONAL(USE_TTY_GROUP, test x$enable_use_tty_group = xyes)
48d7b13a 553
baf39af1 554if test x$enable_use_tty_group = xyes; then
48d7b13a
KZ
555 AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
556fi
557
f3831bbd
KZ
558AC_ARG_ENABLE([makeinstall-chown],
559 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
560 [], enable_makeinstall_chown=yes
561)
562AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test x$enable_makeinstall_chown = xyes)
563
06bcee19 564
1f10890f
SK
565AC_ARG_VAR([SUID_CFLAGS],
566 [CFLAGS used for binaries which are usually with the suid bit])
567AC_ARG_VAR([SUID_LDFLAGS],
568 [LDFLAGS used for binaries which are usually with the suid bit])
06bcee19 569
9cb68977 570LIBS=""
48d7b13a 571
48d7b13a
KZ
572
573AC_CONFIG_HEADERS(config.h)
574
8eeb575c
KZ
575AC_CONFIG_FILES([
576Makefile
577disk-utils/Makefile
562218e6 578fdisk/Makefile
8eeb575c
KZ
579getopt/Makefile
580hwclock/Makefile
562218e6 581include/Makefile
d00ed891 582lib/Makefile
8eeb575c
KZ
583login-utils/Makefile
584misc-utils/Makefile
585mount/Makefile
586partx/Makefile
587po/Makefile.in
588schedutils/Makefile
589sys-utils/Makefile
590text-utils/Makefile
e83446da 591tests/Makefile
0f0584ad 592tests/helpers/Makefile
e83446da 593tests/commands.sh
cc462132
SK
594misc-utils/chkdupexe:misc-utils/chkdupexe.pl
595misc-utils/scriptreplay:misc-utils/scriptreplay.pl
8eeb575c 596])
48d7b13a
KZ
597
598AC_OUTPUT