build-sys: use gettext 0.18.3 if possible

We add a little hack for backward compatibility on systems with
older gettext installed

See 0576dbd3 and 81ed13ed.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
build-sys: fix autopoint gettext version fun

We avoid or fix many portability issues.

The first more generic "sort --version-sort" solution was almost
useless anyway because autopoint itself can also only deal with
a few hardcoded versions.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
utmpdump: fix localtime() error handling

If current TZ has no representation of a given time_t then localtime()
would return NULL and break the next strftime().

In practice this happens very likely on systems with 64bit time_t when
parsing broken binary data. Seen on aarch64 (and probably s390) using
our (incompatible) test wtmp data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: merge last/ and utmpdump/ into new utmp/ dir

We want to prepare and simplify utmp sepcific fixes. Beside all this
renaming we also update/add some text data to have it more consistent.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: skip utmpdump tests for exotic archs

We introduce utmp_functions.sh and skip tests if size of utmp struct
does not match our wtmp test data.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: provide missing test data for "last" on exotic archs

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: add utmpdump-circle test (arch independent)

This one is a completely arch independent conversion round:
  text -> bin -> text -> bin

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: split last into dns and nodns subtests

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
tests: skip some last tests if no dns support

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
rename: remove reference to mmv gtom man page

It seems better to not have a reference to the program that is not
available in many cases on usual Linux installation.

Signed-off-by: Karel Zak <kzak@redhat.com>
mount: more hints about default mount options to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
Merge branch 'gettext-version' of https://github.com/rudimeier/util-linux

* 'gettext-version' of https://github.com/rudimeier/util-linux:
  build-sys: fix autopoint gettext version fun
Merge branch 'tests-utmp' of https://github.com/rudimeier/util-linux

* 'tests-utmp' of https://github.com/rudimeier/util-linux:
  tests: skip some last tests if no dns support
  tests: split last into dns and nodns subtests
  tests: add utmpdump-circle test (arch independent)
  tests: provide missing test data for "last" on exotic archs
  tests: skip utmpdump tests for exotic archs
  tests: merge last/ and utmpdump/ into new utmp/ dir
  utmpdump: fix localtime() error handling
Only move shared libraries to /lib if they exists

In several Makemodule.am, there is a install-exec-hook-<library>
target whose role is to move the shared library from /usr/lib to /lib,
while keeping a symbolic link /usr/lib/libuuid.so ->
../../lib/<library>.so.<version>.

However, when util-linux is built with --enable-static
--disable-shared (as is needed on noMMU platforms that don't support
shared libraries), no <library>.so is built, but the
install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so
symbolic link, pointing to ../../lib (yes, the directory). This causes
troubles later one when other libraries/programs are compiled with
-l<library>, as gcc thinks a shared library is available because
there's a file named /usr/lib/<library>.so.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
build-sys: move libsmartcols.so to /lib if they exists

Signed-off-by: Karel Zak <kzak@redhat.com>
build-sys: fix smartcols.pc

Signed-off-by: Karel Zak <kzak@redhat.com>