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