]> git.ipfire.org Git - thirdparty/util-linux.git/blame - configure.ac
build-sys: cleanup BUILD_LOGIN_UTILS
[thirdparty/util-linux.git] / configure.ac
CommitLineData
38c75b59
SK
1AC_INIT(util-linux,
2 m4_esyscmd([tools/git-version-gen .tarball-version]),
3 kzak@redhat.com)
baf39af1 4
7fc9786b 5AC_PREREQ(2.60)
48d7b13a
KZ
6
7AC_CONFIG_AUX_DIR(config)
b12991dd 8AC_CONFIG_MACRO_DIR([m4])
488c033f 9AM_INIT_AUTOMAKE([-Wall foreign 1.10 dist-bzip2 -Wno-portability])
48d7b13a 10
eb35c251
GJ
11m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
12 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
13
48d7b13a 14AC_CONFIG_SRCDIR(mount/mount.c)
15a9b48c
SK
15AC_PREFIX_DEFAULT([/usr])
16
33b0be6d
KZ
17dnl version details from <major>.<minor>[-<suffix>]
18PACKAGE_VERSION_MAJOR=$(echo $PACKAGE_VERSION | awk -F. '{print $1}')
19PACKAGE_VERSION_MINOR=$(echo $PACKAGE_VERSION | awk -F. '{print $2}' \
20 | awk -F- '{print $1}')
21PACKAGE_VERSION_RELEASE=0
a0948ffe 22
33b0be6d
KZ
23dnl libblkid version
24LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
60a5833b 25LIBBLKID_DATE="29-Aug-2011"
dc2b8d87
KZ
26LIBBLKID_LT_MAJOR=1
27LIBBLKID_LT_MINOR=1
28LIBBLKID_LT_MICRO=0
29LIBBLKID_VERSION_INFO=`expr $LIBBLKID_LT_MAJOR + $LIBBLKID_LT_MINOR`:$LIBBLKID_LT_MICRO:$LIBBLKID_LT_MINOR
a0948ffe 30
f6076f55
KZ
31dnl libuuid version
32LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
dc2b8d87
KZ
33LIBUUID_LT_MAJOR=1
34LIBUUID_LT_MINOR=3
35LIBUUID_LT_MICRO=0
36LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
f6076f55 37
f1cde479
KZ
38dnl libmount version
39LIBMOUNT_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
40LIBMOUNT_LT_MAJOR=1
41LIBMOUNT_LT_MINOR=1
42LIBMOUNT_LT_MICRO=0
43LIBMOUNT_VERSION_INFO=`expr $LIBMOUNT_LT_MAJOR + $LIBMOUNT_LT_MINOR`:$LIBMOUNT_LT_MICRO:$LIBMOUNT_LT_MINOR
44
15a9b48c
SK
45# Check whether exec_prefix=/usr:
46case $exec_prefix:$prefix in
47NONE:NONE | NONE:/usr | /usr:*)
48 AC_MSG_NOTICE([Default --exec-prefix detected.])
49 case $bindir in
50 '${exec_prefix}/bin') bindir=/bin
51 AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
52 esac
53 case $sbindir in
54 '${exec_prefix}/sbin') sbindir=/sbin
55 AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
971f57f6
KZ
56 esac
57 case $libdir in
58 '${exec_prefix}/lib') libdir=/lib
59 AC_MSG_NOTICE([ --libdir defaults to /lib]) ;;
15a9b48c
SK
60 esac ;;
61esac
48d7b13a 62
cb5212e2 63libdirname=`basename "$libdir"`
b0a0d7d5
KZ
64AC_SUBST([libdirname])
65
996fb358 66# The original default values of {bin,sbin,lib}dir
aaf3e8f5 67usrbin_execdir='${exec_prefix}/bin'
30688dde 68AC_SUBST([usrbin_execdir])
996fb358 69
aaf3e8f5 70usrsbin_execdir='${exec_prefix}/sbin'
30688dde 71AC_SUBST([usrsbin_execdir])
996fb358 72
aaf3e8f5 73usrlib_execdir='${exec_prefix}/'$libdirname
30688dde 74AC_SUBST([usrlib_execdir])
996fb358 75
31c9c1c4 76AM_PROG_CC_C_O
48d7b13a 77AC_PROG_CC_STDC
240f7101 78AC_GNU_SOURCE
a6996860 79AC_CANONICAL_HOST
85b4c147 80AC_C_CONST
e79829db 81AC_C_VOLATILE
fbaec83b 82AC_C_BIGENDIAN
b12991dd
KZ
83
84dnl libtool-2
85LT_INIT
48d7b13a 86
fd0f4132
SK
87m4_ifndef([PKG_PROG_PKG_CONFIG],
88 [m4_fatal([Could not locate the pkg-config autoconf
89 macros. These are usually located in /usr/share/aclocal/pkg.m4.
90 If your macros are in a different location, try setting the
91 environment variable AL_OPTS="-I/other/macro/dir" before running
92 ./autogen.sh or autoreconf again.])])
d06d028a
KZ
93PKG_PROG_PKG_CONFIG
94
22aa5166
KZ
95GTK_DOC_CHECK([1.10])
96AC_PATH_PROG([XSLTPROC], [xsltproc])
97
8c182554
KZ
98linux_os=no
99case ${host_os} in
100 *linux*)
101 linux_os=yes
102 ;;
103esac
49ccbae6 104AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
8c182554 105
3c6e292c
KZ
106dnl define ARCH_<NAME> conditionals
107UL_SET_ARCH(I86, i?86-*)
108UL_SET_ARCH(86_64, x86_64*)
109UL_SET_ARCH(IA64, ia64*)
110UL_SET_ARCH(S390, s390*)
111UL_SET_ARCH(SPARC, sparc*)
112UL_SET_ARCH(PPC, ppc*|powerpc*)
113UL_SET_ARCH(M68K, m68*)
114UL_SET_ARCH(MIPS, mips*)
115UL_SET_ARCH(HPPA, hppa*)
116
48d7b13a
KZ
117AC_SYS_LARGEFILE
118
09734b00
KZ
119AM_GNU_GETTEXT_VERSION([0.14.1])
120AM_GNU_GETTEXT([external])
121if test -d "$srcdir/po"
122then
123 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
124else
125 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"
126fi
127
e460a5bf 128AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
48d7b13a
KZ
129#ifdef HAVE_LINUX_COMPILER_H
130#include <linux/compiler.h>
131#endif
132])
bf962c0a 133AC_CHECK_HEADERS(
a0948ffe
KZ
134 [err.h \
135 errno.h \
136 getopt.h \
a0948ffe
KZ
137 linux/fd.h \
138 linux/tiocl.h \
139 linux/version.h \
b832c2fe 140 linux/falloc.h \
55113b15 141 linux/cdrom.h \
b832c2fe 142 fcntl.h \
8b7f16fc 143 locale.h \
754fed0c
KZ
144 stdint.h \
145 inttypes.h \
0bf9d41d 146 paths.h \
a0948ffe 147 pty.h \
607c2a72 148 mntent.h \
754fed0c
KZ
149 net/if.h \
150 net/if_dl.h \
151 netinet/in.h \
bf962c0a 152 rpcsvc/nfs_prot.h \
a0948ffe 153 stdlib.h \
363ce071 154 asm/io.h \
a0948ffe
KZ
155 sys/disk.h \
156 sys/disklabel.h \
157 sys/ioctl.h \
3edaa201 158 sys/ioccom.h \
bf962c0a 159 sys/io.h \
754fed0c 160 sys/time.h \
a0948ffe
KZ
161 sys/mkdev.h \
162 sys/prctl.h \
163 sys/queue.h \
754fed0c 164 sys/sockio.h \
2a7c1f70
KZ
165 sys/socket.h \
166 sys/syscall.h \
754fed0c
KZ
167 sys/file.h \
168 sys/ioctl.h \
a0948ffe
KZ
169 sys/stat.h \
170 sys/types.h \
754fed0c 171 sys/un.h \
a0948ffe 172 sys/user.h \
a67387b7 173 sys/swap.h \
754fed0c 174 sys/resource.h \
ff0cb84d 175 security/pam_misc.h \
16ba8d58 176 linux/raw.h \
a0948ffe 177 unistd.h ])
dc61d398 178
a67387b7
KZ
179AC_CHECK_HEADERS([langinfo.h],
180 [AM_CONDITIONAL([HAVE_LANGINFO], [true])],
181 [AM_CONDITIONAL([HAVE_LANGINFO], [false])])
182
16ba8d58
KZ
183dnl Convert some ac_cv_header_* variables to have_*
184dnl
185have_linux_raw_h=$ac_cv_header_linux_raw_h
ff0cb84d 186have_security_pam_misc_h=$ac_cv_header_security_pam_misc_h
48d7b13a 187
a67387b7
KZ
188
189AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
190#include <time.h>
191#include <unistd.h>
192]], [[
193 int a = 0;
194 struct tm *tm = localtime(0);
195 if (a == -1) /* false */
196 sleep(tm->tm_gmtoff);
197]])],
198[AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
199])
200
201AC_CHECK_MEMBERS([struct termios.c_line],,,
202 [[#include <termios.h>]])
203
204AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,,
205 [#include <sys/stat.h>])
206
207AC_CHECK_DECLS([
208 UNAME26,
209 ADDR_NO_RANDOMIZE,
210 FDPIC_FUNCPTRS,
211 MMAP_PAGE_ZERO,
212 ADDR_COMPAT_LAYOUT,
213 READ_IMPLIES_EXEC,
214 ADDR_LIMIT_32BIT,
215 WHOLE_SECONDS,
216 STICKY_TIMEOUTS,
217 ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
218
219AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
220[[
221#ifdef HAVE_SYS_SWAP_H
222# include <sys/swap.h>
223#endif
224#include <unistd.h>
225]],
226[[swapon("/dev/null", 0);]])],
227[AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
228],
229[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
230])
dc61d398
KZ
231
232
a88057d9
TP
233AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
234
2a7c1f70
KZ
235AC_CHECK_DECL([llseek],
236 [AC_DEFINE(HAVE_LLSEEK_PROTOTYPE, 1,
237 [Define to 1 if have llseek prototype])],
238 [],
239 [#include <unistd.h>])
240
241AC_CHECK_DECL([lseek64],
242 [AC_DEFINE(HAVE_LSEEK64_PROTOTYPE, 1,
243 [Define to 1 if have lseek64 prototype])],
244 [],
245 [#define _LARGEFILE_SOURCE
246 #define _LARGEFILE64_SOURCE
247 #include <unistd.h>])
248
bf962c0a
SK
249AC_CHECK_FUNCS(
250 [inet_aton \
eb76ca98
FG
251 err \
252 errx \
b7ce600d 253 futimens \
2a7c1f70 254 fstat64 \
bf962c0a
SK
255 fsync \
256 getdomainname \
e27a08ab 257 get_current_dir_name \
437fa54f 258 usleep \
bf962c0a
SK
259 nanosleep \
260 personality \
132ea941 261 updwtmp \
3ac22f7a 262 jrand48 \
bf962c0a 263 lchown \
a0948ffe
KZ
264 llseek \
265 lseek64 \
266 strtoull \
754fed0c
KZ
267 sysconf \
268 getdtablesize \
a804f444 269 getexecname \
754fed0c 270 getrlimit \
a1504d8b 271 sigqueue \
754fed0c 272 srandom \
69045d3d
KZ
273 setresgid \
274 setresuid \
69b7e41e
KZ
275 strndup \
276 strnlen \
277 strnchr \
fc7aeb09 278 inotify_init \
a0948ffe 279 prctl \
a67bb3bf 280 posix_fadvise \
acf6ab6f 281 getmntinfo \
a0948ffe 282 __secure_getenv \
eb76ca98
FG
283 warn \
284 warnx \
bf962c0a 285 rpmatch])
48d7b13a 286AC_FUNC_FSEEKO
48d7b13a 287
940fd28c
KZ
288AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
289
465e9973
ST
290AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
291AM_CONDITIONAL([BUILD_HWCLOCK], test "x$have_io" = xyes -o "x$linux_os" = xyes)
292
754fed0c
KZ
293AC_CHECK_MEMBER(struct sockaddr.sa_len,
294 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
295 [#include <sys/types.h>
296 #include <sys/socket.h>])
297
60cc9f94
FG
298SOCKET_LIBS=
299AC_SEARCH_LIBS([gethostbyname], [nsl],
300 [if test x"$ac_cv_search_gethostbyname" != x"none required"; then
301 SOCKET_LIBS="$SOCKET_LIBS -lnsl";
302 fi])
303AC_SEARCH_LIBS([socket], [socket],
304 [if test x"$ac_cv_search_socket" != x"none required"; then
305 SOCKET_LIBS="$SOCKET_LIBS -lsocket";
306 fi])
307AC_SUBST([SOCKET_LIBS])
308
d58c47d9
FG
309
310have_dirfd=no
311AC_CHECK_FUNCS([dirfd], [have_dirfd=yes], [have_dirfd=no])
312if test x"$have_dirfd" = xno ; then
313 AC_CHECK_DECLS([dirfd],
314 [have_dirfd=yes], [have_dirfd=no],
315 [#include <sys/types.h>
316 #include <dirent.h>])
317fi
318
319have_ddfd=no
320if test x"$have_dirfd" = xno ; then
321 AC_CHECK_MEMBERS([DIR.dd_fd],
322 [have_ddfd=yes], [have_ddfd=no],
323 [#include <sys/types.h>
324 #include <dirent.h>])
325fi
326
327case "$have_dirfd:$have_ddfd" in
328no:no)
329 AC_MSG_ERROR([cannot find a method to get filedescriptor of directory]) ;;
330esac
331
332
a804f444
FG
333AC_MSG_CHECKING(whether program_invocation_short_name is defined)
334AC_TRY_COMPILE([#include <argp.h>],
335 [program_invocation_short_name = "test";],
336 AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
337 [Define if program_invocation_short_name is defined])
338 AC_MSG_RESULT(yes),
339 AC_MSG_RESULT(no))
340
341AC_MSG_CHECKING([whether __progname is defined])
342AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
343 [if (*__progname == 0) return;])],
344 AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname is defined])
345 AC_MSG_RESULT(yes),
346 AC_MSG_RESULT(no))
347
8569410c 348dnl Static compilation
132ea941 349m4_define([UL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
8569410c
SK
350
351AC_ARG_ENABLE([static-programs],
352 [AS_HELP_STRING([--enable-static-programs=LIST],
353 [link static the programs in LIST (comma-separated,
132ea941 354 supported for ]m4_defn([UL_STATIC_PROGRAMS])[)])])
8569410c
SK
355
356case $enable_static_programs in
132ea941 357yes) enable_static_programs=m4_quote(UL_STATIC_PROGRAMS) ;;
8569410c
SK
358no) enable_static_programs= ;;
359esac
360
8569410c 361dnl Set all the individual AM_CONDITIONALs
132ea941 362m4_foreach([UL_PRG], m4_defn([UL_STATIC_PROGRAMS]), [
8569410c 363 case ,$enable_static_programs, in
132ea941 364 *,UL_PRG,*) static_[]UL_PRG=yes ;;
8569410c 365 esac
132ea941
KZ
366 AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UL_PRG),
367 [test "x$static_[]UL_PRG" = xyes])
8569410c
SK
368])
369
d7a01582 370AX_CHECK_TLS
3ac22f7a 371
13f5473e
KZ
372AC_DEFUN([UL_SCANF_TYPE_MODIFIER], [dnl
373# include <stdio.h>
374int main()
375{
376 int i;
377 char *s;
378 i = sscanf("x", $1, &s);
379 if (i == 1)
380 return 0;
381 return 1;
382}])
383
384AC_CACHE_VAL([scanf_cv_alloc_modifier],
385 AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%ms"])])],
386 [scanf_cv_alloc_modifier=ms],
387 AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%as"])])],
388 [scanf_cv_alloc_modifier=as],
389 [scanf_cv_alloc_modifier=no]
390 )
391 )
392)
393
394AC_MSG_CHECKING([scanf string alloc modifiers])
395case "$scanf_cv_alloc_modifier" in
396ms)
397 AC_MSG_RESULT([(%ms) yes])
398 AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier])
399 have_scanf_alloc_modifier=yes
400 ;;
401as)
402 AC_MSG_RESULT([(%as) yes])
403 have_scanf_alloc_modifier=yes
404 AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier])
405 ;;
406*)
407 AC_MSG_RESULT([no])
408 have_scanf_alloc_modifier=no
409 ;;
410esac
411
3aecf79d
KZ
412UL_CHECK_LIB(util, openpty)
413UL_CHECK_LIB(termcap, tgetnum)
414
415AC_CHECK_TYPES([union semun], [], [], [[
416#include <sys/sem.h>
417]])
418AC_CHECK_TYPES(loff_t)
419
420AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
421#include <wchar.h>
422#include <wctype.h>
423#include <stdio.h>
424]], [[
425 wchar_t wc;
426 wint_t w;
427 w = fgetwc(stdin);
428 if (w == WEOF) exit(1);
429 wc = w;
430 fputwc(wc,stdout);
431]])],
432[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
433])
434
435AC_CHECK_TYPES([cpu_set_t], [have_cpu_set_t=yes], [], [[
436#include <sched.h>
437]])
438
439AM_CONDITIONAL(HAVE_CPU_SET_T, [test "x$have_cpu_set_t" = xyes])
440
441AC_CHECK_DECLS([CPU_ALLOC], [], [], [[
442#include <sched.h>
443]])
444
8d35bdc9
KZ
445# on Solaris, you can't mix and match standards, since we use c99
446# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
447# check for crypt.h and use that without XOPEN_SOURCE.
448AC_CHECK_HEADERS([crypt.h])
449AC_LINK_IFELSE([AC_LANG_PROGRAM([[
450#ifdef HAVE_CRYPT_H
451#include <crypt.h>
452#else
453#define _XOPEN_SOURCE
454#include <unistd.h>
455#endif
456]], [[
457char *c = crypt("abc","pw");
458]])],[],[
459 LIBS="$LIBS -lcrypt"
460 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
461 #ifdef HAVE_CRYPT_H
462 #include <crypt.h>
463 #else
464 #define _XOPEN_SOURCE
465 #include <unistd.h>
466 #endif
467 ]], [[
468 char *c = crypt("abc","pw");
469 ]])],[
470 AC_DEFINE(HAVE_LIBCRYPT, 1, [Do we need -lcrypt?])
471 have_libcrypt=yes
472 ],[
473 AC_MSG_ERROR([crypt() is not available])
474 ])
475])
476AM_CONDITIONAL(HAVE_LIBCRYPT, test "x$have_libcrypt" = xyes)
477
13f5473e 478
d17584b6
SK
479AC_ARG_ENABLE([most-builds],
480 AS_HELP_STRING([--enable-most-builds], [build everthing other than experimental code]),
481 [], enable_most_builds=no
482)
483if test "x$enable_most_builds" = xyes; then
484 enable_arch=yes
485 enable_ddate=yes
486 enable_elvtune=yes
487 enable_kill=yes
488 enable_last=yes
489 enable_line=yes
490 enable_mesg=yes
491 enable_raw=yes
492 enable_rename=yes
493 enable_reset=yes
494 enable_login_utils=yes
495 enable_write=yes
496fi
497
1dbbde66
KZ
498dnl
499dnl libuuid
500dnl
17afb032
KZ
501AC_ARG_ENABLE([libuuid],
502 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
503 [], enable_libuuid=yes
504)
dc2b8d87
KZ
505AC_SUBST([LIBUUID_VERSION])
506AC_SUBST([LIBUUID_VERSION_INFO])
17afb032 507AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
9dc801d2 508
403e2d0c 509if test "x$enable_libuuid" = xyes; then
17afb032
KZ
510 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
511else
512 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
513fi
48d7b13a 514
1dbbde66
KZ
515dnl
516dnl libblkid
517dnl
f910b559 518AC_ARG_ENABLE([libblkid],
1d12ed57 519 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and many related utilities]),
f910b559 520 [], enable_libblkid=yes
40f07ff7 521)
4f3b364b 522build_libblkid=$enable_libblkid
033cf439 523AC_SUBST([LIBBLKID_DATE])
dc2b8d87
KZ
524AC_SUBST([LIBBLKID_VERSION])
525AC_SUBST([LIBBLKID_VERSION_INFO])
f910b559
KZ
526AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
527AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
4f3b364b 528if test "x$build_libblkid" = xyes; then
d06d028a 529 AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
64754af9 530fi
4f3b364b 531AM_CONDITIONAL(BUILD_LIBBLKID, test "x$build_libblkid" = xyes)
f910b559 532
1dbbde66
KZ
533dnl
534dnl libmount
535dnl
f1cde479
KZ
536AC_ARG_ENABLE([libmount],
537 AS_HELP_STRING([--disable-libmount], [do not build libmount]),
a2b3d040 538 [], enable_libmount=check
f1cde479 539)
a2b3d040 540build_libmount=yes
13f5473e
KZ
541UL_REQUIRES_LINUX([libmount])
542UL_REQUIRES_BUILD([libmount], [libblkid])
543UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
544AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
8e368761 545
f1cde479
KZ
546AC_SUBST([LIBMOUNT_VERSION])
547AC_SUBST([LIBMOUNT_VERSION_INFO])
f4ab4ae8 548AC_DEFINE_UNQUOTED(LIBMOUNT_VERSION, "$LIBMOUNT_VERSION", [libmount version string])
13f5473e 549
f1cde479 550
1dbbde66
KZ
551AC_ARG_ENABLE([mount],
552 AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
553 [], enable_mount=check
554)
555build_mount=yes
9ead6701
KZ
556UL_REQUIRES_LINUX([mount])
557UL_REQUIRES_BUILD([mount], [libblkid])
1dbbde66
KZ
558AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
559
560
9ead6701
KZ
561AC_ARG_ENABLE([libmount-mount],
562 AS_HELP_STRING([--enable-libmount-mount], [link mount(8) with libmount (EXPERIMENTAL)]),
563 [], enable_libmount_mount=no
564)
565build_libmount_mount=yes
566UL_REQUIRES_BUILD([libmount_mount], [mount])
567UL_REQUIRES_BUILD([libmount_mount], [libmount])
568if test "x$build_libmount_mount" = xyes; then
569 AC_DEFINE(HAVE_LIBMOUNT_MOUNT, 1, [use libmount for mount(8)])
570fi
571AM_CONDITIONAL(BUILD_LIBMOUNT_MOUNT, test "x$build_libmount_mount" = xyes)
572
573
1dbbde66
KZ
574AC_ARG_ENABLE([fsck],
575 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
1d12ed57 576 [], enable_fsck=check
1dbbde66 577)
1d12ed57
KZ
578build_fsck=yes
579UL_REQUIRES_BUILD([fsck], [libblkid])
580AM_CONDITIONAL(BUILD_FSCK, test "x$build_fsck" = xyes)
1dbbde66
KZ
581
582
583AC_ARG_ENABLE([partx],
584 AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
585 [], enable_partx=check
586)
587build_partx=yes
ecde2536
KZ
588UL_REQUIRES_LINUX([partx])
589UL_REQUIRES_BUILD([partx], [libblkid])
1dbbde66
KZ
590AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
591
592
1dbbde66
KZ
593AC_ARG_ENABLE([uuidd],
594 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
bcdab497 595 [], enable_uuidd=check
1dbbde66 596)
bcdab497
KZ
597build_uuidd=yes
598UL_REQUIRES_BUILD([uuidd], [libuuid])
599if test "x$build_uuidd" = xyes; then
1dbbde66
KZ
600 AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
601fi
bcdab497 602AM_CONDITIONAL(BUILD_UUIDD, test "x$build_uuidd" = xyes)
1dbbde66
KZ
603
604
0164c245 605AC_ARG_ENABLE([mountpoint],
2023ccc4 606 AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
3d92ed40 607 [], enable_mountpoint=check
0164c245 608)
3d92ed40 609build_mountpoint=yes
a9127bc1 610UL_REQUIRES_BUILD([mountpoint], [libmount])
3d92ed40 611AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes)
0164c245
KZ
612
613
08d64aa2
KZ
614AC_ARG_WITH([ncurses],
615 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
616 (--without-ncurses disables all ncurses(w) support)]),
617 [], with_ncurses=auto
618)
619AM_CONDITIONAL(HAVE_NCURSES, false)
620
621if test "x$with_ncurses" != xno; then
622 have_ncurses=no
623 AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [
624 if test "x$with_ncurses" = xauto; then
132ea941 625 UL_CHECK_LIB(ncursesw, initscr, ncurses)
08d64aa2 626 if test "x$have_ncurses" = xyes; then
30c97bb8 627 AC_CHECK_HEADERS([ncursesw/ncurses.h])
08d64aa2
KZ
628 NCURSES_LIBS="-lncursesw"
629 fi
630 fi
49ccbae6 631 if test "x$have_ncurses" = xno; then
132ea941 632 UL_CHECK_LIB(ncurses, initscr)
49ccbae6 633 if test "x$have_ncurses" = xyes; then
08d64aa2
KZ
634 NCURSES_LIBS="-lncurses"
635 fi
636 fi
637 ])
49ccbae6 638 if test "x$have_ncurses" = xno; then
08d64aa2
KZ
639 AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
640 fi
641fi
642AC_SUBST([NCURSES_LIBS])
643
48d7b13a 644
48d7b13a 645AC_ARG_WITH([slang],
7fa4f112 646 AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
271d98e0 647 [], with_slang=no
48d7b13a
KZ
648)
649
46e71118
AM
650have_tinfo=no
651AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
49ccbae6 652AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
46e71118 653
fd67be31 654use_slang=no
49ccbae6 655if test "x$with_slang" = xyes; then
965b4900
KZ
656 AC_CHECK_HEADERS([slang.h slang/slang.h])
657 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h],
658 [use_slang=yes], [], [
659#ifdef HAVE_SLANG_H
660#include <slang.h>
661#elif defined(HAVE_SLANG_SLANG_H)
662#include <slang/slang.h>
663#endif
664])
49ccbae6 665 if test "x$use_slang" = xno; then
48d7b13a
KZ
666 AC_MSG_ERROR([slang selected but slcurses.h not found])
667 fi
668fi
49ccbae6 669AM_CONDITIONAL(USE_SLANG, test "x$use_slang" = xyes)
48d7b13a
KZ
670
671
f0bc3fa0
KZ
672AC_ARG_WITH([utempter],
673 AS_HELP_STRING([--with-utempter], [compile script(1) with libutempter]),
674 [], with_utempter=no
675)
676
677if test "x$with_utempter" = xyes; then
132ea941 678 UL_CHECK_LIB(utempter, utempter_add_record)
f0bc3fa0
KZ
679 if test "x$have_utempter" = xno; then
680 AC_MSG_ERROR([utempter selected but libutempter not found])
681 fi
682else
683 AM_CONDITIONAL(HAVE_UTEMPTER, false)
684fi
685
132ea941
KZ
686UL_CHECK_SYSCALL([sched_getaffinity])
687UL_CHECK_SYSCALL([ioprio_set],
72065909
MF
688 [alpha], [442],
689 [i*86], [289],
690 [ia64*], [1274],
691 [powerpc*], [273],
692 [s390*], [282],
693 [sparc*], [196],
447ae7b8 694 [sh*], [288],
72065909 695 [x86_64*], [251])
132ea941 696UL_CHECK_SYSCALL([ioprio_get],
72065909
MF
697 [alpha], [443],
698 [i*86], [290],
699 [ia64*], [1275],
700 [powerpc*], [274],
701 [s390*], [283],
702 [sparc*], [218],
447ae7b8 703 [sh*], [289],
72065909 704 [x86_64*], [252])
19a224ad 705
10e56b49
KZ
706
707AC_ARG_ENABLE([fallocate],
708 AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
709 [], enable_fallocate=check
710)
711build_fallocate=yes
712UL_REQUIRES_LINUX([fallocate])
713UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
714AM_CONDITIONAL(BUILD_FALLOCATE, test "x$build_fallocate" = xyes)
715
716if test "x$build_fallocate" = xyes; then
717 dnl check for valid fallocate() function
718 dnl with 32 bits glibc 2.10, fallocate() exists but not fallocate64()
719 dnl when _FILE_OFFSET_BITS==64, fallocate() is redirect to fallocate64()
720 dnl and program can't be linked.
721 dnl AC_CHECK_FUNC can't catch such errors since it's redefining
722 dnl function prototype.
723 AC_MSG_CHECKING([for valid fallocate() function])
724 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
b832c2fe
YD
725#ifdef HAVE_UNISTD_H
726# include <unistd.h>
727#endif
728#ifdef HAVE_SYS_TYPES_H
729# include <sys/types.h>
730#endif
731#ifdef HAVE_LINUX_FALLOC_H
732# include <linux/falloc.h>
733#endif
734#ifdef HAVE_FCNTL_H
735# include <fcntl.h>
736#endif
737]],[[
738 long ret;
b832c2fe 739 ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0xfffffffful, 0xfffffffful);
b832c2fe
YD
740 if (ret != 0) {
741 return 1;
742 }
743 ]])],[
10e56b49
KZ
744 AC_MSG_RESULT([yes])
745 AC_DEFINE(HAVE_FALLOCATE,1,[Have valid fallocate() function])],[
746 AC_MSG_RESULT([no])])
747fi
748
19a224ad 749
a2ea6670
KZ
750AC_ARG_ENABLE([unshare],
751 AS_HELP_STRING([--disable-unshare], [do not build unshare]),
752 [], enable_unshare=check
753)
754build_unshare=yes
755UL_REQUIRES_LINUX([unshare])
756UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
757AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
758if test "x$build_unshare" = xyes; then
759 AC_CHECK_FUNCS([unshare])
760fi
b3425806
SK
761
762
6a97809b
KZ
763AC_ARG_ENABLE([arch],
764 AS_HELP_STRING([--enable-arch], [do build arch]),
765 [], enable_arch=no
766)
3c6e292c
KZ
767build_arch=yes
768UL_REQUIRES_LINUX([arch])
769AM_CONDITIONAL(BUILD_ARCH, test "x$build_arch" = xyes)
770
48d7b13a 771
4a8962f3
KZ
772AC_ARG_ENABLE([ddate],
773 AS_HELP_STRING([--enable-ddate], [do build ddate]),
564cea2b 774 [], enable_ddate=no
4a8962f3 775)
0fc74be1
KZ
776build_ddate=$enable_ddate
777AM_CONDITIONAL(BUILD_DDATE, test "x$build_ddate" = xyes)
778
4a8962f3 779
48d7b13a 780AC_ARG_ENABLE([agetty],
7fa4f112 781 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
271d98e0 782 [], enable_agetty=yes
48d7b13a 783)
0fc74be1
KZ
784build_agetty=$enable_agetty
785AM_CONDITIONAL(BUILD_AGETTY, test "x$build_agetty" = xyes)
786
48d7b13a 787
9cb68977 788AC_ARG_ENABLE([cramfs],
7fa4f112 789 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
271d98e0 790 [], enable_cramfs=check
9cb68977 791)
d81b5a52
KZ
792build_cramfs=yes
793AC_CHECK_LIB(z, crc32, [have_z=yes], [have_z=no])
794UL_REQUIRES_HAVE([cramfs], [z], [z library])
49ccbae6 795AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
9cb68977 796
a13cdb7a
KZ
797
798enable_lsblk=check
7f7126d7 799build_lsblk=yes
a13cdb7a
KZ
800UL_REQUIRES_LINUX([lsblk])
801UL_REQUIRES_BUILD([lsblk], [libblkid])
7f7126d7 802AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes)
9cb68977 803
a3d3b770 804
da396d88
KZ
805enable_lscpu=check
806build_lscpu=yes
807UL_REQUIRES_LINUX([lscpu])
808UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
809AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes)
810
a3d3b770 811
da396d88
KZ
812enable_chcpu=check
813build_chcpu=yes
814UL_REQUIRES_LINUX([chcpu])
815UL_REQUIRES_HAVE([chcpu], [cpu_set_t], [cpu_set_t type])
816AM_CONDITIONAL(BUILD_CHCPU, test "x$build_chcpu" = xyes)
817
a13cdb7a 818
bd671347
KZ
819AC_ARG_ENABLE([switch_root],
820 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
940fd28c 821 [], enable_switch_root=check
bd671347 822)
a3d3b770
KZ
823build_switch_root=yes
824UL_REQUIRES_LINUX([switch_root])
825UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
940fd28c 826AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
bd671347
KZ
827
828
11125e7a
KZ
829AC_ARG_ENABLE([pivot_root],
830 AS_HELP_STRING([--disable-pivot_root], [do not build pivot_root]),
831 [], enable_pivot_root=check
832)
9f632667
KZ
833build_pivot_root=yes
834UL_REQUIRES_LINUX([switch_root])
835UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
4a2ecf0a 836AM_CONDITIONAL(BUILD_PIVOT_ROOT, test "x$build_pivot_root" = xyes)
11125e7a
KZ
837
838
48d7b13a 839AC_ARG_ENABLE([elvtune],
7fa4f112 840 AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
271d98e0 841 [], enable_elvtune=no
48d7b13a 842)
b8d8c653
KZ
843build_elvtune=yes
844UL_REQUIRES_LINUX([elvtune])
845AM_CONDITIONAL(BUILD_ELVTUNE, test "x$build_elvtune" = xyes)
846
48d7b13a 847
48d7b13a 848AC_ARG_ENABLE([kill],
4be753aa
KZ
849 AS_HELP_STRING([--disable-kill], [do not build kill]),
850 [], enable_kill=check
48d7b13a 851)
4be753aa
KZ
852build_kill=yes
853UL_REQUIRES_LINUX([kill])
49ccbae6 854AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
48d7b13a
KZ
855
856
857AC_ARG_ENABLE([last],
7fa4f112 858 AS_HELP_STRING([--enable-last], [build last]),
271d98e0 859 [], enable_last=no
48d7b13a 860)
2dc68529
KZ
861build_last=$enable_last
862AM_CONDITIONAL(BUILD_LAST, test "x$build_last" = xyes)
863
48d7b13a 864
c135a8bd
SK
865AC_ARG_ENABLE([line],
866 AS_HELP_STRING([--enable-line], [build line]),
867 [], enable_line=no
868)
2dc68529
KZ
869build_line=$enable_line
870AM_CONDITIONAL(BUILD_LINE, test "x$build_line" = xyes)
871
48d7b13a
KZ
872
873AC_ARG_ENABLE([mesg],
7fa4f112 874 AS_HELP_STRING([--enable-mesg], [build mesg]),
271d98e0 875 [], enable_mesg=no
48d7b13a 876)
2dc68529
KZ
877build_mesg=$enable_mesg
878AM_CONDITIONAL(BUILD_MESG, test "x$build_mesg" = xyes)
48d7b13a
KZ
879
880
48d7b13a 881AC_ARG_ENABLE([raw],
7fa4f112 882 AS_HELP_STRING([--enable-raw], [build raw]),
16ba8d58 883 [], enable_raw=check
48d7b13a 884)
16ba8d58
KZ
885build_raw=yes
886UL_REQUIRES_LINUX([raw])
887UL_REQUIRES_HAVE([raw], [linux_raw_h], [raw.h header file])
888AM_CONDITIONAL(BUILD_RAW, test "x$build_raw" = xyes)
48d7b13a
KZ
889
890
48d7b13a 891AC_ARG_ENABLE([rename],
7fa4f112 892 AS_HELP_STRING([--disable-rename], [do not build rename]),
271d98e0 893 [], enable_rename=yes
48d7b13a 894)
d1171542
KZ
895build_rename=$enable_rename
896AM_CONDITIONAL(BUILD_RENAME, test "x$build_rename" = xyes)
48d7b13a
KZ
897
898
899AC_ARG_ENABLE([reset],
7fa4f112 900 AS_HELP_STRING([--enable-reset], [build reset]),
271d98e0 901 [], enable_reset=no
48d7b13a 902)
d1171542
KZ
903build_reset=$enable_reset
904AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes)
48d7b13a
KZ
905
906
907AC_ARG_ENABLE([login-utils],
7fa4f112 908 AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
271d98e0 909 [], enable_login_utils=no
48d7b13a 910)
ff0cb84d
KZ
911build_login_utils=yes
912UL_REQUIRES_HAVE([login_utils], [security_pam_misc_h], [PAM header file])
913AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$build_login_utils" = xyes)
9cb68977 914
c94b3604 915
9cb68977 916AC_ARG_WITH([selinux],
7fa4f112 917 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
271d98e0 918 [], with_selinux=no
9cb68977
KZ
919)
920
49ccbae6 921if test "x$with_selinux" = xno; then
fd67be31
SK
922 AM_CONDITIONAL(HAVE_SELINUX, false)
923else
132ea941 924 UL_CHECK_LIB(selinux, getprevcon)
49ccbae6 925 case "$with_selinux:$have_selinux" in
fd67be31
SK
926 yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
927 esac
9cb68977 928fi
9cb68977 929
49ccbae6 930if test "x$have_selinux" = xyes; then
8569410c
SK
931 SELINUX_LIBS="-lselinux -lsepol"
932 SELINUX_LIBS_STATIC="-lselinux -lsepol"
28d39b6d
KZ
933 old_LDFLAGS="$LDFLAGS"
934 LDFLAGS="$LDFLAGS $SELINUX_LIBS"
935 # This function is missing in old libselinux 1.xx versions
936 AC_CHECK_FUNCS([security_get_initial_context])
937 LDFLAGS="$old_LDFLAGS"
8569410c
SK
938fi
939AC_SUBST([SELINUX_LIBS])
940AC_SUBST([SELINUX_LIBS_STATIC])
9cb68977 941
bbae9cb0 942AC_ARG_WITH([audit],
7fa4f112 943 AS_HELP_STRING([--with-audit], [compile with audit support]),
271d98e0 944 [], with_audit=no
bbae9cb0
KZ
945)
946
49ccbae6 947if test "x$with_audit" = xno; then
fd67be31
SK
948 AM_CONDITIONAL(HAVE_AUDIT, false)
949else
132ea941 950 UL_CHECK_LIB(audit, audit_log_user_message)
49ccbae6 951 case "$with_audit:$have_audit" in
fd67be31 952 yes:no)
f17f5f48 953 AC_MSG_ERROR([Audit selected but libaudit not found (or does not support audit_log_user_message())])
fd67be31
SK
954 ;;
955 esac
bbae9cb0 956fi
bbae9cb0 957
f17f5f48
IM
958
959AC_ARG_WITH([udev], AS_HELP_STRING([--without-udev], [compile without udev support]),
960 [], with_udev=auto
961)
962
963if test "x$with_udev" = xno; then
964 AM_CONDITIONAL(HAVE_UDEV, false)
965else
132ea941 966 UL_CHECK_LIB(udev, udev_new)
f17f5f48
IM
967 case "$with_udev:$have_udev" in
968 yes:no)
969 AC_MSG_ERROR([udev selected but libudev not found])
970 ;;
971 esac
972fi
973
48d7b13a 974AC_ARG_ENABLE([schedutils],
7fa4f112 975 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
271d98e0 976 [], enable_schedutils=yes
48d7b13a 977)
49ccbae6 978AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
48d7b13a
KZ
979
980
981AC_ARG_ENABLE([wall],
7fa4f112 982 AS_HELP_STRING([--disable-wall], [do not build wall]),
271d98e0 983 [], enable_wall=yes
48d7b13a 984)
49ccbae6 985AM_CONDITIONAL(BUILD_WALL, test "x$enable_wall" = xyes)
48d7b13a
KZ
986
987
988AC_ARG_ENABLE([write],
7fa4f112 989 AS_HELP_STRING([--enable-write], [build write]),
271d98e0 990 [], enable_write=no
48d7b13a 991)
49ccbae6 992AM_CONDITIONAL(BUILD_WRITE, test "x$enable_write" = xyes)
48d7b13a
KZ
993
994
995AC_ARG_ENABLE([chsh-only-listed],
7fa4f112 996 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
271d98e0 997 [], enable_chsh_only_listed=yes
48d7b13a
KZ
998)
999
49ccbae6 1000if test "x$enable_chsh_only_listed" = xyes; then
48d7b13a
KZ
1001 AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
1002fi
1003
1004
1005AC_ARG_ENABLE([login-chown-vcs],
7fa4f112 1006 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
271d98e0 1007 [], enable_login_chown_vcs=no
48d7b13a
KZ
1008)
1009
49ccbae6 1010if test "x$enable_login_chown_vcs" = xyes; then
48d7b13a
KZ
1011 AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
1012fi
1013
1014
1015AC_ARG_ENABLE([login-stat-mail],
7fa4f112 1016 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
271d98e0 1017 [], enable_login_stat_mail=no
48d7b13a
KZ
1018)
1019
49ccbae6 1020if test "x$enable_login_stat_mail" = xyes; then
48d7b13a
KZ
1021 AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
1022fi
1023
1024
1025AC_ARG_ENABLE([pg-bell],
7fa4f112 1026 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
271d98e0 1027 [], enable_pg_bell=yes
48d7b13a
KZ
1028)
1029
49ccbae6 1030if test "x$enable_pg_bell" = xyes; then
48d7b13a
KZ
1031 AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
1032fi
1033
1034
1035AC_ARG_ENABLE([require-password],
7fa4f112 1036 AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
271d98e0 1037 [], enable_require_password=yes
48d7b13a
KZ
1038)
1039
49ccbae6 1040if test "x$enable_require_password" = xyes; then
48d7b13a
KZ
1041 AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
1042fi
1043
1044
bb4cb69d
MF
1045AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
1046AC_ARG_ENABLE([fs-paths-default],
1047 AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
1048 [case "$enableval" in
1049 yes) fs_paths_defaults="FS_PATHS_DEFAULT" ;;
1050 no) fs_paths_defaults="" ;;
1051 *) fs_paths_defaults="$enableval" ;;
1052 esac],
1053 [fs_paths_defaults="FS_PATHS_DEFAULT"]
1054)
1055AC_ARG_ENABLE([fs-paths-extra],
1056 AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
1057 [case "$enableval" in
1058 yes|no) fs_paths_extra="" ;;
1059 *) fs_paths_extra="$enableval" ;;
1060 esac],
1061 [fs_paths_extra=""]
1062)
1063fs_paths="$fs_paths_defaults"
1064if test "x$fs_paths_extra" != "x"; then
1065 if test "x$fs_paths" != "x"; then
1066 fs_paths="${fs_paths}:"
1067 fi
1068 fs_paths="${fs_paths}${fs_paths_extra}"
1069fi
1070AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
1071
1072
48d7b13a 1073AC_ARG_ENABLE([use-tty-group],
7fa4f112 1074 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
271d98e0 1075 [], enable_use_tty_group=yes
48d7b13a 1076)
49ccbae6 1077AM_CONDITIONAL(USE_TTY_GROUP, test "x$enable_use_tty_group" = xyes)
48d7b13a 1078
49ccbae6 1079if test "x$enable_use_tty_group" = xyes; then
48d7b13a
KZ
1080 AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
1081fi
1082
f3831bbd
KZ
1083AC_ARG_ENABLE([makeinstall-chown],
1084 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
1085 [], enable_makeinstall_chown=yes
1086)
49ccbae6 1087AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes)
f3831bbd 1088
4c24a7ae
KZ
1089AC_ARG_ENABLE([makeinstall-setuid],
1090 AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
1091 [], enable_makeinstall_setuid=yes
1092)
1093AM_CONDITIONAL(MAKEINSTALL_DO_SETUID, test "x$enable_makeinstall_setuid" = xyes)
1094
06bcee19 1095
1f10890f
SK
1096AC_ARG_VAR([SUID_CFLAGS],
1097 [CFLAGS used for binaries which are usually with the suid bit])
1098AC_ARG_VAR([SUID_LDFLAGS],
1099 [LDFLAGS used for binaries which are usually with the suid bit])
06bcee19 1100
9cb68977 1101LIBS=""
48d7b13a 1102
48d7b13a
KZ
1103
1104AC_CONFIG_HEADERS(config.h)
1105
8eeb575c 1106AC_CONFIG_FILES([
8eeb575c 1107disk-utils/Makefile
562218e6 1108fdisk/Makefile
607c2a72 1109fsck/Makefile
8eeb575c
KZ
1110getopt/Makefile
1111hwclock/Makefile
562218e6 1112include/Makefile
d00ed891 1113lib/Makefile
8eeb575c 1114login-utils/Makefile
20ad4963 1115Makefile
f331598a 1116man/ru/Makefile
20ad4963 1117misc-utils/chkdupexe:misc-utils/chkdupexe.pl
8eeb575c
KZ
1118misc-utils/Makefile
1119mount/Makefile
1120partx/Makefile
1121po/Makefile.in
1122schedutils/Makefile
8fb4efae
KZ
1123libblkid/blkid.pc
1124libblkid/Makefile
1125libblkid/docs/Makefile
1126libblkid/docs/version.xml
1127libblkid/src/Makefile
1128libblkid/src/blkid.h
1129libblkid/src/superblocks/Makefile
1130libblkid/src/topology/Makefile
1131libblkid/src/partitions/Makefile
1132libblkid/samples/Makefile
2aefc0a8
KZ
1133libmount/mount.pc
1134libmount/Makefile
1135libmount/src/Makefile
1136libmount/src/libmount.h
1137libmount/docs/Makefile
1138libmount/docs/version.xml
1139libmount/samples/Makefile
83d20837
KZ
1140libuuid/uuid.pc
1141libuuid/Makefile
1142libuuid/man/Makefile
1143libuuid/src/Makefile
8eeb575c 1144sys-utils/Makefile
c0f20acb 1145term-utils/Makefile
e83446da 1146tests/commands.sh
20ad4963
KZ
1147tests/helpers/Makefile
1148tests/Makefile
1149text-utils/Makefile
8eeb575c 1150])
48d7b13a 1151
996fb358 1152
48d7b13a 1153AC_OUTPUT