]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - configure.ac
libfdisk: remove dependence on libsmartcols
[thirdparty/util-linux.git] / configure.ac
index 6f2b426e675a4e10fe86b8551fe37f7f416b4c07..5b558ec11a27e15f562b1eeb2bdd084e425ef4e9 100644 (file)
@@ -26,7 +26,7 @@ PACKAGE_VERSION_RELEASE=0
 
 dnl libblkid version
 LIBBLKID_VERSION="$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_RELEASE"
-LIBBLKID_DATE="21-Oct-2013"
+LIBBLKID_DATE="22-Jul-2014"
 LIBBLKID_LT_MAJOR=1
 LIBBLKID_LT_MINOR=1
 LIBBLKID_LT_MICRO=0
@@ -80,7 +80,7 @@ usrsbin_execdir='${exec_prefix}/sbin'
 AC_SUBST([usrsbin_execdir])
 
 AS_CASE([$libdir],
- ['${exec_prefix}/'* | '${prefix}/'* | /usr/*],
+ ['${exec_prefix}/'* | '${prefix}/'* | /usr/* | "${prefix}"/* ],
    [usrlib_execdir=$libdir],
  [usrlib_execdir='${exec_prefix}'$libdir]
 )
@@ -116,6 +116,7 @@ UL_WARN_ADD([-Wnested-externs])
 UL_WARN_ADD([-Wpointer-arith])
 UL_WARN_ADD([-Wstrict-prototypes])
 UL_WARN_ADD([-Wformat-security])
+UL_WARN_ADD([-Wimplicit-function-declaration])
 AC_SUBST([WARN_CFLAGS])
 
 UL_WARN_ADD([-Wno-clobbered], [BSD_WARN_CFLAGS])
@@ -152,7 +153,8 @@ UL_SET_ARCH([HPPA], [hppa*])
 
 AC_SYS_LARGEFILE
 
-AM_GNU_GETTEXT_VERSION([0.18])
+dnl Don't forget to maintain alternatively allowed versions in autogen.sh!
+AM_GNU_GETTEXT_VERSION([0.18.3])
 AM_GNU_GETTEXT([external])
 
 AS_IF([test -d "$srcdir/po"], [
@@ -301,6 +303,7 @@ AC_CHECK_FUNCS([ \
        getmntinfo \
        getrlimit \
        inotify_init \
+       inotify_init1 \
        jrand48 \
        lchown \
        llseek \
@@ -323,6 +326,7 @@ AC_CHECK_FUNCS([ \
        strnlen \
        strtoull \
        sysconf \
+       sysinfo \
        updwtmp \
        usleep \
        warn \
@@ -706,7 +710,11 @@ AM_CONDITIONAL([HAVE_SLANG], [test "x$have_slang" = xyes])
 AS_IF([test "x$have_slang" = xyes -o "x$have_ncurses" = xyes], [
        AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, [
                     AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1,
-                              [Define if curses library has the use_default_colors command.])
+                              [Define if curses library has the use_default_colors().])
+       ])
+       AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, [
+                    AC_DEFINE(HAVE_RESIZETERM, 1,
+                              [Define if curses library has the resizeterm().])
        ])
 ])
 
@@ -815,11 +823,11 @@ dnl libfdisk is enabled at all times if possible
 dnl
 UL_BUILD_INIT([libfdisk], [check])
 UL_REQUIRES_BUILD([libfdisk], [libuuid])
-UL_REQUIRES_BUILD([libfdisk], [libsmartcols])
 AM_CONDITIONAL([BUILD_LIBFDISK], [test "x$build_libfdisk" = xyes])
 
 UL_BUILD_INIT([fdisk], [check])
 UL_REQUIRES_BUILD([fdisk], [libfdisk])
+UL_REQUIRES_BUILD([fdisk], [libsmartcols])
 AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes])
 
 
@@ -853,6 +861,14 @@ UL_REQUIRES_LINUX([losetup])
 UL_REQUIRES_BUILD([losetup], [libsmartcols])
 AM_CONDITIONAL([BUILD_LOSETUP], [test "x$build_losetup" = xyes])
 
+AC_ARG_ENABLE([zramctl],
+  AS_HELP_STRING([--disable-zramctl], [do not build zramctl]),
+  [], [UL_DEFAULT_ENABLE([zramctl], [check])]
+)
+UL_BUILD_INIT([zramctl])
+UL_REQUIRES_LINUX([zramctl])
+UL_REQUIRES_BUILD([zramctl], [libsmartcols])
+AM_CONDITIONAL([BUILD_ZRAMCTL], [test "x$build_zramctl" = xyes])
 
 AC_ARG_ENABLE([fsck],
   AS_HELP_STRING([--disable-fsck], [do not build fsck]),
@@ -1187,7 +1203,7 @@ AC_ARG_ENABLE([pivot_root],
   [], [UL_DEFAULT_ENABLE([pivot_root], [check])]
 )
 UL_BUILD_INIT([pivot_root])
-UL_REQUIRES_LINUX([switch_root])
+UL_REQUIRES_LINUX([pivot_root])
 UL_REQUIRES_SYSCALL_CHECK([pivot_root], [UL_CHECK_SYSCALL([pivot_root])])
 AM_CONDITIONAL([BUILD_PIVOT_ROOT], [test "x$build_pivot_root" = xyes])
 
@@ -1287,10 +1303,11 @@ UL_BUILD_INIT([kill])
 UL_REQUIRES_LINUX([kill])
 AM_CONDITIONAL([BUILD_KILL], [test "x$build_kill" = xyes])
 
-
+dnl Don't use UL_DEFAULT_ENABLE() here, deprecated stuff has to be insensitive
+dnl to --enable-all-programs.
 AC_ARG_ENABLE([deprecated-last],
   AS_HELP_STRING([--enable-deprecated-last], [build old deprecated last]),
-  [], [UL_DEFAULT_ENABLE([deprecated_last], [no])]
+  [], [enable_deprecated_last=no]
 )
 UL_BUILD_INIT([deprecated_last])
 AM_CONDITIONAL([BUILD_DEPRECATED_LAST], [test "x$build_deprecated_last" = xyes])
@@ -1322,7 +1339,7 @@ AM_CONDITIONAL([BUILD_LINE], [test "x$build_line" = xyes])
 
 
 AC_ARG_ENABLE([mesg],
-             AS_HELP_STRING([--disable-mesg], [do not build mesg]),
+  AS_HELP_STRING([--disable-mesg], [do not build mesg]),
   [], [UL_DEFAULT_ENABLE([mesg], [yes])]
 )
 UL_BUILD_INIT([mesg])
@@ -1330,7 +1347,7 @@ AM_CONDITIONAL([BUILD_MESG], [test "x$build_mesg" = xyes])
 
 
 AC_ARG_ENABLE([raw],
-             AS_HELP_STRING([--disable-raw], [do not build raw]),
+  AS_HELP_STRING([--disable-raw], [do not build raw]),
   [], [UL_DEFAULT_ENABLE([raw], [check])]
 )
 UL_BUILD_INIT([raw])
@@ -1410,8 +1427,8 @@ 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
+  AS_HELP_STRING([--disable-chsh-only-listed], [chsh: allow shells not in /etc/shells]),
+  [], enable_chsh_only_listed=yes
 )
 
 AS_IF([test "x$enable_chsh_only_listed" = xyes], [
@@ -1647,8 +1664,8 @@ AM_CONDITIONAL([BUILD_BASH_COMPLETION], [test "x$enable_bash_completion" = xyes]
 
 
 AC_ARG_WITH([python],
-  AS_HELP_STRING([--with-python], [generate python bindings, use --with-python={2,3} to force version]),
-  [], [with_python=no]
+  AS_HELP_STRING([--without-python], [do not build python bindings, use --with-python={2,3} to force version]),
+  [], [with_python=check withval=check]
 )
 
 have_python=no
@@ -1657,20 +1674,27 @@ AS_IF([test "x$with_python" != xno], [
   # (minimal version is 2) but if major version is explicitly specified by
   # --with-python=2 or --with-python=3 then we look for PKG module "python2" or
   # "python3".
-  AS_IF([test "x$withval" != xno -a "x$withval" != xyes],
+  AS_IF([test "x$withval" != xno -a "x$withval" != xyes -a "x$withval" != xcheck],
        [pymajor="$withval"; PYTHON=python${pymajor}], [pymajor="2"])
   AM_PATH_PYTHON([$pymajor], [have_python=yes], [have_python=no])
   AS_CASE([$with_python:$have_python],
     [yes:no],
-      [AC_MSG_ERROR([python selected but libpython not found])]
+      [AC_MSG_ERROR([python selected but libpython not found])],
+    [check:no],
+       [AC_MSG_WARN([libpython not found, do not build python bindings])],
+    [*:yes],
+       [PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION])]
   )
-  PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION])
-
-  UL_BUILD_INIT([pylibmount], [check])
-  UL_REQUIRES_HAVE([pylibmount], [python], [libpython])
-  UL_REQUIRES_BUILD([pylibmount], [libmount])
 ])
 
+
+AC_ARG_ENABLE([pylibmount],
+  AS_HELP_STRING([--disable-pylibmount], [do not build pylibmount]),
+  [], [UL_DEFAULT_ENABLE([pylibmount], [check])]
+)
+UL_BUILD_INIT([pylibmount])
+UL_REQUIRES_HAVE([pylibmount], [python], [libpython])
+UL_REQUIRES_BUILD([pylibmount], [libmount])
 AM_CONDITIONAL([BUILD_PYLIBMOUNT], [test "x$build_pylibmount" = "xyes"])
 
 
@@ -1763,6 +1787,12 @@ AC_ARG_VAR([SOLIB_CFLAGS],
 AC_ARG_VAR([SOLIB_LDFLAGS],
           [LDFLAGS used for shared libraries])
 
+AC_ARG_VAR([ADJTIME_PATH],
+          [Path to hwclock adjtime file, default /etc/adjtime])
+AS_IF([test "x$ADJTIME_PATH" = x], [ADJTIME_PATH="/etc/adjtime"])
+AC_DEFINE_UNQUOTED([CONFIG_ADJTIME_PATH], "$ADJTIME_PATH", [Path to hwclock adjtime file])
+
+
 LIBS=""
 
 
@@ -1794,14 +1824,14 @@ AC_MSG_RESULT([
        prefix:            ${prefix}
        exec prefix:       ${exec_prefix}
 
-        localstatedir:     ${localstatedir}
-       bindir:            ${bindir}
+       localstatedir:     ${localstatedir}
+       bindir:            ${bindir}
        sbindir:           ${sbindir}
        libdir:            ${libdir}
        includedir:        ${includedir}
-        usrbin_execdir:    ${usrbin_execdir}
-        usrsbin_execdir:   ${usrsbin_execdir}
-        usrlib_execdir:    ${usrlib_execdir}
+       usrbin_execdir:    ${usrbin_execdir}
+       usrsbin_execdir:   ${usrsbin_execdir}
+       usrlib_execdir:    ${usrlib_execdir}
 
        compiler:          ${CC}
        cflags:            ${CFLAGS}