]> git.ipfire.org Git - thirdparty/util-linux.git/blame - configure.ac
blkid: fix #ifdef HAVE_TERMIO[S]_H
[thirdparty/util-linux.git] / configure.ac
CommitLineData
36b00d61 1AC_INIT(util-linux-ng, 2.17, kzak@redhat.com)
baf39af1 2
7fc9786b 3AC_PREREQ(2.60)
48d7b13a
KZ
4
5AC_CONFIG_AUX_DIR(config)
b12991dd 6AC_CONFIG_MACRO_DIR([m4])
48d7b13a 7
42d2a7ba 8AM_INIT_AUTOMAKE([check-news -Wall foreign 1.9 dist-bzip2])
48d7b13a 9
eb35c251
GJ
10m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
12
48d7b13a
KZ
13AC_CONFIG_SRCDIR(mount/mount.c)
14
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"
36b00d61 25LIBBLKID_DATE="08-Jan-2010"
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
15a9b48c
SK
38# Check whether exec_prefix=/usr:
39case $exec_prefix:$prefix in
40NONE:NONE | NONE:/usr | /usr:*)
41 AC_MSG_NOTICE([Default --exec-prefix detected.])
42 case $bindir in
43 '${exec_prefix}/bin') bindir=/bin
44 AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
45 esac
46 case $sbindir in
47 '${exec_prefix}/sbin') sbindir=/sbin
48 AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
971f57f6
KZ
49 esac
50 case $libdir in
51 '${exec_prefix}/lib') libdir=/lib
52 AC_MSG_NOTICE([ --libdir defaults to /lib]) ;;
15a9b48c
SK
53 esac ;;
54esac
48d7b13a 55
cb5212e2 56libdirname=`basename "$libdir"`
b0a0d7d5
KZ
57AC_SUBST([libdirname])
58
996fb358 59# The original default values of {bin,sbin,lib}dir
aaf3e8f5 60usrbin_execdir='${exec_prefix}/bin'
30688dde 61AC_SUBST([usrbin_execdir])
996fb358 62
aaf3e8f5 63usrsbin_execdir='${exec_prefix}/sbin'
30688dde 64AC_SUBST([usrsbin_execdir])
996fb358 65
aaf3e8f5 66usrlib_execdir='${exec_prefix}/'$libdirname
30688dde 67AC_SUBST([usrlib_execdir])
996fb358
KZ
68
69
48d7b13a 70AC_PROG_CC_STDC
240f7101 71AC_GNU_SOURCE
a6996860 72AC_CANONICAL_HOST
85b4c147 73AC_C_CONST
e79829db 74AC_C_VOLATILE
fbaec83b 75AC_C_BIGENDIAN
b12991dd
KZ
76
77dnl libtool-2
78LT_INIT
48d7b13a 79
d06d028a
KZ
80PKG_PROG_PKG_CONFIG
81
22aa5166
KZ
82GTK_DOC_CHECK([1.10])
83AC_PATH_PROG([XSLTPROC], [xsltproc])
84
8c182554
KZ
85linux_os=no
86case ${host_os} in
87 *linux*)
88 linux_os=yes
89 ;;
90esac
49ccbae6 91AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
8c182554 92
48d7b13a
KZ
93AC_PATH_PROG(PERL, perl)
94
95AC_SYS_LARGEFILE
96
e460a5bf 97AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
48d7b13a
KZ
98#ifdef HAVE_LINUX_COMPILER_H
99#include <linux/compiler.h>
100#endif
101])
bf962c0a 102AC_CHECK_HEADERS(
a0948ffe
KZ
103 [err.h \
104 errno.h \
105 getopt.h \
bf962c0a 106 langinfo.h \
a0948ffe
KZ
107 linux/fd.h \
108 linux/tiocl.h \
109 linux/version.h \
8b7f16fc 110 locale.h \
754fed0c
KZ
111 stdint.h \
112 inttypes.h \
a0948ffe 113 pty.h \
607c2a72 114 mntent.h \
754fed0c
KZ
115 net/if.h \
116 net/if_dl.h \
117 netinet/in.h \
bf962c0a 118 rpcsvc/nfs_prot.h \
a0948ffe
KZ
119 stdlib.h \
120 sys/disk.h \
121 sys/disklabel.h \
122 sys/ioctl.h \
bf962c0a 123 sys/io.h \
754fed0c 124 sys/time.h \
a0948ffe
KZ
125 sys/mkdev.h \
126 sys/prctl.h \
127 sys/queue.h \
754fed0c
KZ
128 sys/sockio.h \
129 sys/file.h \
130 sys/ioctl.h \
a0948ffe
KZ
131 sys/stat.h \
132 sys/types.h \
754fed0c 133 sys/un.h \
a0948ffe 134 sys/user.h \
754fed0c 135 sys/resource.h \
a0948ffe 136 unistd.h ])
fd67be31
SK
137AC_CHECK_HEADERS([linux/raw.h],
138 [AM_CONDITIONAL([HAVE_RAW], [true])],
139 [AM_CONDITIONAL([HAVE_RAW], [false])])
48d7b13a 140
a88057d9
TP
141AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
142
bf962c0a
SK
143AC_CHECK_FUNCS(
144 [inet_aton \
b7ce600d 145 futimens \
bf962c0a
SK
146 fsync \
147 getdomainname \
e27a08ab 148 get_current_dir_name \
437fa54f 149 usleep \
bf962c0a
SK
150 nanosleep \
151 personality \
152 updwtmp \
3ac22f7a 153 jrand48 \
bf962c0a 154 lchown \
a0948ffe
KZ
155 llseek \
156 lseek64 \
157 strtoull \
754fed0c
KZ
158 sysconf \
159 getdtablesize \
160 getrlimit \
161 srandom \
69045d3d
KZ
162 setresgid \
163 setresuid \
fc7aeb09 164 inotify_init \
a0948ffe 165 prctl \
a67bb3bf 166 posix_fadvise \
acf6ab6f 167 getmntinfo \
a0948ffe 168 __secure_getenv \
bf962c0a 169 rpmatch])
48d7b13a 170AC_FUNC_FSEEKO
48d7b13a 171
940fd28c
KZ
172AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
173
754fed0c
KZ
174AC_CHECK_MEMBER(struct sockaddr.sa_len,
175 AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
176 [#include <sys/types.h>
177 #include <sys/socket.h>])
178
8569410c 179dnl Static compilation
642f01a3 180m4_define([UTIL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
8569410c
SK
181
182AC_ARG_ENABLE([static-programs],
183 [AS_HELP_STRING([--enable-static-programs=LIST],
184 [link static the programs in LIST (comma-separated,
185 supported for ]m4_defn([UTIL_STATIC_PROGRAMS])[)])])
186
187case $enable_static_programs in
188yes) enable_static_programs=m4_quote(UTIL_STATIC_PROGRAMS) ;;
189no) enable_static_programs= ;;
190esac
191
8569410c
SK
192dnl Set all the individual AM_CONDITIONALs
193m4_foreach([UTIL_PRG], m4_defn([UTIL_STATIC_PROGRAMS]), [
194 case ,$enable_static_programs, in
195 *,UTIL_PRG,*) static_[]UTIL_PRG=yes ;;
196 esac
197 AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UTIL_PRG),
49ccbae6 198 [test "x$static_[]UTIL_PRG" = xyes])
8569410c
SK
199])
200
f910b559
KZ
201dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
202dnl ----------------------------------
203AC_DEFUN([UTIL_PKG_STATIC], [
204 if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
205 $1=`pkg-config --libs --static "$2"`
206 else
207 AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
208 fi
209])
210
40cc242e
KZ
211dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
212dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
213dnl UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
214dnl UTIL_CHECK_LIB(yyy, func) generates have_yyy and HAVE_LIBYYY
fd67be31
SK
215dnl ---------------------------------
216AC_DEFUN([UTIL_CHECK_LIB], [
40cc242e
KZ
217 m4_define([suffix], m4_default([$3],$1))
218 [have_]suffix=yes
219 m4_ifdef([$3],
220 [AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])],
221 [AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])])
222 AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes])
fd67be31 223])
9dc801d2 224
6fed18f2
KZ
225dnl UTIL_SET_FLAGS(CFLAGS, CPPFLAGS, LDFLAGS)
226AC_DEFUN([UTIL_SET_FLAGS], [
227 old_CFLAGS="$CFLAGS"
228 old_CPPFLAGS="$CPPFLAGS"
229 old_LDFLAGS="$LDFLAGS"
230 CFLAGS="$CFLAGS $1"
231 CPPFLAGS="$CPPFLAGS $2"
232 LDFLAGS="$LDFLAGS $3"
233])
234
235dnl UTIL_RESTORE_FLAGS()
236AC_DEFUN([UTIL_RESTORE_FLAGS], [
237 CFLAGS="$old_CFLAGS"
238 CPPFLAGS="$old_CPPFLAGS"
239 LDFLAGS="$old_LDFLAGS"
240])
241
242
d7a01582 243AX_CHECK_TLS
3ac22f7a 244
f910b559
KZ
245AC_ARG_ENABLE([mount],
246 AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
247 [], enable_mount=check
248)
249build_mount=yes
250if test "x$enable_mount" = xcheck; then
251 if test "x$linux_os" = xno; then
252 AC_MSG_WARN([non-linux system; do not build mount utilities])
253 build_mount=no
254 fi
255elif test "x$enable_mount" = xno; then
256 build_mount=no
257fi
258AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
259
260
261AC_ARG_ENABLE([fsck],
6c2a09b3
KZ
262 AS_HELP_STRING([--disable-fsck], [do not build fsck]),
263 [], enable_fsck=yes
f910b559
KZ
264)
265AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
266
267
17afb032
KZ
268AC_ARG_ENABLE([libuuid],
269 AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
270 [], enable_libuuid=yes
271)
dc2b8d87
KZ
272AC_SUBST([LIBUUID_VERSION])
273AC_SUBST([LIBUUID_VERSION_INFO])
17afb032
KZ
274AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
275have_uuid=yes
276
277if test "x$enable_libuuid" = xno; then
278 # Check for external (e2fsprogs) libuuid
279 PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
280 if test "x$have_uuid" = xno; then
281 # system without pkg-config or so, try classic check
282 AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
283 fi
284 if test "x$have_uuid" = xyes; then
285 UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
286 AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
287 UTIL_RESTORE_FLAGS
288 fi
289else
f910b559 290 # internal library
17afb032 291 AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
9dc801d2
KZ
292fi
293
17afb032
KZ
294if test "x$have_uuid" = xyes; then
295 AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
296else
297 AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
298fi
299AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
300# default
301: ${UUID_LIBS='-luuid'}
48d7b13a 302
d06d028a 303
2ec884ac
KZ
304AC_ARG_ENABLE([uuidd],
305 AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
306 [], enable_uuidd=auto
307)
308
309case "$enable_uuidd:$have_uuid" in
310yes:no)
311 AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
312auto:*)
313 enable_uuidd=$have_uuid ;;
314esac
315if test "x$enable_uuidd" = xyes; then
316 AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
317fi
318AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes)
319
320
f910b559
KZ
321AC_ARG_ENABLE([libblkid],
322 AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
323 [], enable_libblkid=yes
40f07ff7 324)
033cf439 325AC_SUBST([LIBBLKID_DATE])
dc2b8d87
KZ
326AC_SUBST([LIBBLKID_VERSION])
327AC_SUBST([LIBBLKID_VERSION_INFO])
f910b559
KZ
328AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
329AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
330AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
331have_blkid=yes
332
333if test "x$enable_libblkid" = xno; then
334 if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
335 # Check for external (e2fsprogs) libblkid
336 PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
337 if test "x$have_blkid" = xno; then
338 # system without pkg-config or so, try classic check
339 AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
340 fi
341 if test "x$have_blkid" = xyes; then
342 UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
343 AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
344 UTIL_RESTORE_FLAGS
345 fi
346 if test -n "$enable_static_programs"; then
347 # TODO check only when mount of fsck are requested
348 UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
349 fi
7c950efa 350 fi
f910b559
KZ
351else
352 # internal library
353 AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
1a70e0cb 354 AC_DEFINE(HAVE_LIBBLKID_INTERNAL, 1, [Define to 1 if you have the in-tree libblkid.])
b446754d
KZ
355fi
356
f910b559 357if test "x$have_blkid" = xyes; then
d06d028a 358 AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
7177d32e 359else
f910b559
KZ
360 if test "x$build_mount" = xyes; then
361 AC_MSG_ERROR([libblkid is needed to build util-linux-ng mount])
607c2a72 362 fi
f910b559
KZ
363 if test "x$enable_fsck" = xyes; then
364 AC_MSG_ERROR([libblkid is needed to build util-linux-ng fsck])
64754af9 365 fi
64754af9 366fi
f910b559
KZ
367AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
368# default
369: ${BLKID_LIBS='-lblkid -luuid'}
8569410c 370
8569410c 371AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
f910b559 372
17afb032
KZ
373UTIL_CHECK_LIB(util, openpty)
374UTIL_CHECK_LIB(termcap, tgetnum)
8569410c 375
8eeb575c 376AM_GNU_GETTEXT_VERSION([0.14.1])
48d7b13a 377AM_GNU_GETTEXT([external])
49ccbae6 378if test -d "$srcdir/po"
8eeb575c 379then
1b4a3d89 380 ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
8eeb575c
KZ
381else
382 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"
383fi
48d7b13a 384
08d64aa2
KZ
385AC_ARG_WITH([ncurses],
386 AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
387 (--without-ncurses disables all ncurses(w) support)]),
388 [], with_ncurses=auto
389)
390AM_CONDITIONAL(HAVE_NCURSES, false)
391
392if test "x$with_ncurses" != xno; then
393 have_ncurses=no
394 AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [
395 if test "x$with_ncurses" = xauto; then
9ea8ac37 396 UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
08d64aa2
KZ
397 if test "x$have_ncurses" = xyes; then
398 NCURSES_LIBS="-lncursesw"
399 fi
400 fi
49ccbae6 401 if test "x$have_ncurses" = xno; then
9ea8ac37 402 UTIL_CHECK_LIB(ncurses, initscr)
49ccbae6 403 if test "x$have_ncurses" = xyes; then
08d64aa2
KZ
404 NCURSES_LIBS="-lncurses"
405 fi
406 fi
407 ])
49ccbae6 408 if test "x$have_ncurses" = xno; then
08d64aa2
KZ
409 AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
410 fi
411fi
412AC_SUBST([NCURSES_LIBS])
413
48d7b13a 414
48d7b13a 415AC_ARG_WITH([slang],
7fa4f112 416 AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
271d98e0 417 [], with_slang=no
48d7b13a
KZ
418)
419
46e71118
AM
420have_tinfo=no
421AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
49ccbae6 422AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
46e71118 423
fd67be31 424use_slang=no
49ccbae6 425if test "x$with_slang" = xyes; then
fd67be31 426 AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
49ccbae6 427 if test "x$use_slang" = xno; then
48d7b13a
KZ
428 AC_MSG_ERROR([slang selected but slcurses.h not found])
429 fi
430fi
49ccbae6 431AM_CONDITIONAL(USE_SLANG, test "x$use_slang" = xyes)
48d7b13a
KZ
432
433
cf002530 434AC_LINK_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
435#define _XOPEN_SOURCE
436#include <unistd.h>
cf002530 437]], [[
48d7b13a 438char *c = crypt("abc","pw");
cf002530 439]])],[],[
48d7b13a 440 LIBS="$LIBS -lcrypt"
cf002530 441 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
442 #define _XOPEN_SOURCE
443 #include <unistd.h>
cf002530 444 ]], [[
48d7b13a 445 char *c = crypt("abc","pw");
cf002530 446 ]])],[
48d7b13a
KZ
447 AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
448 need_libcrypt=yes
449 ],[
450 AC_MSG_ERROR([crypt() is not available])
451 ])
48d7b13a
KZ
452])
453
49ccbae6 454AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
48d7b13a 455
cf002530 456AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a 457#include <stdio.h>
cf002530 458]], [[
48d7b13a 459printf(__progname);
cf002530
SK
460]])],
461[AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
462])
48d7b13a
KZ
463
464
869829e4
GJ
465AC_CHECK_TYPES([union semun], [], [], [[
466#include <sys/sem.h>
467]])
468
469
cf002530 470AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
471#include <wchar.h>
472#include <wctype.h>
473#include <stdio.h>
cf002530 474]], [[
48d7b13a
KZ
475 wchar_t wc;
476 wint_t w;
477 w = fgetwc(stdin);
478 if (w == WEOF) exit(1);
479 wc = w;
480 fputwc(wc,stdout);
cf002530
SK
481]])],
482[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
483])
48d7b13a
KZ
484
485
72065909
MF
486dnl UTIL_CHECK_SYSCALL(SYSCALL, FALLBACK, ...)
487dnl Only specify FALLBACK if the SYSCALL
488dnl you're checking for is a "newish" one
489dnl -------------------------------------
490AC_DEFUN([UTIL_CHECK_SYSCALL], [
491 dnl This macro uses host_cpu.
492 AC_REQUIRE([AC_CANONICAL_HOST])
493 AC_CACHE_CHECK([for syscall $1],
494 [util_cv_syscall_$1],
495 [_UTIL_SYSCALL_CHECK_DECL([SYS_$1],
496 [syscall=SYS_$1],
497 [dnl Our libc failed use, so see if we can get the kernel
498 dnl headers to play ball ...
499 _UTIL_SYSCALL_CHECK_DECL([_NR_$1],
500 [syscall=_NR_$1],
501 [
502 syscall=no
49ccbae6 503 if test "x$linux_os" = xyes; then
8c182554
KZ
504 case $host_cpu in
505 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@))
506 esac
507 fi
72065909
MF
508 ])
509 ])
510 util_cv_syscall_$1=$syscall
511 ])
49ccbae6 512 AM_CONDITIONAL([HAVE_]m4_toupper($1), [test "x$util_cv_syscall_$1" != xno])
72065909
MF
513 case $util_cv_syscall_$1 in #(
514 no) AC_MSG_WARN([Unable to detect syscall $1.]) ;;
515 SYS_*) ;;
516 *) AC_DEFINE_UNQUOTED([SYS_$1], [$util_cv_syscall_$1],
517 [Fallback syscall number for $1]) ;;
518 esac
519])
520
521dnl _UTIL_SYSCALL_CHECK_DECL(SYMBOL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
522dnl Check if SYMBOL is declared, using the headers needed for syscall checks.
523dnl -------------------------------------
524m4_define([_UTIL_SYSCALL_CHECK_DECL],
525[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
526#include <sys/syscall.h>
527#include <unistd.h>
72065909
MF
528]], [[int test = $1;]])],
529[$2], [$3])
530])
48d7b13a 531
72065909
MF
532dnl _UTIL_CHECK_SYSCALL_FALLBACK(PATTERN, VALUE, ...)
533dnl Helper macro to create the body for the above `case'.
534dnl -------------------------------------
535m4_define([_UTIL_CHECK_SYSCALL_FALLBACK],
536[m4_ifval([$1],
537 [#(
538 $1) syscall="$2" ;;dnl
539 _UTIL_CHECK_SYSCALL_FALLBACK(m4_shiftn(2, $@))])dnl
540])
48d7b13a 541
72065909
MF
542
543UTIL_CHECK_SYSCALL([pivot_root])
544UTIL_CHECK_SYSCALL([sched_getaffinity])
545UTIL_CHECK_SYSCALL([ioprio_set],
546 [alpha], [442],
547 [i*86], [289],
548 [ia64*], [1274],
549 [powerpc*], [273],
550 [s390*], [282],
551 [sparc*], [196],
447ae7b8 552 [sh*], [288],
72065909
MF
553 [x86_64*], [251])
554UTIL_CHECK_SYSCALL([ioprio_get],
555 [alpha], [443],
556 [i*86], [290],
557 [ia64*], [1275],
558 [powerpc*], [274],
559 [s390*], [283],
560 [sparc*], [218],
447ae7b8 561 [sh*], [289],
72065909 562 [x86_64*], [252])
19a224ad 563
d46a5499
KZ
564dnl fallocate could be available as libc function or as syscall only
565UTIL_CHECK_SYSCALL([fallocate])
566AC_CHECK_FUNCS([fallocate])
19a224ad 567
4205f1fd
MG
568dnl unshare could be available as libc function or as syscall only
569UTIL_CHECK_SYSCALL([unshare])
570AC_CHECK_FUNCS([unshare])
571
cf002530 572AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
48d7b13a
KZ
573#include <time.h>
574#include <unistd.h>
cf002530 575]], [[
48d7b13a
KZ
576 int a = 0;
577 struct tm *tm = localtime(0);
578 if (a == -1) /* false */
579 sleep(tm->tm_gmtoff);
cf002530
SK
580]])],
581[AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
582])
48d7b13a 583
30e8b186
KZ
584AC_CHECK_MEMBERS([struct termios.c_line],,,
585 [[#include <termios.h>]])
586
2d281745
KZ
587AC_CHECK_DECLS([
588 ADDR_NO_RANDOMIZE,
589 FDPIC_FUNCPTRS,
590 MMAP_PAGE_ZERO,
591 ADDR_COMPAT_LAYOUT,
592 READ_IMPLIES_EXEC,
593 ADDR_LIMIT_32BIT,
594 WHOLE_SECONDS,
595 STICKY_TIMEOUTS,
596 ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
48d7b13a 597
22d36665 598AC_CHECK_HEADERS([sys/swap.h])
b3425806
SK
599
600AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
601[[
b3425806
SK
602#ifdef HAVE_SYS_SWAP_H
603# include <sys/swap.h>
604#endif
605#include <unistd.h>
606]],
607[[swapon("/dev/null", 0);]])],
608[AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
609],
610[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
611])
612
613
e782f1d4
KZ
614dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
615dnl ---------------------------------
616AC_DEFUN([UTIL_SET_ARCH], [
617 cpu_$1=false
618 case "$host" in
619 $2) cpu_$1=true ;;
620 esac
49ccbae6 621 AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test "x$cpu_$1" = xtrue])
e782f1d4 622])
48d7b13a 623
e782f1d4
KZ
624UTIL_SET_ARCH(I86, i?86-*)
625UTIL_SET_ARCH(86_64, x86_64*)
626UTIL_SET_ARCH(IA64, ia64*)
627UTIL_SET_ARCH(S390, s390*)
628UTIL_SET_ARCH(SPARC, sparc*)
629UTIL_SET_ARCH(PPC, ppc*|powerpc*)
630UTIL_SET_ARCH(M68K, m68*)
631UTIL_SET_ARCH(MIPS, mips*)
eeadb4f4 632UTIL_SET_ARCH(HPPA, hppa*)
48d7b13a 633
6a97809b
KZ
634AC_ARG_ENABLE([arch],
635 AS_HELP_STRING([--enable-arch], [do build arch]),
636 [], enable_arch=no
637)
49ccbae6 638AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
48d7b13a
KZ
639
640AC_ARG_ENABLE([agetty],
7fa4f112 641 AS_HELP_STRING([--disable-agetty], [do not build agetty]),
271d98e0 642 [], enable_agetty=yes
48d7b13a 643)
49ccbae6 644AM_CONDITIONAL(BUILD_AGETTY, test "x$enable_agetty" = xyes)
48d7b13a 645
9cb68977 646AC_ARG_ENABLE([cramfs],
7fa4f112 647 AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
271d98e0 648 [], enable_cramfs=check
9cb68977
KZ
649)
650
49ccbae6 651if test "x$enable_cramfs" = xno; then
fd67be31
SK
652 build_cramfs=no
653else
654 build_cramfs=yes
655 dnl Trick: leave the third parameter empty to get the default action.
656 AC_CHECK_LIB(z, crc32, [], build_cramfs=no)
657 case $enable_cramfs:$build_cramfs in
658 yes:no) AC_MSG_ERROR([cramfs selected but libz not found]);;
659 esac
9cb68977 660fi
49ccbae6 661AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
9cb68977
KZ
662
663
bd671347
KZ
664AC_ARG_ENABLE([switch_root],
665 AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
940fd28c 666 [], enable_switch_root=check
bd671347 667)
940fd28c
KZ
668if test "x$enable_switch_root" = xno; then
669 build_switch_root=no
670else
671 build_switch_root=yes
672 case $enable_switch_root:$linux_os in
673 yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
674 check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
675 build_switch_root=no;;
676 esac
677 if test "x$build_switch_root" = xyes; then
678 case $enable_switch_root:$have_openat in
679 yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
680 check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
681 build_switch_root=no;;
682 esac
683 fi
684fi
685AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
bd671347
KZ
686
687
11125e7a
KZ
688AC_ARG_ENABLE([pivot_root],
689 AS_HELP_STRING([--disable-pivot_root], [do not build pivot_root]),
690 [], enable_pivot_root=check
691)
692if test "x$enable_pivot_root" = xno; then
693 build_pivot_root=no
694else
695 build_pivot_root=yes
696 case $enable_pivot_root:$linux_os in
697 yes:no) AC_MSG_ERROR([pivot_root selected for non-linux system]);;
698 check:no) AC_MSG_WARN([non-linux system; do not build pivot_root])
699 build_pivot_root=no;;
700 esac
701 if test "x$build_pivot_root" = xyes; then
702 case $enable_pivot_root:$util_cv_syscall_pivot_root in
703 yes:no) AC_MSG_ERROR([pivot_root selected but pivot_root syscall not found]);;
704 check:no) AC_MSG_WARN([pivot_root syscall not found; do not build pivot_root])
705 build_pivot_root=no;;
706 esac
707 fi
708fi
4a2ecf0a 709AM_CONDITIONAL(BUILD_PIVOT_ROOT, test "x$build_pivot_root" = xyes)
11125e7a
KZ
710
711
712AC_ARG_ENABLE([fallocate],
713 AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
714 [], enable_fallocate=check
715)
716if test "x$enable_fallocate" = xno; then
717 build_fallocate=no
718else
719 build_fallocate=yes
720 case $enable_fallocate:$linux_os in
721 yes:no) AC_MSG_ERROR([fallocate selected for non-linux system]);;
722 check:no) AC_MSG_WARN([non-linux system; do not build fallocate])
723 build_fallocate=no;;
724 esac
725 if test "x$build_fallocate" = xyes; then
726 case $enable_fallocate:$util_cv_syscall_fallocate in
727 yes:no) AC_MSG_ERROR([fallocate selected but fallocate syscall not found]);;
728 check:no) AC_MSG_WARN([fallocate syscall not found; do not build fallocate])
729 build_fallocate=no;;
730 esac
731 fi
732fi
733AM_CONDITIONAL(BUILD_FALLOCATE, test "x$build_fallocate" = xyes)
734
735
736AC_ARG_ENABLE([unshare],
737 AS_HELP_STRING([--disable-unshare], [do not build unshare]),
738 [], enable_unshare=check
739)
740if test "x$enable_unshare" = xno; then
741 build_unshare=no
742else
743 build_unshare=yes
744 case $enable_unshare:$linux_os in
745 yes:no) AC_MSG_ERROR([unshare selected for non-linux system]);;
746 check:no) AC_MSG_WARN([non-linux system; do not build unshare])
747 build_unshare=no;;
748 esac
749 if test "x$build_unshare" = xyes; then
750 case $enable_unshare:$util_cv_syscall_unshare in
751 yes:no) AC_MSG_ERROR([unshare selected but unshare syscall not found]);;
752 check:no) AC_MSG_WARN([unshare syscall not found; do not build unshare])
753 build_unshare=no;;
754 esac
755 fi
756fi
757AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
758
759
760
48d7b13a 761AC_ARG_ENABLE([elvtune],
7fa4f112 762 AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
271d98e0 763 [], enable_elvtune=no
48d7b13a 764)
49ccbae6 765AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
48d7b13a
KZ
766
767
768AC_ARG_ENABLE([init],
7fa4f112 769 AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
271d98e0 770 [], enable_init=no
48d7b13a 771)
49ccbae6 772AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
48d7b13a
KZ
773
774
775AC_ARG_ENABLE([kill],
7fa4f112 776 AS_HELP_STRING([--enable-kill], [build kill]),
271d98e0 777 [], enable_kill=no
48d7b13a 778)
49ccbae6 779AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
48d7b13a
KZ
780
781
782AC_ARG_ENABLE([last],
7fa4f112 783 AS_HELP_STRING([--enable-last], [build last]),
271d98e0 784 [], enable_last=no
48d7b13a 785)
49ccbae6 786AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
48d7b13a
KZ
787
788
789AC_ARG_ENABLE([mesg],
7fa4f112 790 AS_HELP_STRING([--enable-mesg], [build mesg]),
271d98e0 791 [], enable_mesg=no
48d7b13a 792)
49ccbae6 793AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
48d7b13a
KZ
794
795
796AC_ARG_ENABLE([partx],
7fa4f112 797 AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
271d98e0 798 [], enable_partx=no
48d7b13a 799)
49ccbae6 800AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
48d7b13a
KZ
801
802
803AC_ARG_ENABLE([raw],
7fa4f112 804 AS_HELP_STRING([--enable-raw], [build raw]),
271d98e0 805 [], enable_raw=no
48d7b13a 806)
49ccbae6 807AM_CONDITIONAL(BUILD_RAW, test "x$enable_raw" = xyes)
48d7b13a
KZ
808
809
810AC_ARG_ENABLE([rdev],
7fa4f112 811 AS_HELP_STRING([--enable-rdev], [build rdev on i386]),
271d98e0 812 [], enable_rdev=no
48d7b13a 813)
49ccbae6 814AM_CONDITIONAL(BUILD_RDEV, test "x$enable_rdev" = xyes)
48d7b13a
KZ
815
816
817AC_ARG_ENABLE([rename],
7fa4f112 818 AS_HELP_STRING([--disable-rename], [do not build rename]),
271d98e0 819 [], enable_rename=yes
48d7b13a 820)
49ccbae6 821AM_CONDITIONAL(BUILD_RENAME, test "x$enable_rename" = xyes)
48d7b13a
KZ
822
823
824AC_ARG_ENABLE([reset],
7fa4f112 825 AS_HELP_STRING([--enable-reset], [build reset]),
271d98e0 826 [], enable_reset=no
48d7b13a 827)
49ccbae6 828AM_CONDITIONAL(BUILD_RESET, test "x$enable_reset" = xyes)
48d7b13a
KZ
829
830
831AC_ARG_ENABLE([login-utils],
7fa4f112 832 AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
271d98e0 833 [], enable_login_utils=no
48d7b13a 834)
49ccbae6 835AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$enable_login_utils" = xyes)
48d7b13a 836
9cb68977 837AC_ARG_WITH([pam],
7fa4f112 838 [AS_HELP_STRING([--without-pam], [compile login-utils without PAM support])])
9cb68977 839
fd67be31 840AM_CONDITIONAL(HAVE_PAM, false)
49ccbae6 841if test "x$enable_login_utils" = xyes && test "x$with_pam" != xno; then
fd67be31
SK
842 AC_CHECK_HEADERS([security/pam_misc.h],
843 [AM_CONDITIONAL(HAVE_PAM, true)],
49ccbae6 844 [if test "x$with_pam" = xyes; then
fd67be31
SK
845 AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
846 fi
847 ])
9cb68977 848fi
9cb68977
KZ
849
850AC_ARG_WITH([selinux],
7fa4f112 851 AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
271d98e0 852 [], with_selinux=no
9cb68977
KZ
853)
854
49ccbae6 855if test "x$with_selinux" = xno; then
fd67be31
SK
856 AM_CONDITIONAL(HAVE_SELINUX, false)
857else
858 UTIL_CHECK_LIB(selinux, getprevcon)
49ccbae6 859 case "$with_selinux:$have_selinux" in
fd67be31
SK
860 yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
861 esac
9cb68977 862fi
9cb68977 863
49ccbae6 864if test "x$have_selinux" = xyes; then
8569410c
SK
865 SELINUX_LIBS="-lselinux -lsepol"
866 SELINUX_LIBS_STATIC="-lselinux -lsepol"
28d39b6d
KZ
867 old_LDFLAGS="$LDFLAGS"
868 LDFLAGS="$LDFLAGS $SELINUX_LIBS"
869 # This function is missing in old libselinux 1.xx versions
870 AC_CHECK_FUNCS([security_get_initial_context])
871 LDFLAGS="$old_LDFLAGS"
8569410c
SK
872fi
873AC_SUBST([SELINUX_LIBS])
874AC_SUBST([SELINUX_LIBS_STATIC])
9cb68977 875
bbae9cb0 876AC_ARG_WITH([audit],
7fa4f112 877 AS_HELP_STRING([--with-audit], [compile with audit support]),
271d98e0 878 [], with_audit=no
bbae9cb0
KZ
879)
880
49ccbae6 881if test "x$with_audit" = xno; then
fd67be31
SK
882 AM_CONDITIONAL(HAVE_AUDIT, false)
883else
884 UTIL_CHECK_LIB(audit, audit_log_user_message)
49ccbae6 885 case "$with_audit:$have_audit" in
fd67be31
SK
886 yes:no)
887 AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
888 ;;
889 esac
bbae9cb0 890fi
bbae9cb0 891
48d7b13a 892AC_ARG_ENABLE([schedutils],
7fa4f112 893 AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
271d98e0 894 [], enable_schedutils=yes
48d7b13a 895)
49ccbae6 896AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
48d7b13a
KZ
897
898
899AC_ARG_ENABLE([wall],
7fa4f112 900 AS_HELP_STRING([--disable-wall], [do not build wall]),
271d98e0 901 [], enable_wall=yes
48d7b13a 902)
49ccbae6 903AM_CONDITIONAL(BUILD_WALL, test "x$enable_wall" = xyes)
48d7b13a
KZ
904
905
906AC_ARG_ENABLE([write],
7fa4f112 907 AS_HELP_STRING([--enable-write], [build write]),
271d98e0 908 [], enable_write=no
48d7b13a 909)
49ccbae6 910AM_CONDITIONAL(BUILD_WRITE, test "x$enable_write" = xyes)
48d7b13a
KZ
911
912
913AC_ARG_ENABLE([chsh-only-listed],
7fa4f112 914 AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
271d98e0 915 [], enable_chsh_only_listed=yes
48d7b13a
KZ
916)
917
49ccbae6 918if test "x$enable_chsh_only_listed" = xyes; then
48d7b13a
KZ
919 AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
920fi
921
922
923AC_ARG_ENABLE([login-chown-vcs],
7fa4f112 924 AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
271d98e0 925 [], enable_login_chown_vcs=no
48d7b13a
KZ
926)
927
49ccbae6 928if test "x$enable_login_chown_vcs" = xyes; then
48d7b13a
KZ
929 AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
930fi
931
932
933AC_ARG_ENABLE([login-stat-mail],
7fa4f112 934 AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
271d98e0 935 [], enable_login_stat_mail=no
48d7b13a
KZ
936)
937
49ccbae6 938if test "x$enable_login_stat_mail" = xyes; then
48d7b13a
KZ
939 AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
940fi
941
942
943AC_ARG_ENABLE([pg-bell],
7fa4f112 944 AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
271d98e0 945 [], enable_pg_bell=yes
48d7b13a
KZ
946)
947
49ccbae6 948if test "x$enable_pg_bell" = xyes; then
48d7b13a
KZ
949 AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
950fi
951
952
953AC_ARG_ENABLE([require-password],
7fa4f112 954 AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
271d98e0 955 [], enable_require_password=yes
48d7b13a
KZ
956)
957
49ccbae6 958if test "x$enable_require_password" = xyes; then
48d7b13a
KZ
959 AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
960fi
961
962
bb4cb69d
MF
963AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
964AC_ARG_ENABLE([fs-paths-default],
965 AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
966 [case "$enableval" in
967 yes) fs_paths_defaults="FS_PATHS_DEFAULT" ;;
968 no) fs_paths_defaults="" ;;
969 *) fs_paths_defaults="$enableval" ;;
970 esac],
971 [fs_paths_defaults="FS_PATHS_DEFAULT"]
972)
973AC_ARG_ENABLE([fs-paths-extra],
974 AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
975 [case "$enableval" in
976 yes|no) fs_paths_extra="" ;;
977 *) fs_paths_extra="$enableval" ;;
978 esac],
979 [fs_paths_extra=""]
980)
981fs_paths="$fs_paths_defaults"
982if test "x$fs_paths_extra" != "x"; then
983 if test "x$fs_paths" != "x"; then
984 fs_paths="${fs_paths}:"
985 fi
986 fs_paths="${fs_paths}${fs_paths_extra}"
987fi
988AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
989
990
48d7b13a 991AC_ARG_ENABLE([use-tty-group],
7fa4f112 992 AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
271d98e0 993 [], enable_use_tty_group=yes
48d7b13a 994)
49ccbae6 995AM_CONDITIONAL(USE_TTY_GROUP, test "x$enable_use_tty_group" = xyes)
48d7b13a 996
49ccbae6 997if test "x$enable_use_tty_group" = xyes; then
48d7b13a
KZ
998 AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
999fi
1000
f3831bbd
KZ
1001AC_ARG_ENABLE([makeinstall-chown],
1002 AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
1003 [], enable_makeinstall_chown=yes
1004)
49ccbae6 1005AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes)
f3831bbd 1006
4c24a7ae
KZ
1007AC_ARG_ENABLE([makeinstall-setuid],
1008 AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
1009 [], enable_makeinstall_setuid=yes
1010)
1011AM_CONDITIONAL(MAKEINSTALL_DO_SETUID, test "x$enable_makeinstall_setuid" = xyes)
1012
06bcee19 1013
1f10890f
SK
1014AC_ARG_VAR([SUID_CFLAGS],
1015 [CFLAGS used for binaries which are usually with the suid bit])
1016AC_ARG_VAR([SUID_LDFLAGS],
1017 [LDFLAGS used for binaries which are usually with the suid bit])
06bcee19 1018
9cb68977 1019LIBS=""
48d7b13a 1020
48d7b13a
KZ
1021
1022AC_CONFIG_HEADERS(config.h)
1023
8eeb575c 1024AC_CONFIG_FILES([
8eeb575c 1025disk-utils/Makefile
562218e6 1026fdisk/Makefile
607c2a72 1027fsck/Makefile
8eeb575c
KZ
1028getopt/Makefile
1029hwclock/Makefile
562218e6 1030include/Makefile
d00ed891 1031lib/Makefile
8eeb575c 1032login-utils/Makefile
20ad4963
KZ
1033Makefile
1034misc-utils/chkdupexe:misc-utils/chkdupexe.pl
8eeb575c
KZ
1035misc-utils/Makefile
1036mount/Makefile
1037partx/Makefile
1038po/Makefile.in
1039schedutils/Makefile
20ad4963
KZ
1040shlibs/blkid/blkid.pc
1041shlibs/blkid/Makefile
1e018c15
KZ
1042shlibs/blkid/docs/Makefile
1043shlibs/blkid/docs/version.xml
20ad4963 1044shlibs/blkid/src/Makefile
033cf439 1045shlibs/blkid/src/blkid.h
219227c2 1046shlibs/blkid/src/superblocks/Makefile
cc33d693 1047shlibs/blkid/src/topology/Makefile
e4799a35 1048shlibs/blkid/src/partitions/Makefile
e21677fe 1049shlibs/blkid/samples/Makefile
754fed0c
KZ
1050shlibs/uuid/uuid.pc
1051shlibs/uuid/Makefile
1052shlibs/uuid/man/Makefile
1053shlibs/uuid/src/Makefile
20ad4963 1054shlibs/Makefile
8eeb575c 1055sys-utils/Makefile
e83446da 1056tests/commands.sh
20ad4963
KZ
1057tests/helpers/Makefile
1058tests/Makefile
1059text-utils/Makefile
8eeb575c 1060])
48d7b13a 1061
996fb358 1062
48d7b13a 1063AC_OUTPUT