2009-07-15 16:46:31 -05:00
AC_INIT(util-linux-ng, 2.16, kzak@redhat.com)
2006-12-06 17:26:58 -06:00
2007-09-02 06:10:06 -05:00
AC_PREREQ(2.60)
2006-12-06 17:26:54 -06:00
AC_CONFIG_AUX_DIR(config)
2009-02-13 03:54:24 -06:00
AC_CONFIG_MACRO_DIR([m4])
2006-12-06 17:26:54 -06:00
2007-05-15 13:46:34 -05:00
AM_INIT_AUTOMAKE([check-news -Wall foreign 1.9 dist-bzip2])
2006-12-06 17:26:54 -06:00
AC_CONFIG_SRCDIR(mount/mount.c)
2007-05-15 13:46:24 -05:00
AC_PREFIX_DEFAULT([/usr])
2009-09-16 14:25:38 -05:00
GTK_DOC_CHECK(1.10)
AC_PATH_PROG([XSLTPROC], [xsltproc])
2009-04-28 15:51:53 -05:00
dnl version details from <major>.<minor>[-<suffix>]
PACKAGE_VERSION_MAJOR=$(echo $PACKAGE_VERSION | awk -F. '{print $1}')
PACKAGE_VERSION_MINOR=$(echo $PACKAGE_VERSION | awk -F. '{print $2}' \
| awk -F- '{print $1}')
PACKAGE_VERSION_RELEASE=0
2008-08-27 08:09:47 -05:00
2009-04-28 15:51:53 -05:00
dnl libblkid version
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
LIBBLKID_DATE="10-Feb-2009"
2009-07-13 16:44:30 -05:00
LIBBLKID_LT_MAJOR=1
LIBBLKID_LT_MINOR=1
LIBBLKID_LT_MICRO=0
LIBBLKID_VERSION_INFO=`expr $LIBBLKID_LT_MAJOR + $LIBBLKID_LT_MINOR`:$LIBBLKID_LT_MICRO:$LIBBLKID_LT_MINOR
2008-08-27 08:09:47 -05:00
2009-05-15 18:26:35 -05:00
dnl libuuid version
LIBUUID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
2009-07-13 16:44:30 -05:00
LIBUUID_LT_MAJOR=1
LIBUUID_LT_MINOR=3
LIBUUID_LT_MICRO=0
LIBUUID_VERSION_INFO=`expr $LIBUUID_LT_MAJOR + $LIBUUID_LT_MINOR`:$LIBUUID_LT_MICRO:$LIBUUID_LT_MINOR
2009-05-15 18:26:35 -05:00
2007-05-15 13:46:24 -05:00
# Check whether exec_prefix=/usr:
case $exec_prefix:$prefix in
NONE:NONE | NONE:/usr | /usr:*)
AC_MSG_NOTICE([Default --exec-prefix detected.])
case $bindir in
'${exec_prefix}/bin') bindir=/bin
AC_MSG_NOTICE([ --bindir defaults to /bin]) ;;
esac
case $sbindir in
'${exec_prefix}/sbin') sbindir=/sbin
AC_MSG_NOTICE([ --sbindir defaults to /sbin]) ;;
2008-01-15 18:11:02 -06:00
esac
case $libdir in
'${exec_prefix}/lib') libdir=/lib
AC_MSG_NOTICE([ --libdir defaults to /lib]) ;;
2007-05-15 13:46:24 -05:00
esac ;;
esac
2006-12-06 17:26:54 -06:00
2009-07-13 04:54:43 -05:00
libdirname=`basename "$libdir"`
2009-03-17 08:54:22 -05:00
AC_SUBST([libdirname])
2009-06-30 05:41:54 -05:00
# The original default values of {bin,sbin,lib}dir
2009-07-11 17:44:08 -05:00
usrbin_execdir='${exec_prefix}/bin'
2009-07-03 18:18:01 -05:00
AC_SUBST([usrbin_execdir])
2009-06-30 05:41:54 -05:00
2009-07-11 17:44:08 -05:00
usrsbin_execdir='${exec_prefix}/sbin'
2009-07-03 18:18:01 -05:00
AC_SUBST([usrsbin_execdir])
2009-06-30 05:41:54 -05:00
2009-07-11 17:44:08 -05:00
usrlib_execdir='${exec_prefix}/'$libdirname
2009-07-03 18:18:01 -05:00
AC_SUBST([usrlib_execdir])
2009-06-30 05:41:54 -05:00
2006-12-06 17:26:54 -06:00
AC_PROG_CC_STDC
2007-05-16 05:56:28 -05:00
AC_GNU_SOURCE
2008-01-08 05:55:18 -06:00
AC_CANONICAL_HOST
2009-02-04 07:56:54 -06:00
AC_C_BIGENDIAN
2009-02-13 03:54:24 -06:00
dnl libtool-2
LT_INIT
2006-12-06 17:26:54 -06:00
2009-02-17 14:28:09 -06:00
PKG_PROG_PKG_CONFIG
2007-12-17 18:53:10 -06:00
linux_os=no
case ${host_os} in
*linux*)
linux_os=yes
;;
esac
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL([LINUX], test "x$linux_os" = xyes)
2007-12-17 18:53:10 -06:00
2006-12-06 17:26:54 -06:00
AC_PATH_PROG(PERL, perl)
2007-05-17 13:16:25 -05:00
AC_PATH_PROG(BLKID, blkid, [], [$PATH:/sbin])
AC_PATH_PROG(VOLID, vol_id, [], [$PATH:/lib/udev])
2006-12-06 17:26:54 -06:00
AC_SYS_LARGEFILE
2007-11-28 03:40:32 -06:00
AC_CHECK_HEADERS([linux/compiler.h linux/blkpg.h linux/major.h], [], [], [
2006-12-06 17:26:54 -06:00
#ifdef HAVE_LINUX_COMPILER_H
#include <linux/compiler.h>
#endif
])
2007-05-15 13:46:16 -05:00
AC_CHECK_HEADERS(
2008-08-27 08:09:47 -05:00
[err.h \
errno.h \
getopt.h \
2007-05-15 13:46:16 -05:00
langinfo.h \
2008-08-27 08:09:47 -05:00
linux/fd.h \
linux/tiocl.h \
linux/version.h \
2007-09-06 19:30:16 -05:00
locale.h \
2009-05-15 18:01:36 -05:00
stdint.h \
inttypes.h \
2008-08-27 08:09:47 -05:00
pty.h \
2009-02-18 08:06:49 -06:00
mntent.h \
2009-05-15 18:01:36 -05:00
net/if.h \
net/if_dl.h \
netinet/in.h \
2007-05-15 13:46:16 -05:00
rpcsvc/nfs_prot.h \
2008-08-27 08:09:47 -05:00
scsi/scsi.h \
stdlib.h \
sys/disk.h \
sys/disklabel.h \
sys/ioctl.h \
2007-05-15 13:46:16 -05:00
sys/io.h \
2009-05-15 18:01:36 -05:00
sys/time.h \
2008-08-27 08:09:47 -05:00
sys/mkdev.h \
sys/prctl.h \
sys/queue.h \
2009-05-15 18:01:36 -05:00
sys/sockio.h \
sys/file.h \
sys/ioctl.h \
2008-08-27 08:09:47 -05:00
sys/stat.h \
sys/types.h \
2009-05-15 18:01:36 -05:00
sys/un.h \
2008-08-27 08:09:47 -05:00
sys/user.h \
2009-05-15 18:01:36 -05:00
sys/resource.h \
2008-08-27 08:09:47 -05:00
unistd.h ])
2007-05-15 13:46:17 -05:00
AC_CHECK_HEADERS([linux/raw.h],
[AM_CONDITIONAL([HAVE_RAW], [true])],
[AM_CONDITIONAL([HAVE_RAW], [false])])
2006-12-06 17:26:54 -06:00
2009-05-14 21:43:02 -05:00
AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
2007-05-15 13:46:16 -05:00
AC_CHECK_FUNCS(
[inet_aton \
fsync \
getdomainname \
2007-11-26 07:58:29 -06:00
get_current_dir_name \
2009-08-17 14:22:02 -05:00
usleep \
2007-05-15 13:46:16 -05:00
nanosleep \
personality \
updwtmp \
2009-05-21 08:52:24 -05:00
jrand48 \
2007-05-15 13:46:16 -05:00
lchown \
2008-08-27 08:09:47 -05:00
llseek \
lseek64 \
strtoull \
2009-05-15 18:01:36 -05:00
sysconf \
getdtablesize \
getrlimit \
srandom \
2009-05-22 02:08:43 -05:00
setresgid \
setresuid \
2007-12-06 18:56:06 -06:00
inotify_init \
2008-08-27 08:09:47 -05:00
prctl \
__secure_getenv \
2007-05-15 13:46:16 -05:00
rpmatch])
2006-12-06 17:26:54 -06:00
AC_FUNC_FSEEKO
2009-06-09 08:21:39 -05:00
AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no])
2009-05-15 18:01:36 -05:00
AC_CHECK_MEMBER(struct sockaddr.sa_len,
AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
[#include <sys/types.h>
#include <sys/socket.h>])
2007-12-11 11:47:34 -06:00
dnl Static compilation
2009-03-09 06:10:59 -05:00
m4_define([UTIL_STATIC_PROGRAMS], [losetup, mount, umount, fdisk, sfdisk, blkid])
2007-12-11 11:47:34 -06:00
AC_ARG_ENABLE([static-programs],
[AS_HELP_STRING([--enable-static-programs=LIST],
[link static the programs in LIST (comma-separated,
supported for ]m4_defn([UTIL_STATIC_PROGRAMS])[)])])
case $enable_static_programs in
yes) enable_static_programs=m4_quote(UTIL_STATIC_PROGRAMS) ;;
no) enable_static_programs= ;;
esac
dnl Set all the individual AM_CONDITIONALs
m4_foreach([UTIL_PRG], m4_defn([UTIL_STATIC_PROGRAMS]), [
case ,$enable_static_programs, in
*,UTIL_PRG,*) static_[]UTIL_PRG=yes ;;
esac
AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UTIL_PRG),
2008-03-20 07:50:08 -05:00
[test "x$static_[]UTIL_PRG" = xyes])
2007-12-11 11:47:34 -06:00
])
2009-05-19 07:08:54 -05:00
dnl UTIL_PKG_STATIC(VARIABLE, MODULES)
dnl ----------------------------------
AC_DEFUN([UTIL_PKG_STATIC], [
if AC_RUN_LOG([pkg-config --exists --print-errors "$2"]); then
$1=`pkg-config --libs --static "$2"`
else
AC_MSG_ERROR([pkg-config description of $2, needed for static build, is not available])
fi
])
2008-03-04 17:34:49 -06:00
dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
dnl UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
dnl UTIL_CHECK_LIB(yyy, func) generates have_yyy and HAVE_LIBYYY
2007-05-15 13:46:17 -05:00
dnl ---------------------------------
AC_DEFUN([UTIL_CHECK_LIB], [
2008-03-04 17:34:49 -06:00
m4_define([suffix], m4_default([$3],$1))
[have_]suffix=yes
m4_ifdef([$3],
[AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])],
[AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])])
AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes])
2007-05-15 13:46:17 -05:00
])
2007-07-18 03:46:42 -05:00
2009-05-18 02:35:32 -05:00
dnl UTIL_SET_FLAGS(CFLAGS, CPPFLAGS, LDFLAGS)
AC_DEFUN([UTIL_SET_FLAGS], [
old_CFLAGS="$CFLAGS"
old_CPPFLAGS="$CPPFLAGS"
old_LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS $1"
CPPFLAGS="$CPPFLAGS $2"
LDFLAGS="$LDFLAGS $3"
])
dnl UTIL_RESTORE_FLAGS()
AC_DEFUN([UTIL_RESTORE_FLAGS], [
CFLAGS="$old_CFLAGS"
CPPFLAGS="$old_CPPFLAGS"
LDFLAGS="$old_LDFLAGS"
])
2009-05-21 08:52:24 -05:00
AC_ARG_ENABLE([tls],
AS_HELP_STRING([--disable-tls], [disable use of thread local support]),
[], enable_tls=yes
)
if test "x$enable_tls" = xyes; then
AX_TLS
fi
2009-05-19 07:08:54 -05:00
AC_ARG_ENABLE([mount],
AS_HELP_STRING([--disable-mount], [do not build mount utilities]),
[], enable_mount=check
)
build_mount=yes
if test "x$enable_mount" = xcheck; then
if test "x$linux_os" = xno; then
AC_MSG_WARN([non-linux system; do not build mount utilities])
build_mount=no
fi
elif test "x$enable_mount" = xno; then
build_mount=no
fi
AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
AC_ARG_ENABLE([fsck],
2009-05-19 07:17:18 -05:00
AS_HELP_STRING([--disable-fsck], [do not build fsck]),
[], enable_fsck=yes
2009-05-19 07:08:54 -05:00
)
AM_CONDITIONAL(BUILD_FSCK, test "x$enable_fsck" = xyes)
2009-05-18 09:01:27 -05:00
AC_ARG_ENABLE([libuuid],
AS_HELP_STRING([--disable-libuuid], [do not build libuuid and uuid utilities]),
[], enable_libuuid=yes
)
2009-07-13 16:44:30 -05:00
AC_SUBST([LIBUUID_VERSION])
AC_SUBST([LIBUUID_VERSION_INFO])
2009-05-18 09:01:27 -05:00
AM_CONDITIONAL(BUILD_LIBUUID, test "x$enable_libuuid" = xyes)
have_uuid=yes
if test "x$enable_libuuid" = xno; then
# Check for external (e2fsprogs) libuuid
PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
if test "x$have_uuid" = xno; then
# system without pkg-config or so, try classic check
AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
fi
if test "x$have_uuid" = xyes; then
UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
UTIL_RESTORE_FLAGS
fi
else
2009-05-19 07:08:54 -05:00
# internal library
2009-05-18 09:01:27 -05:00
AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
2007-07-18 03:46:42 -05:00
fi
2009-05-18 09:01:27 -05:00
if test "x$have_uuid" = xyes; then
AC_DEFINE(HAVE_LIBUUID, 1, [Define to 1 if you have the -luuid.])
else
AC_MSG_WARN([uuid library is not found; mkswap(8) will not generate UUIDs])
fi
AM_CONDITIONAL(HAVE_UUID, test "x$have_uuid" = xyes)
# default
: ${UUID_LIBS='-luuid'}
2006-12-06 17:26:54 -06:00
2009-02-17 14:28:09 -06:00
2009-05-22 02:58:23 -05:00
AC_ARG_ENABLE([uuidd],
AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
[], enable_uuidd=auto
)
case "$enable_uuidd:$have_uuid" in
yes:no)
AC_MSG_ERROR([cannot enable uuidd when libuuid is disabled]) ;;
auto:*)
enable_uuidd=$have_uuid ;;
esac
if test "x$enable_uuidd" = xyes; then
AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
fi
AM_CONDITIONAL(BUILD_UUIDD, test "x$enable_uuidd" = xyes)
2009-05-19 07:08:54 -05:00
AC_ARG_ENABLE([libblkid],
AS_HELP_STRING([--disable-libblkid], [do not build libblkid and blkid utilities]),
[], enable_libblkid=yes
2007-05-09 10:35:27 -05:00
)
2009-07-13 16:44:30 -05:00
AC_SUBST([LIBBLKID_VERSION])
AC_SUBST([LIBBLKID_VERSION_INFO])
2009-05-19 07:08:54 -05:00
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$enable_libblkid" = xyes)
AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
have_blkid=yes
if test "x$enable_libblkid" = xno; then
if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
# Check for external (e2fsprogs) libblkid
PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
if test "x$have_blkid" = xno; then
# system without pkg-config or so, try classic check
AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
fi
if test "x$have_blkid" = xyes; then
UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
UTIL_RESTORE_FLAGS
fi
if test -n "$enable_static_programs"; then
# TODO check only when mount of fsck are requested
UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
fi
2009-05-11 08:06:06 -05:00
fi
2009-05-19 07:08:54 -05:00
else
# internal library
AC_DEFINE(HAVE_BLKID_H, 1, [Define to 1 if you have the <blkid.h> header file.])
AC_DEFINE(HAVE_BLKID_EVALUATE_TAG, 1, [Define to 1 if you have the blkid_evaluate_tag().])
2009-09-25 09:27:27 -05:00
AC_DEFINE(HAVE_BLKID_PROBE_ENABLE_PARTITIONS, 1, [Define to 1 if you have the blkid_probe_enable_partitions().])
2009-02-10 04:43:50 -06:00
fi
2009-05-19 07:08:54 -05:00
if test "x$have_blkid" = xyes; then
2009-02-17 14:28:09 -06:00
AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
2008-11-14 10:40:25 -06:00
else
2009-05-19 07:08:54 -05:00
if test "x$build_mount" = xyes; then
AC_MSG_ERROR([libblkid is needed to build util-linux-ng mount])
2009-02-18 08:06:49 -06:00
fi
2009-05-19 07:08:54 -05:00
if test "x$enable_fsck" = xyes; then
AC_MSG_ERROR([libblkid is needed to build util-linux-ng fsck])
2007-12-11 11:47:37 -06:00
fi
fi
2009-05-19 07:08:54 -05:00
AM_CONDITIONAL(HAVE_BLKID, test "x$have_blkid" = xyes)
# default
: ${BLKID_LIBS='-lblkid -luuid'}
2007-12-11 11:47:34 -06:00
AC_ARG_VAR([BLKID_LIBS_STATIC], [-l options for linking statically with blkid])
2009-05-19 07:08:54 -05:00
2007-12-11 11:47:34 -06:00
2009-05-18 09:01:27 -05:00
UTIL_CHECK_LIB(util, openpty)
UTIL_CHECK_LIB(termcap, tgetnum)
2007-12-11 11:47:34 -06:00
2007-01-03 15:20:44 -06:00
AM_GNU_GETTEXT_VERSION([0.14.1])
2006-12-06 17:26:54 -06:00
AM_GNU_GETTEXT([external])
2008-03-20 07:50:08 -05:00
if test -d "$srcdir/po"
2007-01-03 15:20:44 -06:00
then
2007-05-15 13:46:33 -05:00
ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
2007-01-03 15:20:44 -06:00
else
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"
fi
2006-12-06 17:26:54 -06:00
2008-03-04 17:53:24 -06:00
AC_ARG_WITH([ncurses],
AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
(--without-ncurses disables all ncurses(w) support)]),
[], with_ncurses=auto
)
AM_CONDITIONAL(HAVE_NCURSES, false)
if test "x$with_ncurses" != xno; then
have_ncurses=no
AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [
if test "x$with_ncurses" = xauto; then
2008-08-08 01:21:23 -05:00
UTIL_CHECK_LIB(ncursesw, initscr, ncurses)
2008-03-04 17:53:24 -06:00
if test "x$have_ncurses" = xyes; then
NCURSES_LIBS="-lncursesw"
fi
fi
2008-03-20 07:50:08 -05:00
if test "x$have_ncurses" = xno; then
2008-08-08 01:21:23 -05:00
UTIL_CHECK_LIB(ncurses, initscr)
2008-03-20 07:50:08 -05:00
if test "x$have_ncurses" = xyes; then
2008-03-04 17:53:24 -06:00
NCURSES_LIBS="-lncurses"
fi
fi
])
2008-03-20 07:50:08 -05:00
if test "x$have_ncurses" = xno; then
2008-03-04 17:53:24 -06:00
AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
fi
fi
AC_SUBST([NCURSES_LIBS])
2006-12-06 17:26:54 -06:00
AC_ARG_WITH([slang],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
2007-05-15 13:46:14 -05:00
[], with_slang=no
2006-12-06 17:26:54 -06:00
)
2007-06-19 13:58:04 -05:00
have_tinfo=no
AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
2007-06-19 13:58:04 -05:00
2007-05-15 13:46:17 -05:00
use_slang=no
2008-03-20 07:50:08 -05:00
if test "x$with_slang" = xyes; then
2007-05-15 13:46:17 -05:00
AC_CHECK_HEADERS([slcurses.h slang/slcurses.h], [use_slang=yes])
2008-03-20 07:50:08 -05:00
if test "x$use_slang" = xno; then
2006-12-06 17:26:54 -06:00
AC_MSG_ERROR([slang selected but slcurses.h not found])
fi
fi
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(USE_SLANG, test "x$use_slang" = xyes)
2006-12-06 17:26:54 -06:00
2007-05-15 13:46:19 -05:00
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#define _XOPEN_SOURCE
#include <unistd.h>
2007-05-15 13:46:19 -05:00
]], [[
2006-12-06 17:26:54 -06:00
char *c = crypt("abc","pw");
2007-05-15 13:46:19 -05:00
]])],[],[
2006-12-06 17:26:54 -06:00
LIBS="$LIBS -lcrypt"
2007-05-15 13:46:19 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#define _XOPEN_SOURCE
#include <unistd.h>
2007-05-15 13:46:19 -05:00
]], [[
2006-12-06 17:26:54 -06:00
char *c = crypt("abc","pw");
2007-05-15 13:46:19 -05:00
]])],[
2006-12-06 17:26:54 -06:00
AC_DEFINE(NEED_LIBCRYPT, 1, [Do we need -lcrypt?])
need_libcrypt=yes
],[
AC_MSG_ERROR([crypt() is not available])
])
])
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(NEED_LIBCRYPT, test "x$need_libcrypt" = xyes)
2006-12-06 17:26:54 -06:00
2007-05-15 13:46:19 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#include <stdio.h>
2007-05-15 13:46:19 -05:00
]], [[
2006-12-06 17:26:54 -06:00
printf(__progname);
2007-05-15 13:46:19 -05:00
]])],
[AC_DEFINE(HAVE___PROGNAME, 1, Do we have __progname?)
])
2006-12-06 17:26:54 -06:00
2007-05-15 13:46:19 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#include <wchar.h>
#include <wctype.h>
#include <stdio.h>
2007-05-15 13:46:19 -05:00
]], [[
2006-12-06 17:26:54 -06:00
wchar_t wc;
wint_t w;
w = fgetwc(stdin);
if (w == WEOF) exit(1);
wc = w;
fputwc(wc,stdout);
2007-05-15 13:46:19 -05:00
]])],
[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
])
2006-12-06 17:26:54 -06:00
2007-09-07 09:55:36 -05:00
dnl UTIL_CHECK_SYSCALL(SYSCALL, FALLBACK, ...)
dnl Only specify FALLBACK if the SYSCALL
dnl you're checking for is a "newish" one
dnl -------------------------------------
AC_DEFUN([UTIL_CHECK_SYSCALL], [
dnl This macro uses host_cpu.
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([for syscall $1],
[util_cv_syscall_$1],
[_UTIL_SYSCALL_CHECK_DECL([SYS_$1],
[syscall=SYS_$1],
[dnl Our libc failed use, so see if we can get the kernel
dnl headers to play ball ...
_UTIL_SYSCALL_CHECK_DECL([_NR_$1],
[syscall=_NR_$1],
[
syscall=no
2008-03-20 07:50:08 -05:00
if test "x$linux_os" = xyes; then
2007-12-17 18:53:10 -06:00
case $host_cpu in
_UTIL_CHECK_SYSCALL_FALLBACK(m4_shift($@))
esac
fi
2007-09-07 09:55:36 -05:00
])
])
util_cv_syscall_$1=$syscall
])
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL([HAVE_]m4_toupper($1), [test "x$util_cv_syscall_$1" != xno])
2007-09-07 09:55:36 -05:00
case $util_cv_syscall_$1 in #(
no) AC_MSG_WARN([Unable to detect syscall $1.]) ;;
SYS_*) ;;
*) AC_DEFINE_UNQUOTED([SYS_$1], [$util_cv_syscall_$1],
[Fallback syscall number for $1]) ;;
esac
])
dnl _UTIL_SYSCALL_CHECK_DECL(SYMBOL, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
dnl Check if SYMBOL is declared, using the headers needed for syscall checks.
dnl -------------------------------------
m4_define([_UTIL_SYSCALL_CHECK_DECL],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#include <sys/syscall.h>
#include <unistd.h>
2007-09-07 09:55:36 -05:00
]], [[int test = $1;]])],
[$2], [$3])
])
2006-12-06 17:26:54 -06:00
2007-09-07 09:55:36 -05:00
dnl _UTIL_CHECK_SYSCALL_FALLBACK(PATTERN, VALUE, ...)
dnl Helper macro to create the body for the above `case'.
dnl -------------------------------------
m4_define([_UTIL_CHECK_SYSCALL_FALLBACK],
[m4_ifval([$1],
[#(
$1) syscall="$2" ;;dnl
_UTIL_CHECK_SYSCALL_FALLBACK(m4_shiftn(2, $@))])dnl
])
2006-12-06 17:26:54 -06:00
2007-09-07 09:55:36 -05:00
UTIL_CHECK_SYSCALL([pivot_root])
UTIL_CHECK_SYSCALL([sched_getaffinity])
UTIL_CHECK_SYSCALL([ioprio_set],
[alpha], [442],
[i*86], [289],
[ia64*], [1274],
[powerpc*], [273],
[s390*], [282],
[sparc*], [196],
2008-05-19 03:21:50 -05:00
[sh*], [288],
2007-09-07 09:55:36 -05:00
[x86_64*], [251])
UTIL_CHECK_SYSCALL([ioprio_get],
[alpha], [443],
[i*86], [290],
[ia64*], [1275],
[powerpc*], [274],
[s390*], [283],
[sparc*], [218],
2008-05-19 03:21:50 -05:00
[sh*], [289],
2007-09-07 09:55:36 -05:00
[x86_64*], [252])
2007-08-26 06:22:56 -05:00
2009-08-18 06:33:27 -05:00
dnl fallocate could be available as libc function or as syscall only
UTIL_CHECK_SYSCALL([fallocate])
AC_CHECK_FUNCS([fallocate])
2007-08-26 06:22:56 -05:00
2007-05-15 13:46:19 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2006-12-06 17:26:54 -06:00
#include <time.h>
#include <unistd.h>
2007-05-15 13:46:19 -05:00
]], [[
2006-12-06 17:26:54 -06:00
int a = 0;
struct tm *tm = localtime(0);
if (a == -1) /* false */
sleep(tm->tm_gmtoff);
2007-05-15 13:46:19 -05:00
]])],
[AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
])
2006-12-06 17:26:54 -06:00
2009-02-05 16:37:37 -06:00
AC_CHECK_MEMBERS([struct termios.c_line],,,
[[#include <termios.h>]])
2008-05-13 07:00:39 -05:00
AC_CHECK_DECLS([
ADDR_NO_RANDOMIZE,
FDPIC_FUNCPTRS,
MMAP_PAGE_ZERO,
ADDR_COMPAT_LAYOUT,
READ_IMPLIES_EXEC,
ADDR_LIMIT_32BIT,
WHOLE_SECONDS,
STICKY_TIMEOUTS,
ADDR_LIMIT_3GB], [], [], [#include <linux/personality.h>])
2006-12-06 17:26:54 -06:00
2007-07-18 16:33:55 -05:00
AC_CHECK_HEADERS([sys/swap.h])
2007-05-15 13:46:20 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[
#ifdef HAVE_SYS_SWAP_H
# include <sys/swap.h>
#endif
#include <unistd.h>
]],
[[swapon("/dev/null", 0);]])],
[AC_DEFINE(SWAPON_HAS_TWO_ARGS, 1, [Is swapon() declared with two parameters?])
],
[AC_MSG_NOTICE([Your libc thinks that swapon has 1 arg only.])
])
2007-07-02 06:21:06 -05:00
dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
dnl ---------------------------------
AC_DEFUN([UTIL_SET_ARCH], [
cpu_$1=false
case "$host" in
$2) cpu_$1=true ;;
esac
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test "x$cpu_$1" = xtrue])
2007-07-02 06:21:06 -05:00
])
2006-12-06 17:26:54 -06:00
2007-07-02 06:21:06 -05:00
UTIL_SET_ARCH(I86, i?86-*)
UTIL_SET_ARCH(86_64, x86_64*)
UTIL_SET_ARCH(IA64, ia64*)
UTIL_SET_ARCH(S390, s390*)
UTIL_SET_ARCH(SPARC, sparc*)
UTIL_SET_ARCH(PPC, ppc*|powerpc*)
UTIL_SET_ARCH(M68K, m68*)
UTIL_SET_ARCH(MIPS, mips*)
2007-08-27 16:16:28 -05:00
UTIL_SET_ARCH(HPPA, hppa*)
2006-12-06 17:26:54 -06:00
2007-07-11 05:37:40 -05:00
AC_ARG_ENABLE([arch],
AS_HELP_STRING([--enable-arch], [do build arch]),
[], enable_arch=no
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_ARCH, test "x$enable_arch" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([agetty],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-agetty], [do not build agetty]),
2007-05-15 13:46:14 -05:00
[], enable_agetty=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_AGETTY, test "x$enable_agetty" = xyes)
2006-12-06 17:26:54 -06:00
2006-12-06 17:27:03 -06:00
AC_ARG_ENABLE([cramfs],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-cramfs], [do not build fsck.cramfs, mkfs.cramfs]),
2007-05-15 13:46:14 -05:00
[], enable_cramfs=check
2006-12-06 17:27:03 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_cramfs" = xno; then
2007-05-15 13:46:17 -05:00
build_cramfs=no
else
build_cramfs=yes
dnl Trick: leave the third parameter empty to get the default action.
AC_CHECK_LIB(z, crc32, [], build_cramfs=no)
case $enable_cramfs:$build_cramfs in
yes:no) AC_MSG_ERROR([cramfs selected but libz not found]);;
esac
2006-12-06 17:27:03 -06:00
fi
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_CRAMFS, test "x$build_cramfs" = xyes)
2006-12-06 17:27:03 -06:00
2009-06-09 03:15:28 -05:00
AC_ARG_ENABLE([switch_root],
AS_HELP_STRING([--disable-switch_root], [do not build switch_root]),
2009-06-09 08:21:39 -05:00
[], enable_switch_root=check
2009-06-09 03:15:28 -05:00
)
2009-06-09 08:21:39 -05:00
if test "x$enable_switch_root" = xno; then
build_switch_root=no
else
build_switch_root=yes
case $enable_switch_root:$linux_os in
yes:no) AC_MSG_ERROR([switch_root selected for non-linux system]);;
check:no) AC_MSG_WARN([non-linux system; do not build switch_root])
build_switch_root=no;;
esac
if test "x$build_switch_root" = xyes; then
case $enable_switch_root:$have_openat in
yes:no) AC_MSG_ERROR([switch_root selected but openat() function not found]);;
check:no) AC_MSG_WARN([openat() function not found; do not build switch_root])
build_switch_root=no;;
esac
fi
fi
AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
2009-06-09 03:15:28 -05:00
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([elvtune],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-elvtune], [build elvtune (only works with 2.2 and 2.4 kernels)]),
2007-05-15 13:46:14 -05:00
[], enable_elvtune=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_ELVTUNE, test "x$enable_elvtune" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([init],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-init], [build simpleinit, shutdown, initctl]),
2007-05-15 13:46:14 -05:00
[], enable_init=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_INIT, test "x$enable_init" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([kill],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-kill], [build kill]),
2007-05-15 13:46:14 -05:00
[], enable_kill=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([last],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-last], [build last]),
2007-05-15 13:46:14 -05:00
[], enable_last=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_LAST, test "x$enable_last" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([mesg],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-mesg], [build mesg]),
2007-05-15 13:46:14 -05:00
[], enable_mesg=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_MESG, test "x$enable_mesg" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([partx],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-partx], [build addpart, delpart, partx]),
2007-05-15 13:46:14 -05:00
[], enable_partx=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_PARTX, test "x$enable_partx" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([raw],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-raw], [build raw]),
2007-05-15 13:46:14 -05:00
[], enable_raw=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_RAW, test "x$enable_raw" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([rdev],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-rdev], [build rdev on i386]),
2007-05-15 13:46:14 -05:00
[], enable_rdev=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_RDEV, test "x$enable_rdev" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([rename],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-rename], [do not build rename]),
2007-05-15 13:46:14 -05:00
[], enable_rename=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_RENAME, test "x$enable_rename" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([reset],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-reset], [build reset]),
2007-05-15 13:46:14 -05:00
[], enable_reset=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_RESET, test "x$enable_reset" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([login-utils],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-login-utils], [build chfn, chsh, login, newgrp, vipw]),
2007-05-15 13:46:14 -05:00
[], enable_login_utils=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_LOGIN_UTILS, test "x$enable_login_utils" = xyes)
2006-12-06 17:26:54 -06:00
2006-12-06 17:27:03 -06:00
AC_ARG_WITH([pam],
2007-05-15 13:46:18 -05:00
[AS_HELP_STRING([--without-pam], [compile login-utils without PAM support])])
2006-12-06 17:27:03 -06:00
2007-05-15 13:46:17 -05:00
AM_CONDITIONAL(HAVE_PAM, false)
2008-03-20 07:50:08 -05:00
if test "x$enable_login_utils" = xyes && test "x$with_pam" != xno; then
2007-05-15 13:46:17 -05:00
AC_CHECK_HEADERS([security/pam_misc.h],
[AM_CONDITIONAL(HAVE_PAM, true)],
2008-03-20 07:50:08 -05:00
[if test "x$with_pam" = xyes; then
2007-05-15 13:46:17 -05:00
AC_MSG_ERROR([PAM selected but security/pam_misc.h not found])
fi
])
2006-12-06 17:27:03 -06:00
fi
AC_ARG_WITH([selinux],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
2007-05-15 13:46:14 -05:00
[], with_selinux=no
2006-12-06 17:27:03 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$with_selinux" = xno; then
2007-05-15 13:46:17 -05:00
AM_CONDITIONAL(HAVE_SELINUX, false)
else
UTIL_CHECK_LIB(selinux, getprevcon)
2008-03-20 07:50:08 -05:00
case "$with_selinux:$have_selinux" in
2007-05-15 13:46:17 -05:00
yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found]);;
esac
2006-12-06 17:27:03 -06:00
fi
2008-03-20 07:50:08 -05:00
if test "x$have_selinux" = xyes; then
2007-12-11 11:47:34 -06:00
SELINUX_LIBS="-lselinux -lsepol"
SELINUX_LIBS_STATIC="-lselinux -lsepol"
2009-05-21 06:20:10 -05:00
old_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $SELINUX_LIBS"
# This function is missing in old libselinux 1.xx versions
AC_CHECK_FUNCS([security_get_initial_context])
LDFLAGS="$old_LDFLAGS"
2007-12-11 11:47:34 -06:00
fi
AC_SUBST([SELINUX_LIBS])
AC_SUBST([SELINUX_LIBS_STATIC])
2006-12-06 17:27:03 -06:00
2007-03-12 06:20:54 -05:00
AC_ARG_WITH([audit],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--with-audit], [compile with audit support]),
2007-05-15 13:46:14 -05:00
[], with_audit=no
2007-03-12 06:20:54 -05:00
)
2008-03-20 07:50:08 -05:00
if test "x$with_audit" = xno; then
2007-05-15 13:46:17 -05:00
AM_CONDITIONAL(HAVE_AUDIT, false)
else
UTIL_CHECK_LIB(audit, audit_log_user_message)
2008-03-20 07:50:08 -05:00
case "$with_audit:$have_audit" in
2007-05-15 13:46:17 -05:00
yes:no)
AC_MSG_ERROR([Audit selected but libaudit not found (or doesn't support audit_log_user_message())])
;;
esac
2007-03-12 06:20:54 -05:00
fi
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([schedutils],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-schedutils], [do not build chrt, ionice, teskset]),
2007-05-15 13:46:14 -05:00
[], enable_schedutils=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$enable_schedutils" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([wall],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-wall], [do not build wall]),
2007-05-15 13:46:14 -05:00
[], enable_wall=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_WALL, test "x$enable_wall" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([write],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-write], [build write]),
2007-05-15 13:46:14 -05:00
[], enable_write=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(BUILD_WRITE, test "x$enable_write" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([chsh-only-listed],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
2007-05-15 13:46:14 -05:00
[], enable_chsh_only_listed=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_chsh_only_listed" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
fi
AC_ARG_ENABLE([login-chown-vcs],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
2007-05-15 13:46:14 -05:00
[], enable_login_chown_vcs=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_login_chown_vcs" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
fi
AC_ARG_ENABLE([login-stat-mail],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
2007-05-15 13:46:14 -05:00
[], enable_login_stat_mail=no
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_login_stat_mail" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
fi
AC_ARG_ENABLE([pg-bell],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-pg-bell], [let pg not ring the bell on invalid keys]),
2007-05-15 13:46:14 -05:00
[], enable_pg_bell=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_pg_bell" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(PG_BELL, 1, [Should pg ring the bell on invalid keys?])
fi
AC_ARG_ENABLE([require-password],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-require-password], [do not require the user to enter the password in chfn and chsh]),
2007-05-15 13:46:14 -05:00
[], enable_require_password=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
if test "x$enable_require_password" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(REQUIRE_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
fi
AC_ARG_ENABLE([use-tty-group],
2007-05-15 13:46:18 -05:00
AS_HELP_STRING([--disable-use-tty-group], [do not install wall and write setgid tty]),
2007-05-15 13:46:14 -05:00
[], enable_use_tty_group=yes
2006-12-06 17:26:54 -06:00
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(USE_TTY_GROUP, test "x$enable_use_tty_group" = xyes)
2006-12-06 17:26:54 -06:00
2008-03-20 07:50:08 -05:00
if test "x$enable_use_tty_group" = xyes; then
2006-12-06 17:26:54 -06:00
AC_DEFINE(USE_TTY_GROUP, 1, [Should wall and write be installed setgid tty?])
fi
2007-08-14 07:32:45 -05:00
AC_ARG_ENABLE([makeinstall-chown],
AS_HELP_STRING([--disable-makeinstall-chown], [do not do chown-like operations during "make install"]),
[], enable_makeinstall_chown=yes
)
2008-03-20 07:50:08 -05:00
AM_CONDITIONAL(MAKEINSTALL_DO_CHOWN, test "x$enable_makeinstall_chown" = xyes)
2007-08-14 07:32:45 -05:00
2009-09-30 09:51:20 -05:00
AC_ARG_ENABLE([makeinstall-setuid],
AS_HELP_STRING([--disable-makeinstall-setuid], [do not do setuid chmod operations during "make install"]),
[], enable_makeinstall_setuid=yes
)
AM_CONDITIONAL(MAKEINSTALL_DO_SETUID, test "x$enable_makeinstall_setuid" = xyes)
2007-04-24 04:44:19 -05:00
2007-05-15 13:46:05 -05:00
AC_ARG_VAR([SUID_CFLAGS],
[CFLAGS used for binaries which are usually with the suid bit])
AC_ARG_VAR([SUID_LDFLAGS],
[LDFLAGS used for binaries which are usually with the suid bit])
2007-04-24 04:44:19 -05:00
2006-12-06 17:27:03 -06:00
LIBS=""
2006-12-06 17:26:54 -06:00
AC_CONFIG_HEADERS(config.h)
2007-01-03 15:20:44 -06:00
AC_CONFIG_FILES([
disk-utils/Makefile
2007-01-04 04:57:07 -06:00
fdisk/Makefile
2009-02-18 08:06:49 -06:00
fsck/Makefile
2007-01-03 15:20:44 -06:00
getopt/Makefile
hwclock/Makefile
2007-01-04 04:57:07 -06:00
include/Makefile
2007-11-28 05:27:00 -06:00
lib/Makefile
2007-01-03 15:20:44 -06:00
login-utils/Makefile
2009-05-14 10:40:52 -05:00
Makefile
misc-utils/chkdupexe:misc-utils/chkdupexe.pl
2007-01-03 15:20:44 -06:00
misc-utils/Makefile
mount/Makefile
partx/Makefile
po/Makefile.in
schedutils/Makefile
2009-05-14 10:40:52 -05:00
shlibs/blkid/blkid.pc
shlibs/blkid/Makefile
2009-09-16 14:25:38 -05:00
shlibs/blkid/docs/Makefile
shlibs/blkid/docs/version.xml
2009-05-14 10:40:52 -05:00
shlibs/blkid/src/Makefile
2009-07-22 16:21:27 -05:00
shlibs/blkid/src/superblocks/Makefile
2009-09-16 07:40:41 -05:00
shlibs/blkid/src/topology/Makefile
2009-09-16 08:39:14 -05:00
shlibs/blkid/src/partitions/Makefile
2009-07-30 03:44:08 -05:00
shlibs/blkid/samples/Makefile
2009-05-15 18:01:36 -05:00
shlibs/uuid/uuid.pc
shlibs/uuid/Makefile
shlibs/uuid/man/Makefile
shlibs/uuid/src/Makefile
2009-05-14 10:40:52 -05:00
shlibs/Makefile
2007-01-03 15:20:44 -06:00
sys-utils/Makefile
2007-01-04 07:23:48 -06:00
tests/commands.sh
2009-05-14 10:40:52 -05:00
tests/helpers/Makefile
tests/Makefile
text-utils/Makefile
2007-01-03 15:20:44 -06:00
])
2006-12-06 17:26:54 -06:00
2009-06-30 05:41:54 -05:00
2006-12-06 17:26:54 -06:00
AC_OUTPUT