2011-03-31 15:10:07 -05:00
AC_INIT(util-linux,
m4_esyscmd([tools/git-version-gen .tarball-version]),
2013-02-10 15:33:41 -06:00
[kzak@redhat.com],,
[http://www.kernel.org/pub/linux/utils/util-linux/])
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])
2013-02-10 15:33:40 -06:00
dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
AC_USE_SYSTEM_EXTENSIONS
2012-05-16 08:02:27 -05:00
AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
2006-12-06 17:26:54 -06:00
2009-10-08 06:40:09 -05:00
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2012-02-08 02:51:34 -06:00
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2009-10-08 06:40:09 -05:00
2012-05-30 10:16:11 -05:00
AC_CONFIG_SRCDIR(sys-utils/mount.c)
2007-05-15 13:46:24 -05:00
AC_PREFIX_DEFAULT([/usr])
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}' \
2012-02-08 02:51:34 -06:00
| awk -F- '{print $1}')
2009-04-28 15:51:53 -05:00
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"
2013-03-22 06:34:28 -05:00
LIBBLKID_DATE="22-Mar-2013"
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
2009-11-26 10:11:12 -06:00
dnl libmount version
LIBMOUNT_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
LIBMOUNT_LT_MAJOR=1
LIBMOUNT_LT_MINOR=1
LIBMOUNT_LT_MICRO=0
LIBMOUNT_VERSION_INFO=`expr $LIBMOUNT_LT_MAJOR + $LIBMOUNT_LT_MINOR`:$LIBMOUNT_LT_MICRO:$LIBMOUNT_LT_MINOR
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
2012-06-23 00:05:14 -05:00
case $prefix:$localstatedir in
2012-09-12 09:36:06 -05:00
NONE:'${prefix}/var' | /usr:'${prefix}/var')
2012-06-23 00:05:14 -05:00
localstatedir=/run
AC_MSG_NOTICE([ --localstatedir defaults to /run])
;;
esac
2012-06-23 02:17:00 -05:00
AC_SUBST([localstatedir])
2012-06-23 00:05:14 -05:00
2009-03-17 08:54:22 -05:00
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
2012-09-12 11:09:28 -05:00
case $libdir in
'${exec_prefix}/'* | '${prefix}/'* | /usr/*)
usrlib_execdir=$libdir ;;
*)
usrlib_execdir='${exec_prefix}'$libdir ;;
esac
2009-07-03 18:18:01 -05:00
AC_SUBST([usrlib_execdir])
2009-06-30 05:41:54 -05:00
2012-07-16 08:48:43 -05:00
2011-02-26 08:37:18 -06:00
AM_PROG_CC_C_O
2006-12-06 17:26:54 -06:00
AC_PROG_CC_STDC
2008-01-08 05:55:18 -06:00
AC_CANONICAL_HOST
2009-10-08 06:40:06 -05:00
AC_C_CONST
2009-10-08 06:40:07 -05:00
AC_C_VOLATILE
2009-02-04 07:56:54 -06:00
AC_C_BIGENDIAN
2009-02-13 03:54:24 -06:00
2012-06-06 05:10:41 -05:00
dnl Compiler warnings
2012-08-15 10:04:41 -05:00
UL_WARN_ADD([-fno-common])
2012-07-26 03:13:08 -05:00
UL_WARN_ADD([-Wall])
2012-08-15 10:04:41 -05:00
UL_WARN_ADD([-Werror=sequence-point])
2012-06-06 05:10:41 -05:00
UL_WARN_ADD([-Wextra])
2012-08-15 10:04:41 -05:00
UL_WARN_ADD([-Wmissing-declarations])
UL_WARN_ADD([-Wmissing-parameter-type])
UL_WARN_ADD([-Wmissing-prototypes])
2012-06-06 05:10:41 -05:00
UL_WARN_ADD([-Wno-missing-field-initializers])
2012-08-15 10:04:41 -05:00
UL_WARN_ADD([-Wredundant-decls])
2012-06-06 05:10:41 -05:00
UL_WARN_ADD([-Wsign-compare])
UL_WARN_ADD([-Wtype-limits])
UL_WARN_ADD([-Wuninitialized])
2012-08-15 10:04:41 -05:00
UL_WARN_ADD([-Wunused-but-set-parameter])
UL_WARN_ADD([-Wunused-but-set-variable])
2012-06-06 05:10:41 -05:00
UL_WARN_ADD([-Wunused-parameter])
UL_WARN_ADD([-Wunused-result])
2012-07-16 10:16:15 -05:00
UL_WARN_ADD([-Wunused-variable])
2012-08-29 13:26:21 -05:00
UL_WARN_ADD([-Wnested-externs])
UL_WARN_ADD([-Wpointer-arith])
UL_WARN_ADD([-Wstrict-prototypes])
UL_WARN_ADD([-Wformat-security])
2012-06-06 05:10:41 -05:00
AC_SUBST([WARN_CFLAGS])
2009-02-13 03:54:24 -06:00
dnl libtool-2
LT_INIT
2006-12-06 17:26:54 -06:00
2011-02-26 08:37:21 -06:00
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf
macros. These are usually located in /usr/share/aclocal/pkg.m4.
If your macros are in a different location, try setting the
environment variable AL_OPTS="-I/other/macro/dir" before running
./autogen.sh or autoreconf again.])])
2009-02-17 14:28:09 -06:00
PKG_PROG_PKG_CONFIG
2009-12-04 13:01:37 -06:00
GTK_DOC_CHECK([1.10])
AC_PATH_PROG([XSLTPROC], [xsltproc])
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
2011-10-27 08:56:05 -05:00
dnl define ARCH_<NAME> conditionals
UL_SET_ARCH(I86, i?86-*)
UL_SET_ARCH(86_64, x86_64*)
UL_SET_ARCH(IA64, ia64*)
UL_SET_ARCH(S390, s390*)
UL_SET_ARCH(SPARC, sparc*)
UL_SET_ARCH(PPC, ppc*|powerpc*)
UL_SET_ARCH(M68K, m68*)
UL_SET_ARCH(MIPS, mips*)
UL_SET_ARCH(HPPA, hppa*)
2006-12-06 17:26:54 -06:00
AC_SYS_LARGEFILE
2011-10-27 07:44:30 -05:00
AM_GNU_GETTEXT_VERSION([0.14.1])
AM_GNU_GETTEXT([external])
if test -d "$srcdir/po"
then
ALL_LINGUAS=`cd $srcdir/po > /dev/null && echo *.po | sed 's/\.po//g'`
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
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
])
2012-02-08 02:51:34 -06:00
AC_CHECK_HEADERS([ \
asm/io.h \
err.h \
2008-08-27 08:09:47 -05:00
errno.h \
2012-02-08 02:51:34 -06:00
fcntl.h \
2008-08-27 08:09:47 -05:00
getopt.h \
2012-02-08 02:51:34 -06:00
inttypes.h \
linux/cdrom.h \
linux/falloc.h \
2012-05-04 04:45:35 -05:00
linux/watchdog.h \
2008-08-27 08:09:47 -05:00
linux/fd.h \
2012-02-08 02:51:34 -06:00
linux/raw.h \
2008-08-27 08:09:47 -05:00
linux/tiocl.h \
linux/version.h \
2007-09-06 19:30:16 -05:00
locale.h \
2009-02-18 08:06:49 -06:00
mntent.h \
2012-02-08 02:51:34 -06:00
net/if.h \
2009-05-15 18:01:36 -05:00
net/if_dl.h \
2012-02-08 02:51:34 -06:00
netinet/in.h \
paths.h \
pty.h \
security/pam_misc.h \
stdint.h \
2012-04-23 07:26:23 -05:00
stdio_ext.h \
2008-08-27 08:09:47 -05:00
stdlib.h \
2013-01-08 07:07:48 -06:00
endian.h \
byteswap.h \
sys/endian.h \
2008-08-27 08:09:47 -05:00
sys/disk.h \
sys/disklabel.h \
2012-02-08 02:51:34 -06:00
sys/file.h \
2007-05-15 13:46:16 -05:00
sys/io.h \
2012-02-08 02:51:34 -06:00
sys/ioccom.h \
sys/ioctl.h \
2008-08-27 08:09:47 -05:00
sys/mkdev.h \
sys/prctl.h \
sys/queue.h \
2012-02-08 02:51:34 -06:00
sys/resource.h \
2010-02-12 05:43:07 -06:00
sys/socket.h \
2012-02-08 02:51:34 -06:00
sys/sockio.h \
2008-08-27 08:09:47 -05:00
sys/stat.h \
2012-02-08 02:51:34 -06:00
sys/swap.h \
sys/syscall.h \
sys/time.h \
2008-08-27 08:09:47 -05:00
sys/types.h \
2009-05-15 18:01:36 -05:00
sys/un.h \
2012-02-08 02:51:34 -06:00
unistd.h \
])
2010-11-15 09:42:45 -06:00
2011-10-27 07:53:06 -05:00
AC_CHECK_HEADERS([langinfo.h],
[AM_CONDITIONAL([HAVE_LANGINFO], [true])],
[AM_CONDITIONAL([HAVE_LANGINFO], [false])])
2011-10-27 05:08:01 -05:00
dnl Convert some ac_cv_header_* variables to have_*
dnl
have_linux_raw_h=$ac_cv_header_linux_raw_h
2012-05-04 04:45:35 -05:00
have_linux_watchdog_h=$ac_cv_header_linux_watchdog_h
2011-10-27 09:28:35 -05:00
have_security_pam_misc_h=$ac_cv_header_security_pam_misc_h
2006-12-06 17:26:54 -06:00
2011-10-27 07:53:06 -05:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <time.h>
#include <unistd.h>
]], [[
int a = 0;
struct tm *tm = localtime(0);
if (a == -1) /* false */
2012-02-08 02:51:34 -06:00
sleep(tm->tm_gmtoff);
2011-10-27 07:53:06 -05:00
]])],
[AC_DEFINE(HAVE_TM_GMTOFF,1,[Does struct tm have a field tm_gmtoff?])
])
AC_CHECK_MEMBERS([struct termios.c_line],,,
[[#include <termios.h>]])
AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec],,,
[#include <sys/stat.h>])
AC_CHECK_DECLS([
UNAME26,
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>])
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.])
])
2010-11-15 09:42:45 -06:00
2009-05-14 21:43:02 -05:00
AC_CHECK_DECLS([_NL_TIME_WEEK_1STDAY],[],[],[[#include <langinfo.h>]])
2010-02-12 05:43:07 -06:00
AC_CHECK_DECL([llseek],
[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE, 1,
[Define to 1 if have llseek prototype])],
[],
[#include <unistd.h>])
AC_CHECK_DECL([lseek64],
[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE, 1,
[Define to 1 if have lseek64 prototype])],
[],
[#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#include <unistd.h>])
2012-06-10 09:37:11 -05:00
AC_CHECK_DECL([environ],
[AC_DEFINE(HAVE_ENVIRON_DECL, 1,
[Define to 1 if have **environ prototype])],
)
AC_CHECK_DECL([strsignal],
[AC_DEFINE(HAVE_STRSIGNAL_DECL, 1,
[Define to 1 if have strsignal function prototype])],
)
2012-02-08 02:51:34 -06:00
AC_CHECK_FUNCS([ \
2012-04-23 07:26:23 -05:00
__fpending \
2013-02-04 23:08:03 -06:00
secure_getenv \
2012-02-08 02:51:34 -06:00
__secure_getenv \
2011-01-25 15:44:52 -06:00
err \
errx \
2007-05-15 13:46:16 -05:00
fsync \
2012-02-08 02:51:34 -06:00
futimens \
2007-05-15 13:46:16 -05:00
getdomainname \
2012-02-08 02:51:34 -06:00
getdtablesize \
getexecname \
getmntinfo \
getrlimit \
inotify_init \
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 \
2013-01-30 17:49:08 -06:00
mempcpy \
2012-02-08 02:51:34 -06:00
nanosleep \
personality \
posix_fadvise \
prctl \
rpmatch \
2012-01-18 22:16:20 -06:00
scandirat \
2009-05-22 02:08:43 -05:00
setresgid \
setresuid \
2012-02-08 02:51:34 -06:00
sigqueue \
srandom \
strnchr \
2009-11-26 10:45:01 -06:00
strndup \
strnlen \
2012-02-08 02:51:34 -06:00
strtoull \
sysconf \
updwtmp \
usleep \
2011-01-25 15:44:52 -06:00
warn \
warnx \
2012-02-08 02:51:34 -06:00
])
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])
2011-03-02 19:18:32 -06:00
AC_CHECK_FUNCS([ioperm iopl], [have_io=yes])
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>])
2011-01-17 14:14:54 -06:00
SOCKET_LIBS=
AC_SEARCH_LIBS([socket], [socket],
[if test x"$ac_cv_search_socket" != x"none required"; then
SOCKET_LIBS="$SOCKET_LIBS -lsocket";
fi])
AC_SUBST([SOCKET_LIBS])
2011-01-21 10:48:14 -06:00
have_dirfd=no
AC_CHECK_FUNCS([dirfd], [have_dirfd=yes], [have_dirfd=no])
if test x"$have_dirfd" = xno ; then
AC_CHECK_DECLS([dirfd],
[have_dirfd=yes], [have_dirfd=no],
[#include <sys/types.h>
#include <dirent.h>])
fi
have_ddfd=no
if test x"$have_dirfd" = xno ; then
AC_CHECK_MEMBERS([DIR.dd_fd],
[have_ddfd=yes], [have_ddfd=no],
[#include <sys/types.h>
#include <dirent.h>])
fi
case "$have_dirfd:$have_ddfd" in
no:no)
AC_MSG_ERROR([cannot find a method to get filedescriptor of directory]) ;;
esac
2013-02-10 15:33:39 -06:00
AC_MSG_CHECKING([whether program_invocation_short_name is defined])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <argp.h>
]], [[
program_invocation_short_name = "test";
]])], [
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
[Define if program_invocation_short_name is defined])
], [
AC_MSG_RESULT([no])
])
2011-01-25 14:40:46 -06:00
AC_MSG_CHECKING([whether __progname is defined])
AC_LINK_IFELSE([AC_LANG_PROGRAM([extern char *__progname;],
2012-02-08 02:51:34 -06:00
[if (*__progname == 0) return;])],
AC_DEFINE(HAVE___PROGNAME, 1, [Define if __progname is defined])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
2011-01-25 14:40:46 -06:00
2007-12-11 11:47:34 -06:00
dnl Static compilation
2011-10-25 10:00:32 -05:00
m4_define([UL_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,
2011-10-25 10:00:32 -05:00
supported for ]m4_defn([UL_STATIC_PROGRAMS])[)])])
2007-12-11 11:47:34 -06:00
case $enable_static_programs in
2011-10-25 10:00:32 -05:00
yes) enable_static_programs=m4_quote(UL_STATIC_PROGRAMS) ;;
2007-12-11 11:47:34 -06:00
no) enable_static_programs= ;;
esac
dnl Set all the individual AM_CONDITIONALs
2011-10-25 10:00:32 -05:00
m4_foreach([UL_PRG], m4_defn([UL_STATIC_PROGRAMS]), [
2007-12-11 11:47:34 -06:00
case ,$enable_static_programs, in
2011-10-25 10:00:32 -05:00
*,UL_PRG,*) static_[]UL_PRG=yes ;;
2007-12-11 11:47:34 -06:00
esac
2011-10-25 10:00:32 -05:00
AM_CONDITIONAL([HAVE_STATIC_]m4_toupper(UL_PRG),
[test "x$static_[]UL_PRG" = xyes])
2007-12-11 11:47:34 -06:00
])
2009-12-04 08:45:19 -06:00
AX_CHECK_TLS
2009-05-21 08:52:24 -05:00
2011-10-27 06:45:42 -05:00
AC_DEFUN([UL_SCANF_TYPE_MODIFIER], [dnl
# include <stdio.h>
int main()
{
int i;
char *s;
i = sscanf("x", $1, &s);
if (i == 1)
return 0;
return 1;
}])
AC_CACHE_VAL([scanf_cv_alloc_modifier],
AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%ms"])])],
[scanf_cv_alloc_modifier=ms],
AC_RUN_IFELSE([AC_LANG_SOURCE([UL_SCANF_TYPE_MODIFIER(["%as"])])],
[scanf_cv_alloc_modifier=as],
[scanf_cv_alloc_modifier=no]
)
2012-02-24 11:16:07 -06:00
,
2012-02-29 15:26:19 -06:00
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdio.h>
#ifdef __GLIBC__
#if !(__GLIBC_PREREQ(2, 7))
#error %m is not available
#endif
#else
#error Your C-library is not supported.
#endif
])],
[scanf_cv_alloc_modifier=ms],
[scanf_cv_alloc_modifier=no])]
2011-10-27 06:45:42 -05:00
)
)
AC_MSG_CHECKING([scanf string alloc modifiers])
case "$scanf_cv_alloc_modifier" in
ms)
AC_MSG_RESULT([(%ms) yes])
AC_DEFINE([HAVE_SCANF_MS_MODIFIER], [1], [scanf %ms modifier])
have_scanf_alloc_modifier=yes
;;
as)
AC_MSG_RESULT([(%as) yes])
have_scanf_alloc_modifier=yes
AC_DEFINE([HAVE_SCANF_AS_MODIFIER], [1], [scanf %as modifier])
;;
*)
AC_MSG_RESULT([no])
have_scanf_alloc_modifier=no
;;
esac
2011-10-27 07:48:49 -05:00
UL_CHECK_LIB(util, openpty)
UL_CHECK_LIB(termcap, tgetnum)
AC_CHECK_TYPES([union semun], [], [], [[
#include <sys/sem.h>
]])
AC_CHECK_TYPES(loff_t)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <wchar.h>
#include <wctype.h>
#include <stdio.h>
]], [[
wchar_t wc;
wint_t w;
w = fgetwc(stdin);
if (w == WEOF) exit(1);
wc = w;
fputwc(wc,stdout);
]])],
[AC_DEFINE(HAVE_WIDECHAR,1,Do we have wide character support?)
])
AC_CHECK_TYPES([cpu_set_t], [have_cpu_set_t=yes], [], [[
#include <sched.h>
]])
AM_CONDITIONAL(HAVE_CPU_SET_T, [test "x$have_cpu_set_t" = xyes])
AC_CHECK_DECLS([CPU_ALLOC], [], [], [[
#include <sched.h>
]])
2011-10-27 08:13:40 -05:00
# on Solaris, you can't mix and match standards, since we use c99
# aparently at this stage, XOPEN_SOURCE will conflict. As workaround,
# check for crypt.h and use that without XOPEN_SOURCE.
AC_CHECK_HEADERS([crypt.h])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#else
#define _XOPEN_SOURCE
#include <unistd.h>
#endif
]], [[
char *c = crypt("abc","pw");
]])],[],[
LIBS="$LIBS -lcrypt"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#else
#define _XOPEN_SOURCE
#include <unistd.h>
#endif
]], [[
char *c = crypt("abc","pw");
]])],[
AC_DEFINE(HAVE_LIBCRYPT, 1, [Do we need -lcrypt?])
have_libcrypt=yes
],[
AC_MSG_ERROR([crypt() is not available])
])
])
AM_CONDITIONAL(HAVE_LIBCRYPT, test "x$have_libcrypt" = xyes)
2011-10-27 06:45:42 -05:00
2011-10-27 09:31:36 -05:00
AC_ARG_WITH([selinux],
AS_HELP_STRING([--with-selinux], [compile with SELinux support]),
[], with_selinux=no
)
if test "x$with_selinux" = xno; then
AM_CONDITIONAL(HAVE_SELINUX, false)
else
2012-11-30 05:48:44 -06:00
PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0],
2012-11-30 05:58:33 -06:00
[AC_DEFINE(HAVE_LIBSELINUX, 1, [Define if SELinux is available])
2012-11-30 05:48:44 -06:00
UL_PKG_STATIC([SELINUX_LIBS_STATIC], [libselinux])
AM_CONDITIONAL(HAVE_SELINUX, true)
have_selinux=yes],
[have_selinux=no])
2011-10-27 09:31:36 -05:00
case "$with_selinux:$have_selinux" in
2012-11-30 05:48:44 -06:00
yes:no) AC_MSG_ERROR([SELinux selected but libselinux not found or too old]);;
2011-10-27 09:31:36 -05:00
esac
2013-03-20 08:59:21 -05:00
if test "x$have_selinux" = xyes; then
UL_SET_FLAGS([], [], [$SELINUX_LIBS])
# This function is missing in old libselinux 1.xx versions
AC_CHECK_FUNCS([security_get_initial_context])
UL_RESTORE_FLAGS
fi
2011-10-27 09:31:36 -05:00
fi
AC_SUBST([SELINUX_LIBS])
AC_SUBST([SELINUX_LIBS_STATIC])
AC_ARG_WITH([audit],
AS_HELP_STRING([--with-audit], [compile with audit support]),
[], with_audit=no
)
if test "x$with_audit" = xno; then
AM_CONDITIONAL(HAVE_AUDIT, false)
else
UL_CHECK_LIB(audit, audit_log_user_message)
case "$with_audit:$have_audit" in
yes:no)
AC_MSG_ERROR([Audit selected but libaudit not found (or does not support audit_log_user_message())])
;;
esac
fi
AC_ARG_WITH([udev], AS_HELP_STRING([--without-udev], [compile without udev support]),
[], with_udev=auto
)
if test "x$with_udev" = xno; then
AM_CONDITIONAL(HAVE_UDEV, false)
else
UL_CHECK_LIB(udev, udev_new)
case "$with_udev:$have_udev" in
yes:no)
AC_MSG_ERROR([udev selected but libudev not found])
;;
esac
fi
AC_ARG_WITH([ncurses],
AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version
2012-02-08 02:51:34 -06:00
(--without-ncurses disables all ncurses(w) support)]),
2011-10-27 09:31:36 -05:00
[], 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
UL_CHECK_LIB(ncursesw, initscr, ncurses)
if test "x$have_ncurses" = xyes; then
2012-02-08 02:51:34 -06:00
AC_CHECK_HEADERS([ncursesw/ncurses.h])
NCURSES_LIBS="-lncursesw"
2011-10-27 09:31:36 -05:00
fi
fi
if test "x$have_ncurses" = xno; then
UL_CHECK_LIB(ncurses, initscr)
if test "x$have_ncurses" = xyes; then
2012-02-08 02:51:34 -06:00
NCURSES_LIBS="-lncurses"
2011-10-27 09:31:36 -05:00
fi
fi
])
if test "x$have_ncurses" = xno; then
AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)])
fi
fi
AC_SUBST([NCURSES_LIBS])
AC_ARG_WITH([slang],
AS_HELP_STRING([--with-slang], [compile cfdisk with slang]),
[], with_slang=no
)
2012-06-01 09:15:29 -05:00
have_slang=no
2011-10-27 09:31:36 -05:00
if test "x$with_slang" = xyes; then
AC_CHECK_HEADERS([slang.h slang/slang.h])
AC_CHECK_HEADERS([slcurses.h slang/slcurses.h],
2012-06-01 09:15:29 -05:00
[have_slang=yes], [], [
2011-10-27 09:31:36 -05:00
#ifdef HAVE_SLANG_H
#include <slang.h>
#elif defined(HAVE_SLANG_SLANG_H)
#include <slang/slang.h>
#endif
])
2012-06-01 09:15:29 -05:00
if test "x$have_slang" = xno; then
2011-10-27 09:31:36 -05:00
AC_MSG_ERROR([slang selected but slcurses.h not found])
fi
fi
2012-06-01 09:15:29 -05:00
AM_CONDITIONAL(HAVE_SLANG, test "x$have_slang" = xyes)
2012-06-30 11:01:18 -05:00
AM_CONDITIONAL(BUILD_CFDISK, test "x$have_slang" = xyes -o "x$have_ncurses" = xyes)
2012-06-01 09:15:29 -05:00
have_tinfo=no
AC_CHECK_LIB(tinfo, tgetent, [have_tinfo=yes])
AM_CONDITIONAL(HAVE_TINFO, test "x$have_tinfo" = xyes)
2011-10-27 09:31:36 -05:00
AC_ARG_WITH([utempter],
AS_HELP_STRING([--with-utempter], [compile script(1) with libutempter]),
[], with_utempter=no
)
if test "x$with_utempter" = xyes; then
UL_CHECK_LIB(utempter, utempter_add_record)
if test "x$have_utempter" = xno; then
AC_MSG_ERROR([utempter selected but libutempter not found])
fi
else
AM_CONDITIONAL(HAVE_UTEMPTER, false)
fi
2011-09-10 09:46:53 -05:00
AC_ARG_ENABLE([most-builds],
2012-04-19 17:10:44 -05:00
AS_HELP_STRING([--enable-most-builds], [build everything other than experimental code]),
2011-09-10 09:46:53 -05:00
[], enable_most_builds=no
)
if test "x$enable_most_builds" = xyes; then
2013-01-09 16:44:06 -06:00
enable_chfn_chsh=yes
2012-05-25 13:16:13 -05:00
enable_elvtune=check
2011-09-10 09:46:53 -05:00
enable_last=yes
enable_line=yes
enable_mesg=yes
2013-01-09 16:44:06 -06:00
enable_newgrp=yes
2011-09-10 09:46:53 -05:00
enable_reset=yes
2013-01-09 16:44:06 -06:00
enable_socket_activation=yes
enable_tunelp=yes
2012-05-29 08:20:44 -05:00
enable_vipw=yes
2011-09-10 09:46:53 -05:00
enable_write=yes
fi
2011-10-27 03:32:24 -05:00
dnl
dnl libuuid
dnl
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
)
2011-10-27 17:33:41 -05:00
UL_BUILD_INIT([libuuid])
2009-07-13 16:44:30 -05:00
AC_SUBST([LIBUUID_VERSION])
AC_SUBST([LIBUUID_VERSION_INFO])
2011-10-27 17:33:41 -05:00
AM_CONDITIONAL(BUILD_LIBUUID, test "x$build_libuuid" = xyes)
2007-07-18 03:46:42 -05:00
2011-03-16 11:03:48 -05:00
if test "x$enable_libuuid" = xyes; then
2009-05-18 09:01:27 -05:00
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
2006-12-06 17:26:54 -06:00
2011-10-27 03:32:24 -05:00
dnl
dnl libblkid
dnl
2009-05-19 07:08:54 -05:00
AC_ARG_ENABLE([libblkid],
2011-10-27 05:44:06 -05:00
AS_HELP_STRING([--disable-libblkid], [do not build libblkid and many related utilities]),
2009-05-19 07:08:54 -05:00
[], enable_libblkid=yes
2007-05-09 10:35:27 -05:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([libblkid])
2009-10-27 05:30:37 -05:00
AC_SUBST([LIBBLKID_DATE])
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
AC_DEFINE_UNQUOTED(LIBBLKID_VERSION, "$LIBBLKID_VERSION", [libblkid version string])
AC_DEFINE_UNQUOTED(LIBBLKID_DATE, "$LIBBLKID_DATE", [libblkid date string])
2011-10-27 05:55:05 -05:00
if test "x$build_libblkid" = xyes; then
2009-02-17 14:28:09 -06:00
AC_DEFINE(HAVE_LIBBLKID, 1, [Define to 1 if you have the -lblkid.])
2007-12-11 11:47:37 -06:00
fi
2011-10-27 05:55:05 -05:00
AM_CONDITIONAL(BUILD_LIBBLKID, test "x$build_libblkid" = xyes)
2012-08-02 13:19:14 -05:00
AM_CONDITIONAL(BUILD_LIBBLKID_TESTS, test "x$build_libblkid" = xyes -a "x$enable_static" = xyes)
2009-05-19 07:08:54 -05:00
2011-10-27 03:32:24 -05:00
dnl
dnl libmount
dnl
2009-11-26 10:11:12 -06:00
AC_ARG_ENABLE([libmount],
AS_HELP_STRING([--disable-libmount], [do not build libmount]),
2011-01-31 07:18:46 -06:00
[], enable_libmount=check
2009-11-26 10:11:12 -06:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([libmount])
2011-10-27 06:45:42 -05:00
UL_REQUIRES_LINUX([libmount])
UL_REQUIRES_BUILD([libmount], [libblkid])
UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier])
AM_CONDITIONAL(BUILD_LIBMOUNT, test "x$build_libmount" = xyes)
2012-08-02 13:19:14 -05:00
AM_CONDITIONAL(BUILD_LIBMOUNT_TESTS, test "x$build_libmount" = xyes -a "x$enable_static" = xyes)
2010-06-08 03:55:24 -05:00
2009-11-26 10:11:12 -06:00
AC_SUBST([LIBMOUNT_VERSION])
AC_SUBST([LIBMOUNT_VERSION_INFO])
2009-11-26 10:27:13 -06:00
AC_DEFINE_UNQUOTED(LIBMOUNT_VERSION, "$LIBMOUNT_VERSION", [libmount version string])
2011-10-27 06:45:42 -05:00
2009-11-26 10:11:12 -06:00
2013-03-21 07:22:10 -05:00
dnl
dnl libfdisk is enabled all time if possible
dnl
UL_BUILD_INIT([libfdisk], [check])
UL_REQUIRES_BUILD([libfdisk], [libuuid])
AM_CONDITIONAL(BUILD_LIBFDISK, test "x$build_libfdisk" = xyes)
UL_BUILD_INIT([fdisk], [check])
UL_REQUIRES_BUILD([fdisk], [libfdisk])
AM_CONDITIONAL(BUILD_FDISK, test "x$build_fdisk" = xyes)
2012-05-30 10:29:01 -05:00
AC_ARG_ENABLE([deprecated-mount],
AS_HELP_STRING([--enable-deprecated-mount], [build old mount utilities]),
[], enable_deprecated_mount=no
2011-10-27 03:32:24 -05:00
)
2012-05-30 10:29:01 -05:00
UL_BUILD_INIT([deprecated_mount])
UL_REQUIRES_LINUX([deprecated_mount])
UL_REQUIRES_BUILD([deprecated_mount], [libblkid])
AM_CONDITIONAL(BUILD_DEPRECATED_MOUNT, test "x$build_deprecated_mount" = xyes)
2011-10-27 03:32:24 -05:00
2012-05-30 10:29:01 -05:00
AC_ARG_ENABLE([mount],
AS_HELP_STRING([--disable-mount], [do not build mount(8) and umount(8)]),
[], enable_mount=check
2012-01-11 10:05:08 -06:00
)
2012-05-30 10:29:01 -05:00
UL_BUILD_INIT([mount])
UL_REQUIRES_BUILD([mount], [libmount])
2012-05-31 03:03:35 -05:00
UL_CONFLICTS_BUILD([mount], [deprecated_mount], [old deprecated mount version])
2012-05-30 10:29:01 -05:00
AM_CONDITIONAL(BUILD_MOUNT, test "x$build_mount" = xyes)
2012-01-11 10:05:08 -06:00
2012-05-31 03:03:35 -05:00
AC_ARG_ENABLE([losetup],
AS_HELP_STRING([--disable-losetup], [do not build losetup]),
[], enable_losetup=check
)
UL_BUILD_INIT([losetup])
UL_REQUIRES_LINUX([losetup])
AM_CONDITIONAL(BUILD_LOSETUP, test "x$build_losetup" = xyes)
2011-10-27 03:32:24 -05:00
AC_ARG_ENABLE([fsck],
AS_HELP_STRING([--disable-fsck], [do not build fsck]),
2011-10-27 05:44:06 -05:00
[], enable_fsck=check
2011-10-27 03:32:24 -05:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([fsck])
2012-03-06 05:36:03 -06:00
UL_REQUIRES_BUILD([fsck], [libmount])
2011-10-27 05:44:06 -05:00
AM_CONDITIONAL(BUILD_FSCK, test "x$build_fsck" = xyes)
2011-10-27 03:32:24 -05:00
AC_ARG_ENABLE([partx],
AS_HELP_STRING([--disable-partx], [do not build addpart, delpart, partx]),
[], enable_partx=check
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([partx])
2011-10-27 05:52:01 -05:00
UL_REQUIRES_LINUX([partx])
UL_REQUIRES_BUILD([partx], [libblkid])
2011-10-27 03:32:24 -05:00
AM_CONDITIONAL(BUILD_PARTX, test "x$build_partx" = xyes)
AC_ARG_ENABLE([uuidd],
AS_HELP_STRING([--disable-uuidd], [do not build the uuid daemon]),
2011-10-27 07:17:00 -05:00
[], enable_uuidd=check
2011-10-27 03:32:24 -05:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([uuidd])
2011-10-27 07:17:00 -05:00
UL_REQUIRES_BUILD([uuidd], [libuuid])
if test "x$build_uuidd" = xyes; then
2011-10-27 03:32:24 -05:00
AC_DEFINE(HAVE_UUIDD, 1, [Define to 1 if you want to use uuid daemon.])
fi
2011-10-27 07:17:00 -05:00
AM_CONDITIONAL(BUILD_UUIDD, test "x$build_uuidd" = xyes)
2011-10-27 03:32:24 -05:00
2011-06-21 04:46:36 -05:00
AC_ARG_ENABLE([mountpoint],
2011-08-18 04:38:19 -05:00
AS_HELP_STRING([--disable-mountpoint], [do not build mountpoint]),
2011-07-27 05:02:36 -05:00
[], enable_mountpoint=check
2011-06-21 04:46:36 -05:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([mountpoint])
2011-10-27 07:31:34 -05:00
UL_REQUIRES_BUILD([mountpoint], [libmount])
2011-07-27 05:02:36 -05:00
AM_CONDITIONAL(BUILD_MOUNTPOINT, test "x$build_mountpoint" = xyes)
2011-06-21 04:46:36 -05:00
2011-10-27 08:48:51 -05:00
AC_ARG_ENABLE([fallocate],
AS_HELP_STRING([--disable-fallocate], [do not build fallocate]),
[], enable_fallocate=check
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([fallocate])
2011-10-27 08:48:51 -05:00
UL_REQUIRES_LINUX([fallocate])
UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
AM_CONDITIONAL(BUILD_FALLOCATE, test "x$build_fallocate" = xyes)
if test "x$build_fallocate" = xyes; then
dnl check for valid fallocate() function
dnl with 32 bits glibc 2.10, fallocate() exists but not fallocate64()
dnl when _FILE_OFFSET_BITS==64, fallocate() is redirect to fallocate64()
dnl and program can't be linked.
dnl AC_CHECK_FUNC can't catch such errors since it's redefining
dnl function prototype.
AC_MSG_CHECKING([for valid fallocate() function])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
2010-03-31 09:14:04 -05:00
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_LINUX_FALLOC_H
# include <linux/falloc.h>
#endif
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
]],[[
long ret;
ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0xfffffffful, 0xfffffffful);
if (ret != 0) {
return 1;
}
]])],[
2011-10-27 08:48:51 -05:00
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FALLOCATE,1,[Have valid fallocate() function])],[
AC_MSG_RESULT([no])])
fi
2007-08-26 06:22:56 -05:00
2011-10-27 08:51:28 -05:00
AC_ARG_ENABLE([unshare],
AS_HELP_STRING([--disable-unshare], [do not build unshare]),
[], enable_unshare=check
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([unshare])
2011-10-27 08:51:28 -05:00
UL_REQUIRES_LINUX([unshare])
UL_REQUIRES_SYSCALL_CHECK([unshare], [UL_CHECK_SYSCALL([unshare])])
AM_CONDITIONAL(BUILD_UNSHARE, test "x$build_unshare" = xyes)
if test "x$build_unshare" = xyes; then
AC_CHECK_FUNCS([unshare])
fi
2007-05-15 13:46:20 -05:00
2013-01-11 16:46:38 -06:00
AC_ARG_ENABLE([nsenter],
AS_HELP_STRING([--disable-nsenter], [do not build nsenter]),
[], enable_nsenter=check
)
UL_BUILD_INIT([nsenter])
UL_REQUIRES_LINUX([nsenter])
UL_REQUIRES_SYSCALL_CHECK([setns], [UL_CHECK_SYSCALL([setns])])
AM_CONDITIONAL(BUILD_NSENTER, test "x$build_nsenter" = xyes)
if test "x$build_nsenter" = xyes; then
AC_CHECK_FUNCS([setns])
fi
2007-05-15 13:46:20 -05:00
2013-01-14 09:58:57 -06:00
dnl setpriv depends on libcap-ng. It would be possible to build
dnl a version of setpriv with limited functionality without libcap-ng,
dnl but this isn't currently supported.
UL_CHECK_LIB([cap-ng], [capng_apply], [cap_ng])
AC_ARG_ENABLE([setpriv],
AS_HELP_STRING([--disable-setpriv], [do not build setpriv]),
[], enable_setpriv=check
)
UL_BUILD_INIT([setpriv])
UL_REQUIRES_LINUX([setpriv])
UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng])
AM_CONDITIONAL(BUILD_SETPRIV, test "x$build_setpriv" = xyes)
2011-12-08 09:10:18 -06:00
AC_ARG_ENABLE([eject],
AS_HELP_STRING([--disable-eject], [do not build eject]),
2012-05-25 13:16:13 -05:00
[], enable_eject=check
2011-12-08 09:10:18 -06:00
)
UL_BUILD_INIT([eject])
UL_REQUIRES_LINUX([eject])
2012-07-27 02:04:55 -05:00
UL_REQUIRES_BUILD([eject], [libmount])
2012-04-05 08:39:44 -05:00
AM_CONDITIONAL(BUILD_EJECT, test "x$build_eject" = xyes)
2011-12-08 09:10:18 -06:00
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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([agetty])
2011-10-27 08:57:18 -05:00
AM_CONDITIONAL(BUILD_AGETTY, test "x$build_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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([cramfs])
2011-10-27 09:02:29 -05:00
AC_CHECK_LIB(z, crc32, [have_z=yes], [have_z=no])
UL_REQUIRES_HAVE([cramfs], [z], [z library])
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
2011-10-27 07:20:35 -05:00
2011-10-27 10:04:49 -05:00
if test "x$have_io" = xyes -o "x$linux_os" = xyes; then
build_hwclock=yes
fi
AM_CONDITIONAL(BUILD_HWCLOCK, test "x$build_hwclock" = xyes)
2012-01-11 05:14:29 -06:00
UL_BUILD_INIT([swapon], [check])
UL_REQUIRES_LINUX([swapon])
UL_REQUIRES_BUILD([swapon], [libblkid])
2012-07-27 02:04:55 -05:00
UL_REQUIRES_BUILD([swapon], [libmount])
2012-01-11 05:14:29 -06:00
AM_CONDITIONAL(BUILD_SWAPON, test "x$build_swapon" = xyes)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([lsblk], [check])
2011-10-27 07:20:35 -05:00
UL_REQUIRES_LINUX([lsblk])
UL_REQUIRES_BUILD([lsblk], [libblkid])
2012-04-03 06:43:50 -05:00
UL_REQUIRES_BUILD([lsblk], [libmount])
2011-02-11 02:42:49 -06:00
AM_CONDITIONAL(BUILD_LSBLK, test "x$build_lsblk" = xyes)
2006-12-06 17:27:03 -06:00
2011-10-27 09:05:41 -05:00
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([lscpu], [check])
2011-10-27 07:40:00 -05:00
UL_REQUIRES_LINUX([lscpu])
UL_REQUIRES_HAVE([lscpu], [cpu_set_t], [cpu_set_t type])
AM_CONDITIONAL(BUILD_LSCPU, test "x$build_lscpu" = xyes)
2011-10-27 09:05:41 -05:00
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([chcpu], [check])
2011-10-27 07:40:00 -05:00
UL_REQUIRES_LINUX([chcpu])
UL_REQUIRES_HAVE([chcpu], [cpu_set_t], [cpu_set_t type])
AM_CONDITIONAL(BUILD_CHCPU, test "x$build_chcpu" = xyes)
2011-10-27 07:20:35 -05:00
2012-09-07 07:19:17 -05:00
AC_ARG_ENABLE([wdctl],
AS_HELP_STRING([--disable-wdctl], [do not build wdctl]),
[], enable_wdctl=check
)
UL_BUILD_INIT([wdctl])
2012-05-04 04:45:35 -05:00
UL_REQUIRES_LINUX([wdctl])
UL_REQUIRES_HAVE([wdctl], [linux_watchdog_h], [linux/watchdog.h header file])
AM_CONDITIONAL(BUILD_WDCTL, test "x$build_wdctl" = xyes)
2012-06-26 11:20:00 -05:00
UL_BUILD_INIT([swaplabel], [check])
UL_REQUIRES_BUILD([swaplabel], [libblkid])
AM_CONDITIONAL(BUILD_SWAPLABEL, test "x$build_swaplabel" = xyes)
2011-10-27 17:23:59 -05:00
UL_BUILD_INIT([prlimit], [check])
UL_REQUIRES_LINUX([prlimit])
UL_REQUIRES_SYSCALL_CHECK([prlimit], [UL_CHECK_SYSCALL([prlimit64])], [prlimit64])
AM_CONDITIONAL(BUILD_PRLIMIT, test "x$build_prlimit" = xyes)
if test "x$build_prlimit" = xyes; then
AC_CHECK_FUNCS([prlimit])
fi
2012-02-27 11:26:40 -06:00
UL_BUILD_INIT([lslocks], [check])
UL_REQUIRES_LINUX([lslocks])
2013-03-21 07:13:23 -05:00
UL_REQUIRES_BUILD([lslocks], [libmount])
2012-02-27 11:26:40 -06:00
AM_CONDITIONAL(BUILD_LSLOCKS, test "x$build_lslocks" = xyes)
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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([switch_root])
2011-10-27 09:05:41 -05:00
UL_REQUIRES_LINUX([switch_root])
UL_REQUIRES_HAVE([switch_root], [openat], [openat function])
2009-06-09 08:21:39 -05:00
AM_CONDITIONAL(BUILD_SWITCH_ROOT, test "x$build_switch_root" = xyes)
2009-06-09 03:15:28 -05:00
2009-10-06 05:43:22 -05:00
AC_ARG_ENABLE([pivot_root],
AS_HELP_STRING([--disable-pivot_root], [do not build pivot_root]),
[], enable_pivot_root=check
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([pivot_root])
2011-10-27 09:07:50 -05:00
UL_REQUIRES_LINUX([switch_root])
UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
2009-10-06 14:57:48 -05:00
AM_CONDITIONAL(BUILD_PIVOT_ROOT, test "x$build_pivot_root" = xyes)
2009-10-06 05:43:22 -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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([elvtune])
2011-10-27 09:10:55 -05:00
UL_REQUIRES_LINUX([elvtune])
AM_CONDITIONAL(BUILD_ELVTUNE, test "x$build_elvtune" = xyes)
2006-12-06 17:26:54 -06:00
2012-12-16 04:43:56 -06:00
AC_ARG_ENABLE([tunelp],
AS_HELP_STRING([--enable-tunelp], [build tunelp]),
[], enable_tunelp=no
)
UL_BUILD_INIT([tunelp])
UL_REQUIRES_LINUX([tunelp])
AM_CONDITIONAL(BUILD_TUNELP, test "x$build_tunelp" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([kill],
2011-10-27 09:16:02 -05:00
AS_HELP_STRING([--disable-kill], [do not build kill]),
[], enable_kill=check
2006-12-06 17:26:54 -06:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([kill])
2011-10-27 09:16:02 -05:00
UL_REQUIRES_LINUX([kill])
2012-05-25 13:11:22 -05:00
AM_CONDITIONAL(BUILD_KILL, test "x$build_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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([last])
2011-10-27 09:18:12 -05:00
AM_CONDITIONAL(BUILD_LAST, test "x$build_last" = xyes)
2006-12-06 17:26:54 -06:00
2012-06-29 09:34:46 -05:00
AC_ARG_ENABLE([utmpdump],
2012-07-27 05:09:01 -05:00
AS_HELP_STRING([--disable-utmpdump], [do not build utmpdump]),
2012-06-29 09:34:46 -05:00
[], enable_utmpdump=yes
)
UL_BUILD_INIT([utmpdump])
AM_CONDITIONAL(BUILD_UTMPDUMP, test "x$build_utmpdump" = xyes)
2011-05-21 08:02:09 -05:00
AC_ARG_ENABLE([line],
AS_HELP_STRING([--enable-line], [build line]),
[], enable_line=no
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([line])
2011-10-27 09:18:12 -05:00
AM_CONDITIONAL(BUILD_LINE, test "x$build_line" = 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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([mesg])
2011-10-27 09:18:12 -05:00
AM_CONDITIONAL(BUILD_MESG, test "x$build_mesg" = xyes)
2006-12-06 17:26:54 -06:00
AC_ARG_ENABLE([raw],
2013-01-24 12:23:56 -06:00
AS_HELP_STRING([--disable-raw], [do not build raw]),
2011-10-27 05:08:01 -05:00
[], enable_raw=check
2006-12-06 17:26:54 -06:00
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([raw])
2011-10-27 05:08:01 -05:00
UL_REQUIRES_LINUX([raw])
UL_REQUIRES_HAVE([raw], [linux_raw_h], [raw.h header file])
AM_CONDITIONAL(BUILD_RAW, test "x$build_raw" = 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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([rename])
2011-10-27 09:19:14 -05:00
AM_CONDITIONAL(BUILD_RENAME, test "x$build_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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([reset])
2011-10-27 09:19:14 -05:00
AM_CONDITIONAL(BUILD_RESET, test "x$build_reset" = xyes)
2006-12-06 17:26:54 -06:00
2012-05-29 08:20:44 -05:00
AC_ARG_ENABLE([vipw],
AS_HELP_STRING([--enable-vipw], [build vipw]),
[], enable_vipw=no
2006-12-06 17:26:54 -06:00
)
2012-05-29 08:20:44 -05:00
UL_BUILD_INIT([vipw])
AM_CONDITIONAL(BUILD_VIPW, test "x$build_vipw" = xyes)
2006-12-06 17:27:03 -06:00
2011-08-15 05:45:20 -05:00
2012-05-29 08:15:38 -05:00
AC_ARG_ENABLE([newgrp],
AS_HELP_STRING([--enable-newgrp], [build newgrp]),
[], enable_newgrp=no
)
UL_BUILD_INIT([newgrp])
AM_CONDITIONAL(BUILD_NEWGRP, test "x$build_newgrp" = xyes)
2013-02-13 06:44:34 -06:00
AC_ARG_WITH([user], AS_HELP_STRING([--without-user], [compile without libuser (remote chsh)]),
2013-02-07 00:22:18 -06:00
[], with_user=auto
)
if test "x$with_user" = xno; then
AM_CONDITIONAL(HAVE_USER, false)
else
2013-03-22 06:33:27 -05:00
PKG_CHECK_MODULES(LIBUSER,[libuser >= 0.58], [have_user=yes], [have_user=no])
2013-02-07 00:22:18 -06:00
UL_CHECK_LIB(user, lu_start)
case "$with_user:$have_user" in
yes:no)
AC_MSG_ERROR([user selected but libuser not found])
;;
esac
2013-03-21 07:12:52 -05:00
# temporary solution, libuser has stupid .pc where are exported all
# private dependencies to Requires: instead of Requires.private:
if test "x$have_user" = xyes; then
LIBUSER_LIBS=-luser
fi
2013-02-07 00:22:18 -06:00
fi
2013-02-13 06:44:34 -06:00
AC_ARG_ENABLE([chfn-chsh-password],
AS_HELP_STRING([--disable-chfn-chsh-password], [do not require the user to enter the password in chfn and chsh]),
[], enable_chfn_chsh_password=yes
)
AC_ARG_ENABLE([chfn-chsh],
AS_HELP_STRING([--enable-chfn-chsh], [build chfn and chsh]),
[], enable_chfn_chsh=no
)
UL_BUILD_INIT([chfn_chsh])
if test "x$enable_chfn_chsh_password" = xyes -o "x$have_user" = xyes; then
UL_REQUIRES_HAVE([chfn_chsh], [security_pam_misc_h], [PAM header file])
AC_DEFINE(CHFN_CHSH_PASSWORD, 1, [Should chfn and chsh require the user to enter the password?])
fi
AM_CONDITIONAL(BUILD_CHFN_CHSH, test "x$build_chfn_chsh" = xyes)
AM_CONDITIONAL(CHFN_CHSH_PASSWORD, test "x$enable_chfn_chsh_password" = xyes)
AC_ARG_ENABLE([chsh-only-listed],
AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
[], enable_chsh_only_listed=yes
)
2013-02-07 00:22:18 -06:00
2012-05-29 08:24:04 -05:00
if test "x$enable_chsh_only_listed" = xyes; then
AC_DEFINE(ONLY_LISTED_SHELLS, 1, [Should chsh allow only shells in /etc/shells?])
fi
2012-05-29 07:41:01 -05:00
2012-05-29 07:14:38 -05:00
AC_ARG_ENABLE([login],
AS_HELP_STRING([--disable-login], [do not build login]),
[], enable_login=yes
)
UL_BUILD_INIT([login])
UL_REQUIRES_HAVE([login], [security_pam_misc_h], [PAM header file])
AM_CONDITIONAL(BUILD_LOGIN, test "x$build_login" = xyes)
2012-05-29 08:24:04 -05:00
AC_ARG_ENABLE([login-chown-vcs],
AS_HELP_STRING([--enable-login-chown-vcs], [let login chown /dev/vcsN]),
[], enable_login_chown_vcs=no
)
if test "x$enable_login_chown_vcs" = xyes; then
AC_DEFINE(LOGIN_CHOWN_VCS, 1, [Should login chown /dev/vcsN?])
fi
AC_ARG_ENABLE([login-stat-mail],
AS_HELP_STRING([--enable-login-stat-mail], [let login stat() the mailbox]),
[], enable_login_stat_mail=no
)
if test "x$enable_login_stat_mail" = xyes; then
AC_DEFINE(LOGIN_STAT_MAIL, 1, [Should login stat() the mailbox?])
fi
2012-05-29 07:14:38 -05:00
AC_ARG_ENABLE([sulogin],
AS_HELP_STRING([--disable-sulogin], [do not build sulogin]),
[], enable_sulogin=yes
)
UL_BUILD_INIT([sulogin])
AM_CONDITIONAL(BUILD_SULOGIN, test "x$build_sulogin" = xyes)
2011-10-03 07:22:42 -05:00
2012-05-29 07:54:06 -05:00
AC_ARG_ENABLE([su],
AS_HELP_STRING([--disable-su], [do not build su]),
[], enable_su=yes
)
UL_BUILD_INIT([su])
UL_REQUIRES_HAVE([su], [security_pam_misc_h], [PAM header file])
AM_CONDITIONAL(BUILD_SU, test "x$build_su" = xyes)
2012-08-29 10:34:26 -05:00
AC_ARG_ENABLE([runuser],
AS_HELP_STRING([--disable-runuser], [do not build runuser]),
[], enable_runuser=yes
)
UL_BUILD_INIT([runuser])
UL_REQUIRES_HAVE([runuser], [security_pam_misc_h], [PAM header file])
AM_CONDITIONAL(BUILD_RUNUSER, test "x$build_runuser" = xyes)
2013-01-24 12:23:56 -06:00
AC_ARG_ENABLE([ul],
AS_HELP_STRING([--disable-ul], [do not build ul]),
[], enable_ul=check
)
UL_BUILD_INIT([ul])
UL_REQUIRES_HAVE([ul], [ncurses, tinfo], [ncurses or tinfo libraries])
AM_CONDITIONAL(BUILD_UL, test "x$build_ul" = xyes)
AC_ARG_ENABLE([more],
AS_HELP_STRING([--disable-more], [do not build more]),
[], enable_more=check
)
UL_BUILD_INIT([more])
UL_REQUIRES_HAVE([more], [ncurses, tinfo, termcap], [ncurses, tinfo or termcap libraries])
AM_CONDITIONAL(BUILD_MORE, test "x$build_more" = xyes)
AC_ARG_ENABLE([pg],
AS_HELP_STRING([--disable-pg], [do not build pg]),
[], enable_pg=check
)
UL_BUILD_INIT([pg])
UL_REQUIRES_HAVE([pg], [ncurses], [ncurses or ncursesw library])
AM_CONDITIONAL(BUILD_PG, test "x$build_pg" = xyes)
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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([schedutils])
2011-10-27 09:49:32 -05:00
AM_CONDITIONAL(BUILD_SCHEDUTILS, test "x$build_schedutils" = xyes)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([ionice], [check])
2011-10-27 09:49:32 -05:00
UL_REQUIRES_BUILD([ionice], [schedutils])
UL_REQUIRES_SYSCALL_CHECK([ionice],
[UL_CHECK_SYSCALL([ioprio_set],
2012-02-08 02:51:34 -06:00
[alpha], [442],
[i*86], [289],
[ia64*], [1274],
[powerpc*], [273],
[s390*], [282],
[sparc*], [196],
[sh*], [288],
[x86_64*], [251])],
2011-10-27 09:49:32 -05:00
[ioprio_set])
UL_REQUIRES_SYSCALL_CHECK([ionice],
[UL_CHECK_SYSCALL([ioprio_get],
2012-02-08 02:51:34 -06:00
[alpha], [443],
[i*86], [290],
[ia64*], [1275],
[powerpc*], [274],
[s390*], [283],
[sparc*], [218],
[sh*], [289],
[x86_64*], [252])],
2011-10-27 09:49:32 -05:00
[ioprio_get])
AM_CONDITIONAL(BUILD_IONICE, test "x$build_ionice" = xyes)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([taskset], [check])
2011-10-27 09:49:32 -05:00
UL_REQUIRES_BUILD([taskset], [schedutils])
2012-11-02 06:07:36 -05:00
UL_REQUIRES_HAVE([taskset], [cpu_set_t], [cpu_set_t type])
2011-10-27 09:49:32 -05:00
UL_REQUIRES_SYSCALL_CHECK([taskset],
[UL_CHECK_SYSCALL([sched_getaffinity])],
[sched_getaffinity])
AM_CONDITIONAL(BUILD_TASKSET, test "x$build_taskset" = 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
)
2012-02-21 09:03:25 -06:00
UL_BUILD_INIT([wall])
2011-10-27 09:50:54 -05:00
AM_CONDITIONAL(BUILD_WALL, test "x$build_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
)
2011-10-27 10:46:47 -05:00
UL_BUILD_INIT([write])
2011-10-27 09:50:54 -05:00
AM_CONDITIONAL(BUILD_WRITE, test "x$build_write" = xyes)
2006-12-06 17:26:54 -06:00
2012-05-03 14:01:54 -05:00
AC_ARG_ENABLE([socket-activation],
AS_HELP_STRING([--enable-socket-activation], [build uuidd with support for systemd socket activation]),
[], enable_socket_activation=no
)
AM_CONDITIONAL(USE_SOCKET_ACTIVATION, test "x$enable_socket_activation" = xyes)
if test "x$enable_socket_activation" = xyes; then
AC_DEFINE(USE_SOCKET_ACTIVATION, 1, [Should uuidd support socket activation?])
fi
2012-05-03 14:01:58 -05:00
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files]),
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
if test "x$with_systemdsystemunitdir" != "xno"; then
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
fi
2012-06-26 11:14:36 -05:00
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno" ])
2012-05-03 14:01:58 -05:00
2012-05-03 14:01:54 -05:00
2013-03-19 17:24:41 -05:00
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
[],
[AS_IF([$($PKG_CONFIG --exists bash-completion)], [
with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
], [
with_bashcompletiondir=${datadir}/bash-completion/completions
])
])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
2013-04-05 08:54:31 -05:00
AC_ARG_ENABLE([bash-completion],
AS_HELP_STRING([--disable-bash-completion], [do not install bash completion files]),
[], enable_bash_completion=yes
)
AM_CONDITIONAL(BUILD_BASH_COMPLETION, test "x$enable_bash_completion" = xyes)
2013-03-19 17:24:41 -05:00
2006-12-06 17:26:54 -06:00
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
2010-01-24 21:36:55 -06:00
AC_DEFUN([FS_PATHS_DEFAULT], [/sbin:/sbin/fs.d:/sbin/fs])
AC_ARG_ENABLE([fs-paths-default],
AS_HELP_STRING([--enable-fs-paths-default=paths], [default search path for fs helpers @<:@FS_PATHS_DEFAULT@:>@]),
[case "$enableval" in
yes) fs_paths_defaults="FS_PATHS_DEFAULT" ;;
no) fs_paths_defaults="" ;;
*) fs_paths_defaults="$enableval" ;;
esac],
[fs_paths_defaults="FS_PATHS_DEFAULT"]
)
AC_ARG_ENABLE([fs-paths-extra],
AS_HELP_STRING([--enable-fs-paths-extra=paths], [additional search paths for fs helpers]),
[case "$enableval" in
yes|no) fs_paths_extra="" ;;
2012-02-08 02:51:34 -06:00
*) fs_paths_extra="$enableval" ;;
2010-01-24 21:36:55 -06:00
esac],
[fs_paths_extra=""]
)
fs_paths="$fs_paths_defaults"
if test "x$fs_paths_extra" != "x"; then
if test "x$fs_paths" != "x"; then
fs_paths="${fs_paths}:"
fi
fs_paths="${fs_paths}${fs_paths_extra}"
fi
AC_DEFINE_UNQUOTED([FS_SEARCH_PATH], "$fs_paths", [search path for fs helpers])
2006-12-06 17:26:54 -06:00
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
2012-12-10 06:27:10 -06:00
AC_ARG_ENABLE([sulogin-emergency-mount],
2012-12-30 14:00:23 -06:00
AS_HELP_STRING([--enable-sulogin-emergency-mount],
[use emergency mount of /dev and /proc for sulogin]),
[], enable_sulogin_emergency_mount=no
2012-12-10 06:27:10 -06:00
)
if test "x$enable_sulogin_emergency_mount" = xyes; then
AC_DEFINE(USE_SULOGIN_EMERGENCY_MOUNT, 1,
[Should sulogin use a emergency mount of /dev and /proc?])
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)
2012-08-14 18:53:40 -05:00
#
# Don't use configure.ac to replace install paths! See Makefile PATHFILES for
# more details.
#
2007-01-03 15:20:44 -06:00
AC_CONFIG_FILES([
2012-02-08 02:51:34 -06:00
Makefile
2012-06-26 11:42:49 -05:00
libblkid/docs/Makefile
2011-06-09 15:04:24 -05:00
libblkid/docs/version.xml
libblkid/src/blkid.h
2012-06-26 11:42:49 -05:00
libmount/docs/Makefile
2011-06-09 14:59:52 -05:00
libmount/docs/version.xml
2012-02-08 02:51:34 -06:00
libmount/src/libmount.h
po/Makefile.in
2007-01-03 15:20:44 -06:00
])
2006-12-06 17:26:54 -06:00
AC_OUTPUT
2012-08-29 14:16:21 -05:00
AC_MSG_RESULT([
${PACKAGE} ${VERSION}
prefix: ${prefix}
exec prefix: ${exec_prefix}
localstatedir: ${localstatedir}
bindir: ${bindir}
sbindir: ${sbindir}
libdir: ${libdir}
includedir: ${includedir}
usrbin_execdir: ${usrbin_execdir}
usrsbin_execdir: ${usrsbin_execdir}
usrlib_execdir: ${usrlib_execdir}
compiler: ${CC}
cflags: ${CFLAGS}
suid cflags: ${SUID_CFLAGS}
ldflags: ${LDFLAGS}
suid ldflags: ${SUID_LDFLAGS}
2013-03-19 17:24:41 -05:00
Bash completions dir: ${with_bashcompletiondir}
2012-08-29 14:16:21 -05:00
warnings:
${WARN_CFLAGS}
])