Commit Graph

55 Commits

Author SHA1 Message Date
Karel Zak 75cba8d5cd build-sys: use $LIBS rather than LDFLAGS
Fixes: https://github.com/karelzak/util-linux/pull/1349
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-06-18 17:21:13 +02:00
Karel Zak 22a900a90f build-sys: add UL_REQUIRES_PROGRAM() macro, use it for asciidoc
* use our generic UL_BUILD_INIT() stuff for ENABLE_ASCIIDOC
* add UL_REQUIRES_PROGRAM()
* add "Manual pages: yes|no" to ./configure summary

Signed-off-by: Karel Zak <kzak@redhat.com>
2021-04-07 10:19:03 +02:00
Sami Kerola ca27517aae
build-sys: add missing NR underscore to UL_CHECK_SYSCALL()
The unistd.h defines system call numbers with two leading underscores.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2019-11-25 20:33:05 +00:00
Elliott Mitchell 2bb3aa36b2 cleanup: Remove some spurious spaces
Sorry detail-oriented people tend to wipe these out if they notice them.
Add in automated tools and lots of excess end-of-line spaces get wiped
out.

Addresses: https://github.com/karelzak/util-linux/pull/849
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-01 13:01:43 +02:00
Sami Kerola 218b1dd6f9
misc: fix typos [codespell]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2019-09-12 19:41:46 +01:00
Karel Zak c7eca69d6d build-sys: add UL_REQUIRES_ARCH()
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-07-15 15:31:40 +02:00
Karel Zak fbd2d01e23 build-sys: add PKG_INSTALLDIR fallback
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-05-14 15:25:07 +02:00
Ruediger Meier 73afd3f8e8 misc: fix typos using codespell
Some more funny typos, please review carefully.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:12:52 +01:00
Karel Zak ad442a818c build-sys: add libtinfow check
It seems some systems differentiate between tinfo and tinfow. And it
seems that mix ncursesw and tinfo (wide vs. non-wide char) is problem
for the systems.

Note that for example Fedora have ncursesw as well as ncurses, but
only one tinfo library. So, we need fallback this scenario.

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-19 12:55:49 +02:00
Karel Zak 4c12a334dc build-sys: prefer ncurses-config rather than pkg-config
If you have installed:

 ii  libncurses5:i386      5.9+20140913-1+b1  i386   shared libraries for terminal handling
 ii  libncurses5-dev:i386  5.9+20140913-1+b1  i386   developer's libraries for ncurses
 ii  libncursesw5:i386     5.9+20140913-1+b1  i386   shared libraries for terminal handling (wide character support)

then pkg-config blindly follows ncursesw although there are not header
files for this library. It seems better to use pkg-config as fallback
solution only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-31 10:54:21 +02:00
Karel Zak fc72f51e1f build-sys: simplify UL_ENABLE_ALIAS() semantic
Let's follow only $enable_ variables. In this case the MASTERNAME
(e.g. [schedutils] for --enable-schedutils) has to be without
UL_BUILD_INIT.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-21 11:00:19 +01:00
Karel Zak 6f2eb03433 build-sys: fix --disable-all-programs --enable-schedutils
* add UL_ENABLE_ALIAS(NAME, MASTERNAME) to initialize $enable_<name>
  according to MASTERNAME. Note that we have to use $build_<mastername>,
  the $enable_<mastername> is just AC_ARG_ENABLE() stuff only. The
  $build_ is evaluated and modified by our UL_...() functions.

* add enable-schedutils.conf to have build-system regression test for
  this use-case

Addresses: https://github.com/karelzak/util-linux/issues/415
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-20 14:17:37 +01:00
Karel Zak 8623264511 build-sys: cleanup UL_NCURSES_CHECK
* use SUFFIX for upper-case suffix
* use AC_CHECK_TOOL() to search for ncurses-config (thanks to Mike Frysinger)
* separate checks by AS_IF()

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-13 12:41:18 +01:00
Karel Zak 3f7429fd2d build-sys: prefer pkg-config for ncurses
and use ncurses{5,6}-config as fallback only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-12 15:23:53 +01:00
Karel Zak 9d328f82d7 build-sys: fix typo on ncurses-config command line
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-20 17:30:30 +02:00
Karel Zak e5cc93b5a8 build-sys: use ncurses-config rather than pkg-config
It's painful, but ncurses upstream does not distribute .pc files by
default and it seems that ncurses{6,5}-config is the preferred solution.

For better compatibility lets use ncurses-config.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-20 16:52:31 +02:00
Karel Zak 2bd0b84f18 build-sys: add UL_REQUIRES_COMPILE macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-03 13:37:15 +02:00
Karel Zak cce05a2a81 build-sys: fix comments in ul.m4
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-06-03 10:20:03 +02:00
Ruediger Meier 3719bf8de9 build-sys: check linker support for version scripts
The macro AX_CHECK_VSCRIPT was taken from gnu autoconf archive.
http://www.gnu.org/software/autoconf-archive/

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-18 12:53:48 +01:00
Karel Zak f776d76e49 build-sys: use $PKG_CONFIG
Reported-by: Helmut Grohne <helmut@subdivi.de>
References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811546
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-16 10:27:56 +01:00
Karel Zak a7f160f9e1 build-sys: remove AM_CONDITIONAL from UL_CHECK_SYSCALL
Unused, unnecessary, wrong.

Reported-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-02-10 16:59:41 +01:00
Kir Kolyshkin a8afc8c666 build-sys: allow autoconf < 2.64 to be used
Since commit 50d096a macro m4_ifblank is used, but as it is only
available in autoconf-2.64, on CentOS 6 system we end up with:

> $ ./autogen.sh
> configure:25396: error: possibly undefined macro: m4_ifblank
>       If this token and others are legitimate, please use
> m4_pattern_allow.
>       See the Autoconf documentation.
> [root@kir-ovz2 util-linux]# autoconf --version
> autoconf (GNU Autoconf) 2.63

So, the obvious thing to do would be to raise AC_PREREQ to 2.64
in configure.ac. But, given the facts that
 - autoconf 2.64 is not available for RHEL/CentOS 6,
 - the only need is one small macro,
it's better to just add the missing macro.

While at it, add the m4_ifnblank, too.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2015-09-02 18:41:52 -07:00
Ruediger Meier e85e8720d5 build-sys: avoid icc warnings "ignoring unknown option"
Our macro UL_WARN_ADD could not discover these ones:
icc: command line warning #10006: ignoring unknown option '-Wmissing-parameter-type'
icc: command line warning #10006: ignoring unknown option '-Wredundant-decls'
icc: command line warning #10006: ignoring unknown option '-Wunused-result'
icc: command line warning #10006: ignoring unknown option '-Wnested-externs'

We need to use AC_LANG_WERROR.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2015-01-20 15:37:52 +01:00
Benno Schulenberg bdef457d34 build-sys: improve the informative message when not building some util
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-14 15:49:32 +02:00
Karel Zak ee312c654b docs: fix "behaviour" vs. "behavior"
Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-06 09:49:35 +02:00
Karel Zak 56ce2d586d buil-sys: disable in UL_BUILD_INIT() on --disable-all-programs
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-06-02 11:34:21 +02:00
Karel Zak 1ad36b5264 build_sys: fix default estate usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-27 17:22:28 +02:00
Karel Zak b248c9d416 build-sys: fix UL_BUILD_INIT()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-27 14:58:14 +02:00
Karel Zak 50d096acfd build-sys: add UL_DEFAULT_ENABLE() and $ul_default_estate
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-27 11:33:48 +02:00
Karel Zak 62b2c02421 build-sys: add UL_EXCLUDE_ARCH()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 12:57:13 +02:00
Karel Zak 3d9fdac5ea build-sys: add --disable-minix
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-21 12:13:12 +02:00
Karel Zak ad869f9ec5 build-sys: improbe UL_CONFLICT_BUILD macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-12 12:59:22 +02:00
Karel Zak 7697771d8f build-sys: use -Wno-clobbered for some BSD crap
* extend UL_WARN_ADD() for accept non-default CFLAGS variable
 * add BSD_WARN_CFLAGS with -Wno-clobbered
 * use all this for pg(1) and more(1)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-07 09:50:22 +02:00
Karel Zak e1b8ba200b build-sys: fix UL_REQUIRES_HAVE
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 10:19:35 +02:00
Karel Zak 9162682210 build-sys: support list of variables for UL_REQUIRES_HAVE macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-24 19:22:53 +01:00
Karel Zak 4e80697552 build-sys: add -Werror to UL_WARN_ADD test
... so revert previous patches with extra options for clang.

Sometimes is simple solution so obvious that it's invisible :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:42:09 +02:00
Karel Zak 55eec264cc build-sys: add exclude list to UL_ADD_WARN
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:14:04 +02:00
Karel Zak bdf5f542e2 build-sys: add UL_PROG_CLANG function, rename warnings.m4 -> compiler.m4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 15:48:43 +02:00
Karel Zak a9e48470be build-sys: add UL_CONFLICTS_BUILD m4 macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak 0e60bc9b15 build-sys: add compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-06 12:10:41 +02:00
Karel Zak 9ecd720f2c build-sys: fix UL_INIT_BUILD macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-04 14:08:30 +01:00
Karel Zak 61a074f712 build-sys: add UL_BUILD_INIT macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-03 12:32:51 +01:00
Karel Zak b17e82065e build-sys: add UL_REQUIRES_* macros
UL_REQUIRES_{LINUX,BUILD,HAVE} macros check for dependence between
--enable-* state and OS type, another build (e.g. libblkid), function
or library.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-03 12:32:49 +01:00
Karel Zak 132ea94136 build-sys: rename and move macros
- use m4/ul.m4 for util-linux macros
 - use UL_ prefix for all util-linux macros

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-03 12:32:49 +01:00
Sami Kerola ae26618cb2 build-sys: use AC_LANG_SOURCE to suppress warnings
Messages bellow be supressed by using AC_LANG_SOURCE macro around
code test blocks.

m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level
configure.ac:335: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2660: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2677: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2728: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2747: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2030: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2051: AC_CACHE_CHECK is expanded from...
m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level

Reference to documentation;
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html#id1168723648533

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-03-08 13:37:09 +01:00
Karel Zak 4b2ede3ef2 build-sys: use generated libtool-2 stuff
The commit 60a4edd662 temporary disabled
libtool-2 in autogen.sh. It seems that libtool-2 in available in
many distributions now, so we don't have to manage the generated .m4
libtool files in git anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-01-05 13:17:12 +01:00
Karel Zak d7a0158242 build-sys: rewrite TLS detection
* use more robust tls.m4 from gcc project

   The old version (from util-linux-ng) used AC_TRY_COMPILE. That's
   wrong. We need to use AC_RUN_IFELSE to check that the result is
   link-able and executable.

   The new version also test it TLS really works in multi-thread
   applications.

 * we need to detect TLS usability for cross-compiling

 * this new version supports __thread keyword only, it seems that we
   needn't to care about anything other

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-04 15:45:19 +01:00
Karel Zak 38a1717fa1 Revert "build-sys: check for gtk-doc by default"
The gtt-doc.make is not required for "make dist" now. So
gtk-doc is completely optional now.

Let's keep gtk-doc disabled by default.

This reverts commit 57facddbc5.
2009-11-06 23:59:54 +01:00
Karel Zak 57facddbc5 build-sys: check for gtk-doc by default
This patch add "check|yes|no" concept for --{disable,enable}-gtk-doc
configure option. (We use the same concept for many u-l-ng compile
options.)

The gtk-doc is required for "make dist" (not sure if this is good
idea..), so it makes sense to enable gtk-doc by default.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-06 02:04:41 +01:00
Karel Zak a77bfc3a00 build-sys: clean up gtk-doc usage
Currently gtk-doc is optional. Unfortunately, the ./configure script
still depends on GTK_DOC_CHECK macro and shlibs/blkid/docs/Makefile.am
depends on gtk-doc.make.

It seems that the best solution is to add gtk-doc.[make,m4] files to
the repository.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-12 15:20:27 +02:00