1 AC_INIT(util-linux-ng, 2.16.2, kzak@redhat.com)
5 AC_CONFIG_AUX_DIR(config)
6 AC_CONFIG_MACRO_DIR([m4])
8 AM_INIT_AUTOMAKE([check-news -Wall foreign 1.9 dist-bzip2])
10 AC_CONFIG_SRCDIR(mount/mount.c)
12 AC_PREFIX_DEFAULT([/usr])
14 dnl version details from <major>.<minor>[-<suffix>]
15 PACKAGE_VERSION_MAJOR=$(echo $PACKAGE_VERSION | awk -F. '{print $1}')
16 PACKAGE_VERSION_MINOR=$(echo $PACKAGE_VERSION | awk -F. '{print $2}' \
17 | awk -F- '{print $1}')
18 PACKAGE_VERSION_RELEASE=0
21 LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
22 LIBBLKID_DATE="10-Feb-2009"
26 LIBBLKID_VERSION_INFO=`expr $LIBBLKID_LT_MAJOR + $LIBBLKID_LT_MINOR`:$LIBBLKID_LT_MICRO:$LIBBLKID_LT_MINOR
29 LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
33 LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
35 # Check whether exec_prefix=/usr:
36 case $exec_prefix:$prefix in
37 NONE:NONE | NONE:/usr | /usr:*)
38 AC_MSG_NOTICE([Default --exec-prefix detected.])
40 '${exec_prefix}/bin') bindir=/bin
41 AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
44 '${exec_prefix}/sbin') sbindir=/sbin
45 AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
48 '${exec_prefix}/lib') libdir=/lib
49 AC_MSG_NOTICE([ --libdir defaults to /lib]) ;;
53 libdirname=`basename "$libdir"`
54 AC_SUBST([libdirname])
56 # The original default values of {bin,sbin,lib}dir
57 usrbin_execdir='${exec_prefix}/bin'
58 AC_SUBST([usrbin_execdir])
60 usrsbin_execdir='${exec_prefix}/sbin'
61 AC_SUBST([usrsbin_execdir])
63 usrlib_execdir='${exec_prefix}/'$libdirname
64 AC_SUBST([usrlib_execdir])
83 AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
85 AC_PATH_PROG(PERL, perl)
86 AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin])
87 AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
91 AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
92 #ifdef HAVE_LINUX_COMPILER_H
93 #include <linux/compiler.h>
132 AC_CHECK_HEADERS([linux/raw.h],
133 [AM_CONDITIONAL([HAVE_RAW], [true])],
134 [AM_CONDITIONAL([HAVE_RAW], [false])])
136 AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
142 get_current_dir_name \
163 AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
165 AC_CHECK_MEMBER(struct sockaddr.sa_len,
166 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
167 [#include <sys/types.h>
168 #include <sys/socket.h>])
170 dnl Static compilation
171 m4_define([UTIL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
173 AC_ARG_ENABLE([static-programs],
174 [AS_HELP_STRING([--enable-static-programs=LIST],
175 [link static the programs in LIST (comma-separated,
176 supported for ]m4_defn([UTIL_STATIC_PROGRAMS])[)])])
178 case $enable_static_programs in
179 yes) enable_static_programs=m4_quote(UTIL_STATIC_PROGRAMS) ;;
180 no) enable_static_programs= ;;
183 dnl Set all the individual AM_CONDITIONALs
184 m4_foreach([UTIL_PRG], m4_defn([UTIL_STATIC_PROGRAMS]), [
185 case ,$enable_static_programs, in
186 *,UTIL_PRG,*) static_[]UTIL_PRG=yes ;;
188 AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UTIL_PRG),
189 [test "x$static_[]UTIL_PRG" = xyes])
192 dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
193 dnl ----------------------------------
194 AC_DEFUN([UTIL_PKG_STATIC], [
195 if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
196 $1=`pkg-config --libs --static "$2"`
198 AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
202 dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
203 dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
204 dnl UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
205 dnl UTIL_CHECK_LIB(yyy, func) generates have_yyy and HAVE_LIBYYY
206 dnl ---------------------------------
207 AC_DEFUN([UTIL_CHECK_LIB], [
208 m4_define([suffix], m4_default([$3],$1))
211 [AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])],
212 [AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])])
213 AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes])
216 dnl UTIL_SET_FLAGS(CFLAGS, CPPFLAGS, LDFLAGS)
217 AC_DEFUN([UTIL_SET_FLAGS], [
219 old_CPPFLAGS="$CPPFLAGS"
220 old_LDFLAGS="$LDFLAGS"
222 CPPFLAGS="$CPPFLAGS $2"
223 LDFLAGS="$LDFLAGS $3"
226 dnl UTIL_RESTORE_FLAGS()
227 AC_DEFUN([UTIL_RESTORE_FLAGS], [
229 CPPFLAGS="$old_CPPFLAGS"
230 LDFLAGS="$old_LDFLAGS"
235 AS_HELP_STRING([--disable-tls], [disable use of thread local support]),
238 if test "x$enable_tls" = xyes; then
243 AC_ARG_ENABLE([mount],
244 AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
245 [], enable_mount=check
248 if test "x$enable_mount" = xcheck; then
249 if test "x$linux_os" = xno; then
250 AC_MSG_WARN([non-linux system; do not build mount utilities])
253 elif test "x$enable_mount" = xno; then
256 AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
259 AC_ARG_ENABLE([fsck],
260 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
263 AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
266 AC_ARG_ENABLE([libuuid],
267 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
268 [], enable_libuuid=yes
270 AC_SUBST([LIBUUID_VERSION])
271 AC_SUBST([LIBUUID_VERSION_INFO])
272 AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
275 if test "x$enable_libuuid" = xno; then
276 # Check for external (e2fsprogs) libuuid
277 PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
278 if test "x$have_uuid" = xno; then
279 # system without pkg-config or so, try classic check
280 AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
282 if test "x$have_uuid" = xyes; then
283 UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
284 AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
289 AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
292 if test "x$have_uuid" = xyes; then
293 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
295 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
297 AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
299 : ${UUID_LIBS='-luuid'}
302 AC_ARG_ENABLE([uuidd],
303 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
304 [], enable_uuidd=auto
307 case "$enable_uuidd:$have_uuid" in
309 AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
311 enable_uuidd=$have_uuid ;;
313 if test "x$enable_uuidd" = xyes; then
314 AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
316 AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes)
319 AC_ARG_ENABLE([libblkid],
320 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
321 [], enable_libblkid=yes
323 AC_SUBST([LIBBLKID_VERSION])
324 AC_SUBST([LIBBLKID_VERSION_INFO])
325 AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
326 AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
327 AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
330 if test "x$enable_libblkid" = xno; then
331 if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
332 # Check for external (e2fsprogs) libblkid
333 PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
334 if test "x$have_blkid" = xno; then
335 # system without pkg-config or so, try classic check
336 AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
338 if test "x$have_blkid" = xyes; then
339 UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
340 AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
343 if test -n "$enable_static_programs"; then
344 # TODO check only when mount of fsck are requested
345 UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
350 AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
351 AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().])
354 if test "x$have_blkid" = xyes; then
355 AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
357 if test "x$build_mount" = xyes; then
358 AC_MSG_ERROR([libblkid is needed to build util-linux-ng mount])
360 if test "x$enable_fsck" = xyes; then
361 AC_MSG_ERROR([libblkid is needed to build util-linux-ng fsck])
364 AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
366 : ${BLKID_LIBS='-lblkid -luuid'}
368 AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
371 UTIL_CHECK_LIB(util, openpty)
372 UTIL_CHECK_LIB(termcap, tgetnum)
374 AM_GNU_GETTEXT_VERSION([0.14.1])
375 AM_GNU_GETTEXT([external])
376 if test -d "$srcdir/po"
378 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
380 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"
383 AC_ARG_WITH([ncurses],
384 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
385 (--without-ncurses disables all ncurses(w) support)]),
386 [], with_ncurses=auto
388 AM_CONDITIONAL(HAVE_NCURSES, false)
390 if test "x$with_ncurses" != xno; then
392 AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [
393 if test "x$with_ncurses" = xauto; then
394 UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
395 if test "x$have_ncurses" = xyes; then
396 NCURSES_LIBS="-lncursesw"
399 if test "x$have_ncurses" = xno; then
400 UTIL_CHECK_LIB(ncurses, initscr)
401 if test "x$have_ncurses" = xyes; then
402 NCURSES_LIBS="-lncurses"
406 if test "x$have_ncurses" = xno; then
407 AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
410 AC_SUBST([NCURSES_LIBS])
414 AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
419 AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
420 AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
423 if test "x$with_slang" = xyes; then
424 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
425 if test "x$use_slang" = xno; then
426 AC_MSG_ERROR([slang selected but slcurses.h not found])
429 AM_CONDITIONAL(USE_SLANG, test "x$use_slang" = xyes)
432 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
433 #define _XOPEN_SOURCE
436 char *c = crypt("abc","pw");
439 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
440 #define _XOPEN_SOURCE
443 char *c = crypt("abc","pw");
445 AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
448 AC_MSG_ERROR([crypt() is not available])
452 AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
454 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
459 [AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
463 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
471 if (w == WEOF) exit(1);
475 [AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
479 dnl UTIL_CHECK_SYSCALL(SYSCALL, FALLBACK, ...)
480 dnl Only specify FALLBACK if the SYSCALL
481 dnl you're checking for is a "newish" one
482 dnl -------------------------------------
483 AC_DEFUN([UTIL_CHECK_SYSCALL], [
484 dnl This macro uses host_cpu.
485 AC_REQUIRE([AC_CANONICAL_HOST])
486 AC_CACHE_CHECK([for syscall $1],
487 [util_cv_syscall_$1],
488 [_UTIL_SYSCALL_CHECK_DECL([SYS_$1],
490 [dnl Our libc failed use, so see if we can get the kernel
491 dnl headers to play ball ...
492 _UTIL_SYSCALL_CHECK_DECL([_NR_$1],
496 if test "x$linux_os" = xyes; then
498 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@))
503 util_cv_syscall_$1=$syscall
505 AM_CONDITIONAL([HAVE_]m4_toupper($1), [test "x$util_cv_syscall_$1" != xno])
506 case $util_cv_syscall_$1 in #(
507 no) AC_MSG_WARN([Unable to detect syscall $1.]) ;;
509 *) AC_DEFINE_UNQUOTED([SYS_$1], [$util_cv_syscall_$1],
510 [Fallback syscall number for $1]) ;;
514 dnl _UTIL_SYSCALL_CHECK_DECL(SYMBOL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
515 dnl Check if SYMBOL is declared, using the headers needed for syscall checks.
516 dnl -------------------------------------
517 m4_define([_UTIL_SYSCALL_CHECK_DECL],
518 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
519 #include <sys/syscall.h>
521 ]], [[int test = $1;]])],
525 dnl _UTIL_CHECK_SYSCALL_FALLBACK(PATTERN, VALUE, ...)
526 dnl Helper macro to create the body for the above `case'.
527 dnl -------------------------------------
528 m4_define([_UTIL_CHECK_SYSCALL_FALLBACK],
531 $1) syscall="$2" ;;dnl
532 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shiftn(2, $@))])dnl
536 UTIL_CHECK_SYSCALL([pivot_root])
537 UTIL_CHECK_SYSCALL([sched_getaffinity])
538 UTIL_CHECK_SYSCALL([ioprio_set],
547 UTIL_CHECK_SYSCALL([ioprio_get],
558 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
563 struct tm *tm = localtime(0);
564 if (a == -1) /* false */
565 sleep(tm->tm_gmtoff);
567 [AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
570 AC_CHECK_MEMBERS([struct termios.c_line],,,
571 [[#include <termios.h>]])
582 ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
584 AC_CHECK_HEADERS([sys/swap.h])
586 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
588 #ifdef HAVE_SYS_SWAP_H
589 # include <sys/swap.h>
593 [[swapon("/dev/null", 0);]])],
594 [AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
596 [AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
600 dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
601 dnl ---------------------------------
602 AC_DEFUN([UTIL_SET_ARCH], [
607 AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test "x$cpu_$1" = xtrue])
610 UTIL_SET_ARCH(I86, i?86-*)
611 UTIL_SET_ARCH(86_64, x86_64*)
612 UTIL_SET_ARCH(IA64, ia64*)
613 UTIL_SET_ARCH(S390, s390*)
614 UTIL_SET_ARCH(SPARC, sparc*)
615 UTIL_SET_ARCH(PPC, ppc*|powerpc*)
616 UTIL_SET_ARCH(M68K, m68*)
617 UTIL_SET_ARCH(MIPS, mips*)
618 UTIL_SET_ARCH(HPPA, hppa*)
620 AC_ARG_ENABLE([arch],
621 AS_HELP_STRING([--enable-arch], [do build arch]),
624 AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
626 AC_ARG_ENABLE([agetty],
627 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
628 [], enable_agetty=yes
630 AM_CONDITIONAL(BUILD_AGETTY, test "x$enable_agetty" = xyes)
632 AC_ARG_ENABLE([cramfs],
633 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
634 [], enable_cramfs=check
637 if test "x$enable_cramfs" = xno; then
641 dnl Trick: leave the third parameter empty to get the default action.
642 AC_CHECK_LIB(z, crc32, [], build_cramfs=no)
643 case $enable_cramfs:$build_cramfs in
644 yes:no) AC_MSG_ERROR([cramfs selected but libz not found]);;
647 AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
650 AC_ARG_ENABLE([switch_root],
651 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
652 [], enable_switch_root=check
655 if test "x$enable_switch_root" = xno; then
658 build_switch_root=yes
659 case $enable_switch_root:$linux_os in
660 yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
661 check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
662 build_switch_root=no;;
664 if test "x$build_switch_root" = xyes; then
665 case $enable_switch_root:$have_openat in
666 yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
667 check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
668 build_switch_root=no;;
672 AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
675 AC_ARG_ENABLE([elvtune],
676 AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
677 [], enable_elvtune=no
679 AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
682 AC_ARG_ENABLE([init],
683 AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
686 AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
689 AC_ARG_ENABLE([kill],
690 AS_HELP_STRING([--enable-kill], [build kill]),
693 AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
696 AC_ARG_ENABLE([last],
697 AS_HELP_STRING([--enable-last], [build last]),
700 AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
703 AC_ARG_ENABLE([mesg],
704 AS_HELP_STRING([--enable-mesg], [build mesg]),
707 AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
710 AC_ARG_ENABLE([partx],
711 AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
714 AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
718 AS_HELP_STRING([--enable-raw], [build raw]),
721 AM_CONDITIONAL(BUILD_RAW, test "x$enable_raw" = xyes)
724 AC_ARG_ENABLE([rdev],
725 AS_HELP_STRING([--enable-rdev], [build rdev on i386]),
728 AM_CONDITIONAL(BUILD_RDEV, test "x$enable_rdev" = xyes)
731 AC_ARG_ENABLE([rename],
732 AS_HELP_STRING([--disable-rename], [do not build rename]),
733 [], enable_rename=yes
735 AM_CONDITIONAL(BUILD_RENAME, test "x$enable_rename" = xyes)
738 AC_ARG_ENABLE([reset],
739 AS_HELP_STRING([--enable-reset], [build reset]),
742 AM_CONDITIONAL(BUILD_RESET, test "x$enable_reset" = xyes)
745 AC_ARG_ENABLE([login-utils],
746 AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
747 [], enable_login_utils=no
749 AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$enable_login_utils" = xyes)
752 [AS_HELP_STRING([--without-pam], [compile login-utils without PAM support])])
754 AM_CONDITIONAL(HAVE_PAM, false)
755 if test "x$enable_login_utils" = xyes && test "x$with_pam" != xno; then
756 AC_CHECK_HEADERS([security/pam_misc.h],
757 [AM_CONDITIONAL(HAVE_PAM, true)],
758 [if test "x$with_pam" = xyes; then
759 AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
764 AC_ARG_WITH([selinux],
765 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
769 if test "x$with_selinux" = xno; then
770 AM_CONDITIONAL(HAVE_SELINUX, false)
772 UTIL_CHECK_LIB(selinux, getprevcon)
773 case "$with_selinux:$have_selinux" in
774 yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
778 if test "x$have_selinux" = xyes; then
779 SELINUX_LIBS="-lselinux -lsepol"
780 SELINUX_LIBS_STATIC="-lselinux -lsepol"
781 old_LDFLAGS="$LDFLAGS"
782 LDFLAGS="$LDFLAGS $SELINUX_LIBS"
783 # This function is missing in old libselinux 1.xx versions
784 AC_CHECK_FUNCS([security_get_initial_context])
785 LDFLAGS="$old_LDFLAGS"
787 AC_SUBST([SELINUX_LIBS])
788 AC_SUBST([SELINUX_LIBS_STATIC])
791 AS_HELP_STRING([--with-audit], [compile with audit support]),
795 if test "x$with_audit" = xno; then
796 AM_CONDITIONAL(HAVE_AUDIT, false)
798 UTIL_CHECK_LIB(audit, audit_log_user_message)
799 case "$with_audit:$have_audit" in
801 AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
806 AC_ARG_ENABLE([schedutils],
807 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
808 [], enable_schedutils=yes
810 AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
813 AC_ARG_ENABLE([wall],
814 AS_HELP_STRING([--disable-wall], [do not build wall]),
817 AM_CONDITIONAL(BUILD_WALL, test "x$enable_wall" = xyes)
820 AC_ARG_ENABLE([write],
821 AS_HELP_STRING([--enable-write], [build write]),
824 AM_CONDITIONAL(BUILD_WRITE, test "x$enable_write" = xyes)
827 AC_ARG_ENABLE([chsh-only-listed],
828 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
829 [], enable_chsh_only_listed=yes
832 if test "x$enable_chsh_only_listed" = xyes; then
833 AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
837 AC_ARG_ENABLE([login-chown-vcs],
838 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
839 [], enable_login_chown_vcs=no
842 if test "x$enable_login_chown_vcs" = xyes; then
843 AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
847 AC_ARG_ENABLE([login-stat-mail],
848 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
849 [], enable_login_stat_mail=no
852 if test "x$enable_login_stat_mail" = xyes; then
853 AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
857 AC_ARG_ENABLE([pg-bell],
858 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
859 [], enable_pg_bell=yes
862 if test "x$enable_pg_bell" = xyes; then
863 AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
867 AC_ARG_ENABLE([require-password],
868 AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
869 [], enable_require_password=yes
872 if test "x$enable_require_password" = xyes; then
873 AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
877 AC_ARG_ENABLE([use-tty-group],
878 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
879 [], enable_use_tty_group=yes
881 AM_CONDITIONAL(USE_TTY_GROUP, test "x$enable_use_tty_group" = xyes)
883 if test "x$enable_use_tty_group" = xyes; then
884 AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
887 AC_ARG_ENABLE([makeinstall-chown],
888 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
889 [], enable_makeinstall_chown=yes
891 AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes)
894 AC_ARG_VAR([SUID_CFLAGS],
895 [CFLAGS used for binaries which are usually with the suid bit])
896 AC_ARG_VAR([SUID_LDFLAGS],
897 [LDFLAGS used for binaries which are usually with the suid bit])
902 AC_CONFIG_HEADERS(config.h)
914 misc-utils/chkdupexe:misc-utils/chkdupexe.pl
920 shlibs/blkid/blkid.pc
921 shlibs/blkid/Makefile
922 shlibs/blkid/src/Makefile
923 shlibs/blkid/src/probers/Makefile
926 shlibs/uuid/man/Makefile
927 shlibs/uuid/src/Makefile
931 tests/helpers/Makefile