1
AC_INIT(util-linux, 2.19.1, kzak@redhat.com)
2
m4_esyscmd([tools/git-version-gen .tarball-version]),
5
7
AC_CONFIG_AUX_DIR(config)
6
8
AC_CONFIG_MACRO_DIR([m4])
8
AM_INIT_AUTOMAKE([check-news -Wall foreign 1.10 dist-bzip2])
10
AM_INIT_AUTOMAKE([-Wall foreign 1.10 dist-bzip2 -Wno-portability])
10
12
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11
13
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
89
m4_ifndef([PKG_PROG_PKG_CONFIG],
90
[m4_fatal([Could not locate the pkg-config autoconf
91
macros. These are usually located in /usr/share/aclocal/pkg.m4.
92
If your macros are in a different location, try setting the
93
environment variable AL_OPTS="-I/other/macro/dir" before running
94
./autogen.sh or autoreconf again.])])
87
95
PKG_PROG_PKG_CONFIG
89
97
GTK_DOC_CHECK([1.10])
206
218
__secure_getenv \
210
224
AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
226
AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
227
AM_CONDITIONAL([BUILD_HWCLOCK], test "x$have_io" = xyes -o "x$linux_os" = xyes)
212
229
AC_CHECK_MEMBER(struct sockaddr.sa_len,
213
230
AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
214
231
[#include <sys/types.h>
353
370
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
373
AC_ARG_ENABLE([partx],
374
AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
375
[], enable_partx=check
378
if test "x$enable_partx" = xcheck; then
379
if test "x$linux_os" = xno; then
380
AC_MSG_WARN([non-linux system; do not build partx utilities])
383
elif test "x$enable_partx" = xno; then
386
AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
356
389
AC_ARG_ENABLE([libuuid],
357
390
AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
358
391
[], enable_libuuid=yes
360
393
AC_SUBST([LIBUUID_VERSION])
361
394
AC_SUBST([LIBUUID_VERSION_INFO])
362
395
AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
365
if test "x$enable_libuuid" = xno; then
366
# Check for external (e2fsprogs) libuuid
367
PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
368
if test "x$have_uuid" = xno; then
369
# system without pkg-config or so, try classic check
370
AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
372
if test "x$have_uuid" = xyes; then
373
UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
374
AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
379
AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
382
if test "x$have_uuid" = xyes; then
397
if test "x$enable_libuuid" = xyes; then
383
398
AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
385
400
AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
387
AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
389
: ${UUID_LIBS='-luuid'}
392
404
AC_ARG_ENABLE([uuidd],
394
406
[], enable_uuidd=auto
397
case "$enable_uuidd:$have_uuid" in
409
case "$enable_uuidd:$enable_libuuid" in
399
411
AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
401
enable_uuidd=$have_uuid ;;
413
enable_uuidd=$enable_libuuid ;;
403
415
if test "x$enable_uuidd" = xyes; then
404
416
AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
416
428
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
417
429
AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
418
430
AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
421
if test "x$enable_libblkid" = xno; then
422
if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
423
# Check for external (e2fsprogs) libblkid
424
PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
425
if test "x$have_blkid" = xno; then
426
# system without pkg-config or so, try classic check
427
AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
429
if test "x$have_blkid" = xyes; then
430
UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
431
AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
434
if test -n "$enable_static_programs"; then
435
# TODO check only when mount of fsck are requested
436
UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
441
AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
442
AC_DEFINE(HAVE_LIBBLKID_INTERNAL, 1, [Define to 1 if you have the in-tree libblkid.])
445
if test "x$have_blkid" = xyes; then
432
if test "x$enable_libblkid" = xyes; then
446
433
AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
448
435
if test "x$build_mount" = xyes; then
451
438
if test "x$enable_fsck" = xyes; then
452
439
AC_MSG_ERROR([libblkid is needed to build util-linux fsck])
441
if test "x$build_partx" = xyes; then
442
AC_MSG_ERROR([libblkid is needed to build util-linux partx])
455
AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
457
: ${BLKID_LIBS='-lblkid -luuid'}
459
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
462
447
AC_ARG_ENABLE([libmount],
473
458
build_libmount=no
461
AC_DEFUN([UTIL_SCANF_TYPE_MODIFIER], [dnl
467
i = sscanf("x", $1, &s);
472
AC_MSG_CHECKING([needed scanf type modifiers])
473
AC_CACHE_VAL([scanf_cv_type_modifier],
474
AC_RUN_IFELSE([AC_LANG_SOURCE([UTIL_SCANF_TYPE_MODIFIER(["%ms"])])],
475
[scanf_cv_type_modifier=ms],
476
AC_RUN_IFELSE([AC_LANG_SOURCE([UTIL_SCANF_TYPE_MODIFIER(["%as"])])],
477
[scanf_cv_type_modifier=as],
478
[scanf_cv_type_modifier=no]
483
case "$scanf_cv_type_modifier" in
485
AC_MSG_RESULT([(%ms) yes])
486
AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier]) ;;
488
AC_MSG_RESULT([(%as) yes])
489
AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier]) ;;
492
if "x$build_libmount" = xyes; then
493
AC_MSG_WARN([%as or %ms for sscanf() not found; do not build libmount])
476
499
case "$enable_libblkid:$build_libmount" in
478
501
AC_MSG_ERROR([cannot enable libmount when libblkid is disabled]) ;;
498
521
AM_CONDITIONAL(BUILD_LIBMOUNT_MOUNT, test "x$enable_libmount_mount" = xyes)
524
AC_ARG_ENABLE([mountpoint],
525
AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
526
[], enable_mountpoint=check
530
if test "x$enable_mountpoint" = xcheck; then
531
if test "x$build_libmount" = xno; then
532
AC_MSG_WARN([libmount disabled; do not build mountpoint])
535
elif test "x$enable_mountpoint" = xno; then
539
case "$build_libmount:$build_mountpoint" in
541
AC_MSG_ERROR([cannot enable mountpoint when libmount is disabled]) ;;
543
AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes)
501
546
UTIL_CHECK_LIB(util, openpty)
502
547
UTIL_CHECK_LIB(termcap, tgetnum)
617
662
AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
619
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
624
[AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
628
664
AC_CHECK_TYPES([union semun], [], [], [[
629
665
#include <sys/sem.h>
849
886
AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
888
AC_ARG_ENABLE([ddate],
889
AS_HELP_STRING([--enable-ddate], [do build ddate]),
892
AM_CONDITIONAL(BUILD_DDATE, test "x$enable_ddate" = xyes)
851
894
AC_ARG_ENABLE([agetty],
852
895
AS_HELP_STRING([--disable-agetty], [do not build agetty]),
853
896
[], enable_agetty=yes
985
1028
AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
988
AC_ARG_ENABLE([init],
989
AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
992
AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
995
1030
AC_ARG_ENABLE([kill],
996
1031
AS_HELP_STRING([--enable-kill], [build kill]),
997
1032
[], enable_kill=no
1006
1041
AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
1043
AC_ARG_ENABLE([line],
1044
AS_HELP_STRING([--enable-line], [build line]),
1047
AM_CONDITIONAL(BUILD_LINE, test "x$enable_line" = xyes)
1009
1049
AC_ARG_ENABLE([mesg],
1010
1050
AS_HELP_STRING([--enable-mesg], [build mesg]),
1013
1053
AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
1016
AC_ARG_ENABLE([partx],
1017
AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
1020
AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
1023
1056
AC_ARG_ENABLE([raw],
1024
1057
AS_HELP_STRING([--enable-raw], [build raw]),
1025
1058
[], enable_raw=no
1254
1286
schedutils/Makefile
1255
shlibs/blkid/blkid.pc
1256
shlibs/blkid/Makefile
1257
shlibs/blkid/docs/Makefile
1258
shlibs/blkid/docs/version.xml
1259
shlibs/blkid/src/Makefile
1260
shlibs/blkid/src/blkid.h
1261
shlibs/blkid/src/superblocks/Makefile
1262
shlibs/blkid/src/topology/Makefile
1263
shlibs/blkid/src/partitions/Makefile
1264
shlibs/blkid/samples/Makefile
1265
shlibs/mount/mount.pc
1266
shlibs/mount/Makefile
1267
shlibs/mount/src/Makefile
1268
shlibs/mount/src/libmount.h
1269
shlibs/mount/docs/Makefile
1270
shlibs/mount/docs/version.xml
1271
shlibs/mount/samples/Makefile
1273
shlibs/uuid/Makefile
1274
shlibs/uuid/man/Makefile
1275
shlibs/uuid/src/Makefile
1289
libblkid/docs/Makefile
1290
libblkid/docs/version.xml
1291
libblkid/src/Makefile
1292
libblkid/src/blkid.h
1293
libblkid/src/superblocks/Makefile
1294
libblkid/src/topology/Makefile
1295
libblkid/src/partitions/Makefile
1296
libblkid/samples/Makefile
1299
libmount/src/Makefile
1300
libmount/src/libmount.h
1301
libmount/docs/Makefile
1302
libmount/docs/version.xml
1303
libmount/samples/Makefile
1306
libuuid/man/Makefile
1307
libuuid/src/Makefile
1276
1308
sys-utils/Makefile
1277
1310
tests/commands.sh
1278
1311
tests/helpers/Makefile