]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - configure.ac
agetty: don't put the VC into canonical mode
[thirdparty/util-linux.git] / configure.ac
index a579c8eed78bbb12a2ac47473ea5f993e1888d1b..bddb7bfcf639ecfc0c0ff1d812e8e14b02990e66 100644 (file)
@@ -11,10 +11,11 @@ AC_CONFIG_MACRO_DIR([m4])
 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])
@@ -28,7 +29,7 @@ PACKAGE_VERSION_RELEASE=$(echo $PACKAGE_VERSION | awk -F. '{
 
 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
@@ -69,6 +70,7 @@ AS_CASE([$exec_prefix:$prefix],
    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])  ])
   ]
 )
 
@@ -134,10 +136,15 @@ UL_WARN_ADD([-Wpointer-arith])
 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])
 
@@ -163,7 +170,7 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
     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])
@@ -279,6 +286,16 @@ AC_CHECK_HEADERS([ \
        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>
@@ -305,7 +322,6 @@ AC_CHECK_HEADERS([langinfo.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>
@@ -439,6 +455,9 @@ AC_CHECK_DECL([SO_PASSCRED],
                #include <sys/socket.h>])
 
 AC_CHECK_FUNCS([ \
+       clearenv \
+       __fpurge \
+       fpurge \
        __fpending \
        secure_getenv \
        __secure_getenv \
@@ -501,6 +520,11 @@ AC_CHECK_FUNCS([getusershell], [have_getusershell=yes],[have_getusershell=no])
 
 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"])]
@@ -853,7 +877,7 @@ AS_IF([test "x$with_udev" = xno], [
 
 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
@@ -883,7 +907,7 @@ AS_CASE([$with_ncursesw:$have_ncursesw],
 
 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
@@ -976,7 +1000,7 @@ AS_IF([test "x$have_tinfo" = xyes -o "x$have_tinfow" = xyes], [
 
 
 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]
 )
 
@@ -1065,7 +1089,12 @@ UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifie
 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])
@@ -1084,7 +1113,6 @@ AS_IF([test "x$enable_libmount_support_mtab" = xyes], [
   AC_DEFINE([USE_LIBMOUNT_SUPPORT_MTAB], [1], [Define to 1 if want to support mtab.])
 ])
 
-
 dnl
 dnl libsmartcols
 dnl
@@ -1333,7 +1361,7 @@ AC_ARG_ENABLE([nsenter],
 )
 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])
 
@@ -1377,7 +1405,7 @@ AC_ARG_ENABLE([agetty],
 )
 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])
@@ -1503,7 +1531,7 @@ UL_BUILD_INIT([lslogins])
 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])
 
 
@@ -1654,6 +1682,10 @@ AC_ARG_ENABLE([ipcs],
 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])
@@ -1780,7 +1812,7 @@ AC_ARG_ENABLE([last],
 )
 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])
 
 
@@ -1790,7 +1822,7 @@ AC_ARG_ENABLE([utmpdump],
 )
 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])
 
 
@@ -1903,7 +1935,7 @@ UL_BUILD_INIT([login])
 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],
@@ -1949,7 +1981,7 @@ AC_ARG_ENABLE([su],
 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])
 
 
@@ -1960,7 +1992,7 @@ AC_ARG_ENABLE([runuser],
 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])
 
 
@@ -2075,12 +2107,12 @@ AC_ARG_ENABLE([write],
 )
 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
@@ -2099,7 +2131,7 @@ AM_CONDITIONAL([HAVE_BTRFS], [test "x$have_btrfs" = xyes])
 
 
 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]
 )
 
@@ -2127,9 +2159,16 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$have_systemd" = xyes])
 
 
 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])
 ])
@@ -2385,6 +2424,7 @@ AC_MSG_RESULT([
 
        Bash completions:  ${with_bashcompletiondir}
        Systemd support:   ${have_systemd}
+       Systemd unitdir:   ${with_systemdsystemunitdir}
        Btrfs support:     ${have_btrfs}
        Wide-char support: ${build_widechar}