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
-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
+AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax no-dist-gzip dist-xz subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_CONFIG_SRCDIR([sys-utils/mount.c])
AC_PREFIX_DEFAULT([/usr])
dnl libblkid version
LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
-LIBBLKID_DATE="19-Oct-2017"
+LIBBLKID_DATE="19-Oct-2018"
LIBBLKID_LT_MAJOR=1
LIBBLKID_LT_MINOR=1
LIBBLKID_LT_MICRO=0
AS_CASE([$bindir], ['${exec_prefix}/bin'], [bindir=/bin; AC_MSG_NOTICE([ --bindir defaults to /bin]) ])
AS_CASE([$sbindir], ['${exec_prefix}/sbin'], [sbindir=/sbin; AC_MSG_NOTICE([ --sbindir defaults to /sbin])])
AS_CASE([$libdir], ['${exec_prefix}/lib'], [libdir=/lib; AC_MSG_NOTICE([ --libdir defaults to /lib]) ])
+ AS_CASE([$libdir], ['${exec_prefix}/lib64'],[libdir=/lib64; AC_MSG_NOTICE([ --libdir defaults to /lib64]) ])
]
)
UL_WARN_ADD([-Wstrict-prototypes])
UL_WARN_ADD([-Wformat-security])
UL_WARN_ADD([-Wimplicit-function-declaration])
+UL_WARN_ADD([-Wdiscarded-qualifiers])
AC_SUBST([WARN_CFLAGS])
UL_WARN_ADD([-Wno-clobbered], [BSD_WARN_CFLAGS])
AC_SUBST([BSD_WARN_CFLAGS])
+
+UL_WARN_ADD([-Wno-cast-function-type], [PYTHON_WARN_CFLAGS])
+AC_SUBST([PYTHON_WARN_CFLAGS])
+
UL_WARN_ADD([-Wno-unused-parameter], [NO_UNUSED_WARN_CFLAGS])
AC_SUBST([NO_UNUSED_WARN_CFLAGS])
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.])])
+ ./autogen.sh or autoreconf again. Make sure pkg-config is installed.])])
PKG_PROG_PKG_CONFIG
GTK_DOC_CHECK([1.10])
utmpx.h \
])
+# There is a collision in old kernel-headers. The both files mount.h and fs.h
+# define MS_* macros. Fixed by kernel commit e462ec50cb5fad19f6003a3d8087f4a0945dd2b1.
+#
+AC_CHECK_HEADERS([linux/fs.h ], [], [],
+ [#ifdef HAVE_SYS_MOUNT_H
+ # include <linux/fs.h>
+ # include <sys/mount.h>
+ #endif
+])
+
AC_CHECK_HEADERS([linux/gsmmux.h ], [], [],
[#ifdef LINUX_GSMMUX_H
# include <linux/gsmmux.h>
[AM_CONDITIONAL([HAVE_LANGINFO], [true])],
[AM_CONDITIONAL([HAVE_LANGINFO], [false])])
-
AC_MSG_CHECKING([whether langinfo.h defines ALTMON_x constants])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <langinfo.h>
#include <sys/socket.h>])
AC_CHECK_FUNCS([ \
+ clearenv \
+ __fpurge \
+ fpurge \
__fpending \
secure_getenv \
__secure_getenv \
AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
+have_setns_syscall="yes"
+UL_CHECK_SYSCALL([setns])
+AS_IF([test "x$ul_cv_syscall_setns" = xno], [
+ have_setns_syscall="no"
+])
AC_CHECK_FUNCS([isnan], [],
[AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])]
dnl wide-char ncurses
AC_ARG_WITH([ncursesw],
- AS_HELP_STRING([--with-ncursesw], [build with wide-char ncurses, enabled by default]),
+ AS_HELP_STRING([--without-ncursesw], [do not build with wide-char ncurses]),
[], [with_ncursesw=auto]
)
have_ncursesw=no
dnl non-wide ncurses
AC_ARG_WITH([ncurses],
- AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, disabled by default]),
+ AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses]),
[], [with_ncurses=auto]
)
have_ncurses=no
AC_ARG_WITH([readline],
- AS_HELP_STRING([--with-readline], [compile with GNU Readline support]),
+ AS_HELP_STRING([--without-readline], [do not build with GNU Readline support]),
[], [with_readline=auto]
)
AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes])
AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes])
AS_IF([test "x$build_libmount" = xyes], [
- AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount available.])
+ AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount available.])
+ AS_IF([test "x$have_setns_syscall" = "xyes"], [
+ AC_DEFINE([USE_LIBMOUNT_SUPPORT_NAMESPACES], [1], [Define to 1 if want to support namepaces.])
+ ],[
+ AC_MSG_WARN([libmount will be compiled without namespaces support])
+ ])
])
AC_SUBST([LIBMOUNT_VERSION])
AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.])
])
-
dnl
dnl libsmartcols
dnl
)
UL_BUILD_INIT([nsenter])
UL_REQUIRES_LINUX([nsenter])
-UL_REQUIRES_SYSCALL_CHECK([nsenter], [UL_CHECK_SYSCALL([setns])], [setns])
+UL_REQUIRES_HAVE([nsenter], [setns_syscall], [setns syscall])
AM_CONDITIONAL([BUILD_NSENTER], [test "x$build_nsenter" = xyes])
AC_CHECK_FUNCS([setns])
)
UL_BUILD_INIT([agetty])
UL_REQUIRES_HAVE([agetty], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([agetty], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([agetty], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_AGETTY], [test "x$build_agetty" = xyes])
AS_IF([test "x$have_futimens" = xyes -a "x$have_inotify_init1" = xyes ], [
AC_DEFINE([AGETTY_RELOAD], [1], [Enable agetty --reload feature])
UL_REQUIRES_BUILD([lslogins], [libsmartcols])
UL_REQUIRES_HAVE([lslogins], [shadow_h], [shadow.h header])
UL_REQUIRES_HAVE([lslogins], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([lslogins], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([lslogins], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_LSLOGINS], [test "x$build_lslogins" = xyes])
UL_BUILD_INIT([ipcs])
AM_CONDITIONAL([BUILD_IPCS], [test "x$build_ipcs" = xyes])
+UL_BUILD_INIT([choom], [check])
+UL_REQUIRES_LINUX([choom])
+AM_CONDITIONAL([BUILD_CHOOM], [test "x$build_choom" = xyes])
+
UL_BUILD_INIT([lsipc], [check])
UL_REQUIRES_LINUX([lsipc])
UL_REQUIRES_BUILD([lsipc], [libsmartcols])
)
UL_BUILD_INIT([last])
UL_REQUIRES_HAVE([last], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([last], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([last], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_LAST], [test "x$build_last" = xyes])
)
UL_BUILD_INIT([utmpdump])
UL_REQUIRES_HAVE([utmpdump], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([utmpdump], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([utmpdump], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_UTMPDUMP], [test "x$build_utmpdump" = xyes])
UL_REQUIRES_HAVE([login], [security_pam_appl_h], [PAM header file])
UL_REQUIRES_HAVE([login], [security_pam_misc_h, security_openpam_h], [PAM conversation functions])
UL_REQUIRES_HAVE([login], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([login], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([login], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_LOGIN], [test "x$build_login" = xyes])
AC_ARG_ENABLE([login-chown-vcs],
UL_BUILD_INIT([su])
UL_REQUIRES_HAVE([su], [security_pam_appl_h], [PAM header file])
UL_REQUIRES_HAVE([su], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([su], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([su], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_SU], [test "x$build_su" = xyes])
UL_BUILD_INIT([runuser])
UL_REQUIRES_HAVE([runuser], [security_pam_appl_h], [PAM header file])
UL_REQUIRES_HAVE([runuser], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([runuser], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([runuser], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_RUNUSER], [test "x$build_runuser" = xyes])
)
UL_BUILD_INIT([write])
UL_REQUIRES_HAVE([write], [utmpx_h], [utmpx.h header])
-UL_REQUIRES_HAVE([write], [gnu_utmpx], [GNU utmpx fucntions])
+UL_REQUIRES_HAVE([write], [gnu_utmpx], [GNU utmpx functions])
AM_CONDITIONAL([BUILD_WRITE], [test "x$build_write" = xyes])
AC_ARG_WITH([btrfs],
- AS_HELP_STRING([--with-btrfs], [build with support for btrfs]),
+ AS_HELP_STRING([--without-btrfs], [do not build with btrfs support]),
[], [with_btrfs=check]
)
have_btrfs=no
AC_ARG_WITH([systemd],
- AS_HELP_STRING([--with-systemd], [build with support for systemd]),
+ AS_HELP_STRING([--without-systemd], [do not build with systemd support]),
[], [with_systemd=check]
)
AC_ARG_WITH([systemdsystemunitdir],
- AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd service files]),
- [], [with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`])
-
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [directory for systemd unit files (requires systemd support)]),
+ [], [with_systemdsystemunitdir=check]
+)
+AS_IF([test "x$with_systemdsystemunitdir" = xcheck], [
+ AS_IF([test "x$have_systemd" = xyes], [
+ with_systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
+ ],[
+ with_systemdsystemunitdir=no
+ ])
+])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
])
Bash completions: ${with_bashcompletiondir}
Systemd support: ${have_systemd}
+ Systemd unitdir: ${with_systemdsystemunitdir}
Btrfs support: ${have_btrfs}
Wide-char support: ${build_widechar}