1 AC_INIT(util-linux-ng, 2.16-rc2, 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"
25 LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
27 # Check whether exec_prefix=/usr:
28 case $exec_prefix:$prefix in
29 NONE:NONE | NONE:/usr | /usr:*)
30 AC_MSG_NOTICE([Default --exec-prefix detected.])
32 '${exec_prefix}/bin') bindir=/bin
33 AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
36 '${exec_prefix}/sbin') sbindir=/sbin
37 AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
40 '${exec_prefix}/lib') libdir=/lib
41 AC_MSG_NOTICE([ --libdir defaults to /lib]) ;;
47 *lib64) libdirname=lib64 ;;
50 AC_SUBST([libdirname])
52 # The original default values of {bin,sbin,lib}dir
53 usrbinexecdir='${exec_prefix}/bin'
54 AC_SUBST([usrbinexecdir])
56 usrsbinexecdir='${exec_prefix}/sbin'
57 AC_SUBST([usrsbinexecdir])
59 usrlibexecdir='${exec_prefix}/'$libdirname
60 AC_SUBST([usrlibexecdir])
79 AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
81 AC_PATH_PROG(PERL, perl)
82 AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin])
83 AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
87 AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
88 #ifdef HAVE_LINUX_COMPILER_H
89 #include <linux/compiler.h>
128 AC_CHECK_HEADERS([linux/raw.h],
129 [AM_CONDITIONAL([HAVE_RAW], [true])],
130 [AM_CONDITIONAL([HAVE_RAW], [false])])
132 AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
138 get_current_dir_name \
159 AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
161 AC_CHECK_MEMBER(struct sockaddr.sa_len,
162 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
163 [#include <sys/types.h>
164 #include <sys/socket.h>])
166 dnl Static compilation
167 m4_define([UTIL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
169 AC_ARG_ENABLE([static-programs],
170 [AS_HELP_STRING([--enable-static-programs=LIST],
171 [link static the programs in LIST (comma-separated,
172 supported for ]m4_defn([UTIL_STATIC_PROGRAMS])[)])])
174 case $enable_static_programs in
175 yes) enable_static_programs=m4_quote(UTIL_STATIC_PROGRAMS) ;;
176 no) enable_static_programs= ;;
179 dnl Set all the individual AM_CONDITIONALs
180 m4_foreach([UTIL_PRG], m4_defn([UTIL_STATIC_PROGRAMS]), [
181 case ,$enable_static_programs, in
182 *,UTIL_PRG,*) static_[]UTIL_PRG=yes ;;
184 AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UTIL_PRG),
185 [test "x$static_[]UTIL_PRG" = xyes])
188 dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
189 dnl ----------------------------------
190 AC_DEFUN([UTIL_PKG_STATIC], [
191 if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
192 $1=`pkg-config --libs --static "$2"`
194 AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
198 dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
199 dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
200 dnl UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
201 dnl UTIL_CHECK_LIB(yyy, func) generates have_yyy and HAVE_LIBYYY
202 dnl ---------------------------------
203 AC_DEFUN([UTIL_CHECK_LIB], [
204 m4_define([suffix], m4_default([$3],$1))
207 [AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])],
208 [AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])])
209 AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes])
212 dnl UTIL_SET_FLAGS(CFLAGS, CPPFLAGS, LDFLAGS)
213 AC_DEFUN([UTIL_SET_FLAGS], [
215 old_CPPFLAGS="$CPPFLAGS"
216 old_LDFLAGS="$LDFLAGS"
218 CPPFLAGS="$CPPFLAGS $2"
219 LDFLAGS="$LDFLAGS $3"
222 dnl UTIL_RESTORE_FLAGS()
223 AC_DEFUN([UTIL_RESTORE_FLAGS], [
225 CPPFLAGS="$old_CPPFLAGS"
226 LDFLAGS="$old_LDFLAGS"
231 AS_HELP_STRING([--disable-tls], [disable use of thread local support]),
234 if test "x$enable_tls" = xyes; then
239 AC_ARG_ENABLE([mount],
240 AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
241 [], enable_mount=check
244 if test "x$enable_mount" = xcheck; then
245 if test "x$linux_os" = xno; then
246 AC_MSG_WARN([non-linux system; do not build mount utilities])
249 elif test "x$enable_mount" = xno; then
252 AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
255 AC_ARG_ENABLE([fsck],
256 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
259 AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
262 AC_ARG_ENABLE([libuuid],
263 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
264 [], enable_libuuid=yes
266 AC_SUBST(LIBUUID_VERSION)
267 AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
270 if test "x$enable_libuuid" = xno; then
271 # Check for external (e2fsprogs) libuuid
272 PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
273 if test "x$have_uuid" = xno; then
274 # system without pkg-config or so, try classic check
275 AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
277 if test "x$have_uuid" = xyes; then
278 UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
279 AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
284 AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
287 if test "x$have_uuid" = xyes; then
288 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
290 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
292 AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
294 : ${UUID_LIBS='-luuid'}
297 AC_ARG_ENABLE([uuidd],
298 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
299 [], enable_uuidd=auto
302 case "$enable_uuidd:$have_uuid" in
304 AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
306 enable_uuidd=$have_uuid ;;
308 if test "x$enable_uuidd" = xyes; then
309 AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
311 AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes)
314 AC_ARG_ENABLE([libblkid],
315 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
316 [], enable_libblkid=yes
318 AC_SUBST(LIBBLKID_VERSION)
319 AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
320 AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
321 AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
324 if test "x$enable_libblkid" = xno; then
325 if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
326 # Check for external (e2fsprogs) libblkid
327 PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
328 if test "x$have_blkid" = xno; then
329 # system without pkg-config or so, try classic check
330 AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
332 if test "x$have_blkid" = xyes; then
333 UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
334 AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
337 if test -n "$enable_static_programs"; then
338 # TODO check only when mount of fsck are requested
339 UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
344 AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
345 AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().])
348 if test "x$have_blkid" = xyes; then
349 AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
351 if test "x$build_mount" = xyes; then
352 AC_MSG_ERROR([libblkid is needed to build util-linux-ng mount])
354 if test "x$enable_fsck" = xyes; then
355 AC_MSG_ERROR([libblkid is needed to build util-linux-ng fsck])
358 AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
360 : ${BLKID_LIBS='-lblkid -luuid'}
362 AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
365 UTIL_CHECK_LIB(util, openpty)
366 UTIL_CHECK_LIB(termcap, tgetnum)
368 AM_GNU_GETTEXT_VERSION([0.14.1])
369 AM_GNU_GETTEXT([external])
370 if test -d "$srcdir/po"
372 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
374 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"
377 AC_ARG_WITH([ncurses],
378 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
379 (--without-ncurses disables all ncurses(w) support)]),
380 [], with_ncurses=auto
382 AM_CONDITIONAL(HAVE_NCURSES, false)
384 if test "x$with_ncurses" != xno; then
386 AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [
387 if test "x$with_ncurses" = xauto; then
388 UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
389 if test "x$have_ncurses" = xyes; then
390 NCURSES_LIBS="-lncursesw"
393 if test "x$have_ncurses" = xno; then
394 UTIL_CHECK_LIB(ncurses, initscr)
395 if test "x$have_ncurses" = xyes; then
396 NCURSES_LIBS="-lncurses"
400 if test "x$have_ncurses" = xno; then
401 AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
404 AC_SUBST([NCURSES_LIBS])
408 AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
413 AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
414 AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
417 if test "x$with_slang" = xyes; then
418 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
419 if test "x$use_slang" = xno; then
420 AC_MSG_ERROR([slang selected but slcurses.h not found])
423 AM_CONDITIONAL(USE_SLANG, test "x$use_slang" = xyes)
426 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
427 #define _XOPEN_SOURCE
430 char *c = crypt("abc","pw");
433 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
434 #define _XOPEN_SOURCE
437 char *c = crypt("abc","pw");
439 AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
442 AC_MSG_ERROR([crypt() is not available])
446 AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
448 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
453 [AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
457 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
465 if (w == WEOF) exit(1);
469 [AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
473 dnl UTIL_CHECK_SYSCALL(SYSCALL, FALLBACK, ...)
474 dnl Only specify FALLBACK if the SYSCALL
475 dnl you're checking for is a "newish" one
476 dnl -------------------------------------
477 AC_DEFUN([UTIL_CHECK_SYSCALL], [
478 dnl This macro uses host_cpu.
479 AC_REQUIRE([AC_CANONICAL_HOST])
480 AC_CACHE_CHECK([for syscall $1],
481 [util_cv_syscall_$1],
482 [_UTIL_SYSCALL_CHECK_DECL([SYS_$1],
484 [dnl Our libc failed use, so see if we can get the kernel
485 dnl headers to play ball ...
486 _UTIL_SYSCALL_CHECK_DECL([_NR_$1],
490 if test "x$linux_os" = xyes; then
492 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@))
497 util_cv_syscall_$1=$syscall
499 AM_CONDITIONAL([HAVE_]m4_toupper($1), [test "x$util_cv_syscall_$1" != xno])
500 case $util_cv_syscall_$1 in #(
501 no) AC_MSG_WARN([Unable to detect syscall $1.]) ;;
503 *) AC_DEFINE_UNQUOTED([SYS_$1], [$util_cv_syscall_$1],
504 [Fallback syscall number for $1]) ;;
508 dnl _UTIL_SYSCALL_CHECK_DECL(SYMBOL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
509 dnl Check if SYMBOL is declared, using the headers needed for syscall checks.
510 dnl -------------------------------------
511 m4_define([_UTIL_SYSCALL_CHECK_DECL],
512 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
513 #include <sys/syscall.h>
515 ]], [[int test = $1;]])],
519 dnl _UTIL_CHECK_SYSCALL_FALLBACK(PATTERN, VALUE, ...)
520 dnl Helper macro to create the body for the above `case'.
521 dnl -------------------------------------
522 m4_define([_UTIL_CHECK_SYSCALL_FALLBACK],
525 $1) syscall="$2" ;;dnl
526 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shiftn(2, $@))])dnl
530 UTIL_CHECK_SYSCALL([pivot_root])
531 UTIL_CHECK_SYSCALL([sched_getaffinity])
532 UTIL_CHECK_SYSCALL([ioprio_set],
541 UTIL_CHECK_SYSCALL([ioprio_get],
552 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
557 struct tm *tm = localtime(0);
558 if (a == -1) /* false */
559 sleep(tm->tm_gmtoff);
561 [AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
564 AC_CHECK_MEMBERS([struct termios.c_line],,,
565 [[#include <termios.h>]])
576 ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
578 AC_CHECK_HEADERS([sys/swap.h])
580 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
582 #ifdef HAVE_SYS_SWAP_H
583 # include <sys/swap.h>
587 [[swapon("/dev/null", 0);]])],
588 [AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
590 [AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
594 dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
595 dnl ---------------------------------
596 AC_DEFUN([UTIL_SET_ARCH], [
601 AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test "x$cpu_$1" = xtrue])
604 UTIL_SET_ARCH(I86, i?86-*)
605 UTIL_SET_ARCH(86_64, x86_64*)
606 UTIL_SET_ARCH(IA64, ia64*)
607 UTIL_SET_ARCH(S390, s390*)
608 UTIL_SET_ARCH(SPARC, sparc*)
609 UTIL_SET_ARCH(PPC, ppc*|powerpc*)
610 UTIL_SET_ARCH(M68K, m68*)
611 UTIL_SET_ARCH(MIPS, mips*)
612 UTIL_SET_ARCH(HPPA, hppa*)
614 AC_ARG_ENABLE([arch],
615 AS_HELP_STRING([--enable-arch], [do build arch]),
618 AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
620 AC_ARG_ENABLE([agetty],
621 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
622 [], enable_agetty=yes
624 AM_CONDITIONAL(BUILD_AGETTY, test "x$enable_agetty" = xyes)
626 AC_ARG_ENABLE([cramfs],
627 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
628 [], enable_cramfs=check
631 if test "x$enable_cramfs" = xno; then
635 dnl Trick: leave the third parameter empty to get the default action.
636 AC_CHECK_LIB(z, crc32, [], build_cramfs=no)
637 case $enable_cramfs:$build_cramfs in
638 yes:no) AC_MSG_ERROR([cramfs selected but libz not found]);;
641 AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
644 AC_ARG_ENABLE([switch_root],
645 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
646 [], enable_switch_root=check
649 if test "x$enable_switch_root" = xno; then
652 build_switch_root=yes
653 case $enable_switch_root:$linux_os in
654 yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
655 check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
656 build_switch_root=no;;
658 if test "x$build_switch_root" = xyes; then
659 case $enable_switch_root:$have_openat in
660 yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
661 check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
662 build_switch_root=no;;
666 AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
669 AC_ARG_ENABLE([elvtune],
670 AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
671 [], enable_elvtune=no
673 AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
676 AC_ARG_ENABLE([init],
677 AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
680 AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
683 AC_ARG_ENABLE([kill],
684 AS_HELP_STRING([--enable-kill], [build kill]),
687 AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
690 AC_ARG_ENABLE([last],
691 AS_HELP_STRING([--enable-last], [build last]),
694 AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
697 AC_ARG_ENABLE([mesg],
698 AS_HELP_STRING([--enable-mesg], [build mesg]),
701 AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
704 AC_ARG_ENABLE([partx],
705 AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
708 AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
712 AS_HELP_STRING([--enable-raw], [build raw]),
715 AM_CONDITIONAL(BUILD_RAW, test "x$enable_raw" = xyes)
718 AC_ARG_ENABLE([rdev],
719 AS_HELP_STRING([--enable-rdev], [build rdev on i386]),
722 AM_CONDITIONAL(BUILD_RDEV, test "x$enable_rdev" = xyes)
725 AC_ARG_ENABLE([rename],
726 AS_HELP_STRING([--disable-rename], [do not build rename]),
727 [], enable_rename=yes
729 AM_CONDITIONAL(BUILD_RENAME, test "x$enable_rename" = xyes)
732 AC_ARG_ENABLE([reset],
733 AS_HELP_STRING([--enable-reset], [build reset]),
736 AM_CONDITIONAL(BUILD_RESET, test "x$enable_reset" = xyes)
739 AC_ARG_ENABLE([login-utils],
740 AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
741 [], enable_login_utils=no
743 AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$enable_login_utils" = xyes)
746 [AS_HELP_STRING([--without-pam], [compile login-utils without PAM support])])
748 AM_CONDITIONAL(HAVE_PAM, false)
749 if test "x$enable_login_utils" = xyes && test "x$with_pam" != xno; then
750 AC_CHECK_HEADERS([security/pam_misc.h],
751 [AM_CONDITIONAL(HAVE_PAM, true)],
752 [if test "x$with_pam" = xyes; then
753 AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
758 AC_ARG_WITH([selinux],
759 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
763 if test "x$with_selinux" = xno; then
764 AM_CONDITIONAL(HAVE_SELINUX, false)
766 UTIL_CHECK_LIB(selinux, getprevcon)
767 case "$with_selinux:$have_selinux" in
768 yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
772 if test "x$have_selinux" = xyes; then
773 SELINUX_LIBS="-lselinux -lsepol"
774 SELINUX_LIBS_STATIC="-lselinux -lsepol"
775 old_LDFLAGS="$LDFLAGS"
776 LDFLAGS="$LDFLAGS $SELINUX_LIBS"
777 # This function is missing in old libselinux 1.xx versions
778 AC_CHECK_FUNCS([security_get_initial_context])
779 LDFLAGS="$old_LDFLAGS"
781 AC_SUBST([SELINUX_LIBS])
782 AC_SUBST([SELINUX_LIBS_STATIC])
785 AS_HELP_STRING([--with-audit], [compile with audit support]),
789 if test "x$with_audit" = xno; then
790 AM_CONDITIONAL(HAVE_AUDIT, false)
792 UTIL_CHECK_LIB(audit, audit_log_user_message)
793 case "$with_audit:$have_audit" in
795 AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
800 AC_ARG_ENABLE([schedutils],
801 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
802 [], enable_schedutils=yes
804 AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
807 AC_ARG_ENABLE([wall],
808 AS_HELP_STRING([--disable-wall], [do not build wall]),
811 AM_CONDITIONAL(BUILD_WALL, test "x$enable_wall" = xyes)
814 AC_ARG_ENABLE([write],
815 AS_HELP_STRING([--enable-write], [build write]),
818 AM_CONDITIONAL(BUILD_WRITE, test "x$enable_write" = xyes)
821 AC_ARG_ENABLE([chsh-only-listed],
822 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
823 [], enable_chsh_only_listed=yes
826 if test "x$enable_chsh_only_listed" = xyes; then
827 AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
831 AC_ARG_ENABLE([login-chown-vcs],
832 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
833 [], enable_login_chown_vcs=no
836 if test "x$enable_login_chown_vcs" = xyes; then
837 AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
841 AC_ARG_ENABLE([login-stat-mail],
842 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
843 [], enable_login_stat_mail=no
846 if test "x$enable_login_stat_mail" = xyes; then
847 AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
851 AC_ARG_ENABLE([pg-bell],
852 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
853 [], enable_pg_bell=yes
856 if test "x$enable_pg_bell" = xyes; then
857 AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
861 AC_ARG_ENABLE([require-password],
862 AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
863 [], enable_require_password=yes
866 if test "x$enable_require_password" = xyes; then
867 AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
871 AC_ARG_ENABLE([use-tty-group],
872 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
873 [], enable_use_tty_group=yes
875 AM_CONDITIONAL(USE_TTY_GROUP, test "x$enable_use_tty_group" = xyes)
877 if test "x$enable_use_tty_group" = xyes; then
878 AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
881 AC_ARG_ENABLE([makeinstall-chown],
882 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
883 [], enable_makeinstall_chown=yes
885 AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes)
888 AC_ARG_VAR([SUID_CFLAGS],
889 [CFLAGS used for binaries which are usually with the suid bit])
890 AC_ARG_VAR([SUID_LDFLAGS],
891 [LDFLAGS used for binaries which are usually with the suid bit])
896 AC_CONFIG_HEADERS(config.h)
908 misc-utils/chkdupexe:misc-utils/chkdupexe.pl
914 shlibs/blkid/blkid.pc
915 shlibs/blkid/Makefile
916 shlibs/blkid/src/Makefile
917 shlibs/blkid/src/probers/Makefile
920 shlibs/uuid/man/Makefile
921 shlibs/uuid/src/Makefile
925 tests/helpers/Makefile