Commit Graph

86 Commits

Author SHA1 Message Date
Gustavo Zacarias
58559a5b64 configure.ac: use pkg-config to get ncursesw header location
Don't assume ncursesw headers are in ../usr/include/ncursesw/..
On a pure build/system without legacy ncurses that may not be true.
Since we're using pkg-config let it provide the correct include path.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-08-07 11:36:10 +02:00
Jim Warner
400bbcb059 build sys: update configure.ac for the latest autoscan
Signed-off-by: Jim Warner <james.warner@comcast.net>
2016-07-09 13:23:27 +10:00
Jim Warner
32db4e99a6 library: make sure that the proc_t is now fixed length
The former variable length structure created potential
problems for library users like that referenced below.

We will now parallel the same approach newlib uses for
the configure options --enable-oomem & --with-systemd.
Thus, the --enable-oomem and OOMEM_ENABLE #define have
been eliminated and the --with-systemd option (#define
WITH_SYSTEMD) will hereafter impact one function only.

The proc_t struct itself will now *never* be impacted.

Reference(s):
https://gitlab.com/procps-ng/procps/issues/31

Signed-off-by: Jim Warner <james.warner@comcast.net>
2016-06-07 20:49:30 +10:00
Wayne Porter
eea5e467ae Added Cygwin build support
strverscmp is included to satisfy a dependency in Cygwin.
Excluded utmp and prctl functions that are not supported currently.
2016-03-10 15:04:27 -08:00
Mike Frysinger
1af18812b2 enable transparent large file support
Historically LFS mattered only to open/read large files.  A few programs
here use open/seek, but not generally on files that are large.  However,
LFS also applies to stat which procps does in a bunch of places -- some
filesystems have 64bit inodes and attempts to do a 32bit stat will throw
an error.

Enable transparent LFS everywhere to avoid this.
2016-03-10 22:01:32 +11:00
John Keeping
049e206689 configure.ac: do not check for C++ compiler
We do not have any C++ code, so there is no point in checking for C++
tools in the configure script.

Signed-off-by: John Keeping <john@keeping.me.uk>
2015-08-18 12:05:11 +01:00
Craig Small
5e73c83262 build-sys: Clean up libsystemd in configure
The previous commit got rid of some but not all the library. The
format of it was a little odd with the library being explicitly
defined instead of letting autoconf do it for you.
2015-07-09 23:11:40 +10:00
Craig Small
4e7f42375a build-sys: use merged systemd library
Since systemd 209 released in Feb 2014 three systemd libraries
including systemd-login have been merged. This change merely
checks for, and links to, the new library.

References:
  http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html
  https://bugs.debian.org/731256
2015-07-09 22:12:10 +10:00
Craig Small
1daaac2180 Merge branch 'filbranden/procps-build_sys_cleanup_usrbin'
configure.ac conflict was due to the git url being
changed after the merge request.

Conflicts:
	configure.ac
2015-05-10 15:28:56 +10:00
Craig Small
96dc43d72b Changed git site to gitlab 2015-05-10 14:57:50 +10:00
Filipe Brandenburger
430b559ba2 build-sys: install binaries in bindir (get rid of usrbin_execdir)
The "usrbin_execdir" hack meant to install some binaries in /bin and
others in /usr/bin. However:

- It is very inflexible: not much control on the final directory name
  and it is not possible to get rid of the usr/bin suffix without
  patching the build system.

- It is hard to use: it requires configure to receive --exec_prefix=/
  and other settings do not make much sense. It is not very obvious that
  that setting needs to be passed and it takes a while to figure it out.

- It produces garbage with the default setup: the default prefix of
  /usr/local ends up installing the binaries under /usr/local/usr/bin
  which does not make any sense.

Furthermore, the requirement to split binaries in /bin and /usr/bin is
not that strong since some distributions adopted the /usr merge and so
would agree to just deploy all binaries to /usr/bin directly.

Distributions that would still like to split /bin from /usr/bin should
actually move binaries such as `ps` and `kill` to /bin after the install
of procps-ng is complete. After all, they are the ones responsible for
determining what are the binaries that need to be in the root partition
and that list depends on their early boot init scripts, so it is
possible that the list must be augmented with other binaries from this
package.

Therefore, I propose here to get rid of that hack and simply install all
the binaries to bindir instead, which solves the problems described
above and simplifies the build and install of procps-ng.

Tested that it builds and both `make check` and `make distcheck` work.

Tested that `make install` works and produces the expected tree, the
only difference being the absence of the bogus /usr/local/usr/bin
directory and now all binaries are merged into /usr/local/bin as
expected.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-05-01 23:27:23 -07:00
Filipe Brandenburger
edd66515ef build-sys: enable "subdir-objects" automake option
Otherwise, automake 1.14 will warn that this option will become the
default in an upcoming release, which will cause problems for the
procps-ng build.

Now that the automake rules were merged in the top level Makefile.am,
it is possible to enable "subdir-objects" without breaking the build or
the dist.

Tested that it builds and both `make check` and `make distcheck` work.

Tested that `make install` works and produces the same tree before and
after this change. Confirmed that binaries are also placed in the same
locations in the build tree.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-05-01 23:19:51 -07:00
Filipe Brandenburger
c1c73c0d00 build-sys: merge automake subdirs into toplevel
This will be required for subdir-objects, otherwise automake will have
problems with more than one Makefile.am having rules to build the same
files.

Tested that it builds and both `make check` and `make distcheck` work.

Tested `make install` and compared the tree with the one installed
before this commit, both installed the binaries to the same locations.
The binaries are also in the same location in the build tree (for
instance, ps/pscommand is still there.)

Checked the binaries for the correct libraries linked into them. Binary
sizes matched before and after this change.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-05-01 23:19:31 -07:00
Filipe Brandenburger
04d96fe136 build-sys: remove AC_PROG_RANLIB from configure.ac
This suppresses the following warning from libtoolize 2.4.2:

  libtoolize: `AC_PROG_RANLIB' is rendered obsolete by `LT_INIT'

Tested that this does not break the build and that both `make check` and
`make distcheck` continue working as expected.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-05-01 17:15:34 -07:00
Jaromir Capik
d63ef52995 configure.ac: re-enabling the ALL_LINGUAS related checks 2014-09-15 15:30:08 +02:00
Michael Forney
d6a3a3d97e Handle 'none required' result from AC_SEARCH_LIBS 2014-08-28 13:39:22 +02:00
Jim Warner
9d8ad6419f library: generalize then add former 'ps' systemd logic
Signed-off-by: Jim Warner <james.warner@comcast.net>
2014-07-17 13:31:06 +02:00
Jim Warner
8ef6cd91fc top: retire old stale startup defaults in favor of new
For over a decade top has used a startup configuration
mimicking the original redhat top. This decision dates
back to when the forked Sourceforge version was trying
to win over users in battles with that ancient kludge.

Will anybody deny that those defaults are coyote ugly?

Well, it is time that top presented a more modern look
at startup, providing that no saved rcfile exists. But
just in case some distro prefers that old, comfortable
look, there's the '--disable-modern-top' build option.

[ Pssst. With the widened memory fields it turns out ]
[ the 'Mem' default window had become almost useless ]
[ on an 80x24 terminal since %CPU & COMMAND were out ]
[ of view. So some other defaults were tweaked a bit ]
[ whether or not --disable-modern-top was specified. ]

Reference(s)
http://www.freelists.org/post/procps/tops-graph-mode-saga-continues,3

Signed-off-by: Jim Warner <james.warner@comcast.net>
2014-07-01 21:30:46 +10:00
Craig Small
0f8f760307 Manpage translations in Makefiles
The translated manpage generation has moved from scripts to
Makefiles. This asists with conditional building as well, no
need to regenerate the German pgrep man page if both
the original pgrep.1 and man-po/de.po is not changed.

My Makefile-fu fails me on producing a cross-product or double
iteration for languages and man pages. Until that is solved
each man page is explicitly built. No big deal but it doesn't
look elegant in the Makefile. Languages will be picked
up automatically if they are found in man-po, man-po/top or
man-po/ps

The README describes the three-step process for translating
the files, incase I forget or someone else wants to update them.
2014-06-28 23:38:13 +10:00
Lukas Nykryn
d66ed3350e ps: possibility to display slice unit for a process
Library systemd-login offers possibility to display
name of a systemd slice unit for specific pid.

This patch adds output option "slice" which will
show name of systemd slice unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-10-16 15:18:08 +02:00
Jaromir Capik
afe862ebe4 pidof: reimplemented from scratch (replacing sysvinit pidof)
As the sysvinit becomes obsolete, some of the bundled tools
need to find a new home. The procps-ng project seems to be
the most suitable project for adopting the pidof tool.
This commit introduces a redesigned version of pidof
that satisfies the LSB requirements.
In corner cases the behaviour might differ from the former
one as the new version doesn't use any stat(2) calls.
2013-10-10 17:01:48 +02:00
Karel Zak
fd1d13e170 build-sys: add support for silent buils
The automake AM_SILENT_RULES macro is supported since automake 1.11
(which is required for procps). The silent functionality is enabled by
default, you can change it by:

  ./configure --disable-silent-rules
or
   make V=1

Note that make still prints compiler errors, etc.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-13 19:49:01 +02:00
Jim Warner
c43297442c build-sys: correct one AC_ARG_ENABLE() cleanup default
Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-08-13 19:44:10 +02:00
Karel Zak
616e167f81 build-sys: cleanup AC_ARG_ENABLE() usage
* don't duplicate default behavior with [enable_foo=$enableval]
 * don't introduce things like disable_* variables
 * use everywhere the same coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-08-13 19:44:00 +02:00
Jaromir Capik
5f663aee47 ps: making the libselinux support configurable
Previously the libselinux support was present
in the sources, but disabled with a preprocessor
condition (#if 0).
From now the libselinux support can be enabled with
the --enable-libselinux switch available
in the configuration script. That way is more
flexible than local patches modifying the condition
value from 0 to 1.
2013-08-07 17:52:38 +02:00
Gilles Espinasse
f0b7271810 procps-ng testsuite : simplify DEJAGNU workaround
No need to distribute an empty file
/dev/null is enought to silent global config file warning

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2013-05-26 07:32:02 +10:00
Jim Warner
2ede50902f top: provide a build option to change memory precision
When summary & task area memory scaling was introduced
in release 3.3.6, the memory field widths were widened
slightly so unscaled KiB values could be provided more
consistently and scaled values (beyond MiB) could show
3 decimal places of precision. However, some users may
prefer the former widths/precisions for memory fields.

This commit will provide a build time configure option
to return top to those former defaults as a compliment
to a new %CPU & %MEM field precision configure option.

Reference(s):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707648
commit 21e550bc08

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-19 09:40:42 +10:00
Jim Warner
77abe18d01 top: revert %CPU and %MEM precision to former defaults
When summary & task area memory scaling was introduced
in release 3.3.6, the percentage columns were expanded
to provide 3 decimal places of precision. In hindsight
that may have been overkill, making those columns more
of a distraction than useful, with just too much info.

This patch will revert those columns to the former one
decimal place. And as was true, that decimal point may
be sacrificed depending on the number of cpus present.

And, in case anyone might prefer additional precision,
a build option can provide it (--enable-wide-percent).

Reference(s):
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707648
http://www.freelists.org/post/procps/What-happened-to-my-top,1
commit 21e550bc08

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-19 09:40:42 +10:00
Jim Warner
25201bc9fe build-sys: allow a build when libdl.so is truly absent
The earlier commit purporting to allow top to be built
in the absence of that dynamic linking library stopped
just a little short of the truth. So this will fix it.

Reference(s):
commit 5686877cd4

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-11 08:23:52 +10:00
Craig Small
dbe27d3ad1 Updated configure.ac
Been a while since we ran a re-scan over the autotools files. This
change modernises the configure file.  Not a great deal of changes
required to bring us up to date, autoscan doesn't understand our
optional things, which is fine.
2013-05-05 10:07:30 +10:00
Jim Warner
5686877cd4 build-sys: eliminate dependencies for the NUMA support
Oh that poor ol' build system. With this patch it will
have gone through three separate incarnations in terms
of NUMA/Node support. Those 3 iterations consisted of:

1. A 'porridge too hot' where the top numa support was
enabled if it was built in the presence of libnuma and
the numa.h header. But if the numa library wasn't part
of core packages, that would have broken poor old top.

2. A 'porridge too cold' where numa support was off by
default and must have been explicitly enabled when the
./configure script was run. This could have meant that
distros might not distribute a numa-aware procps, even
though their numa library would have been distributed.

3. And this 'porridge' where the top numa support will
become a 'plug-in' feature activated when the presence
of libnuma.so can be verified at runtime. We'll do our
own loading and symbol resolution (with some help from
dlopen in libdl). Thus maintainers' responsibility for
enabling numa support and then satisfying that library
dependency is now an entirely optional --disable-numa.

As Goldilocks might say about our current configure.ac
"Ummm, I think this porridge tastes just about right".

Reference(s):
. 1) too-hot
commit 87ac6383bb
. 2) too-cold
commit 53fd7dd1ed
. original idea from: Dr. Fink <werner@suse.de>
http://www.freelists.org/post/procps/top-NUMA-node-CPU-utilization-support,18

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-05-05 09:12:07 +10:00
Lukas Nykryn
4c1536d5f1 ps: possibility to display machine name for a process
Library systemd-login offers possibility to display
the name of the VM or container which process belongs to.

This patch adds output option "sd_machine" which will
show machine name or "-" when the name can not be determined.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Lukas Nykryn
7ab5d33c5c ps: possibility to display systemd unit for a process
Library systemd-login offers possibility to display
name of a systemd unit file for specific pid. Note that
not all processes are part of a system unit/service
(e.g. user processes, or kernel threads).

This patch adds output option "sd_unit" which will
show name of systemd unit or "-", when process does not
belong to any unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
2013-04-24 09:24:44 +02:00
Jim Warner
53fd7dd1ed build-sys: in top program, enable NUMA/Node extensions
This patch provides the build system support for those
top extensions dealing with the NUMA summary displays.

For providing the initial impetus for this enhancement
I wish to thank Lance Shelton <LShelton@fusionio.com>.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-04-14 22:28:42 +10:00
Jim Warner
87ac6383bb build-sys: in top program, enable NUMA/Node extensions
This patch provides the build system support for those
top extensions dealing with the NUMA summary displays.

For providing the initial impetus for this enhancement
I wish to thank Lance Shelton <LShelton@fusionio.com>.

(everything is perfectly justified plus right margins)
(are completely filled, but of course it must be luck)

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Lance Shelton <LShelton@fusionio.com>
2013-04-14 22:21:41 +10:00
Rainer Müller
838e5d8941 configure: Check for error.h
For portability, check for error.h during configure and define
HAVE_ERROR_H accordingly.

If this header is not available, emulate the functionality of error()
from glibc with an inline wrapper in include/c.h.
2013-03-20 16:32:06 +01:00
Rainer Müller
6df4fc403d configure: Check for stdio_ext.h
For portability, check for stdio_ext.h during configure and define
HAVE_STDIO_EXT_H accordingly.

If the current system does not provide this header, use a fallback for
__fpending(). This definition will not work on all systems as it relies
on internal data structures of libc. A more portable solution should be
preferred, for example by using gnulib.
2013-03-20 16:32:06 +01:00
Rainer Müller
042776e04c configure: check for program_invocation_name
For portabiliy, check for program_invocation_name during configure and
define HAVE_PROGRAM_INVOCATION_NAME accordingly. Use of this symbol is
now enclosed with the appropriate #ifdef block.

The symbol program_invocation_name is only used for error message
handling using error(), so it's safe to omit this if it is not
available.
2013-03-20 16:32:06 +01:00
Jim Warner
cc61198318 build sys: add configure option for impact of SIGWINCH
Reference(s):
http://www.freelists.org/post/procps/top-won-the-sigwinch-war,3
http://www.freelists.org/post/procps/top-won-the-sigwinch-war,5

Signed-off-by: Jim Warner <james.warner@comcast.net>
2013-01-30 10:53:49 +11:00
Sami Kerola
847bf4c0c1 build-sys: configure option --enable-skill did not work
The commit 1462c4e581 had error in
variable name.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-05-07 09:01:10 +02:00
Sami Kerola
2dbb7a6743 build-sys: allow packagers to choose what is installed
Distribution maintainers may not want to use upstream example files
in their procps-ng package.

Reference: http://permalink.gmane.org/gmane.linux.arch.devel/17440
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-05-01 22:47:06 +10:00
Sami Kerola
bb4ae3d933 build-sys: make buildroot compilation work
Fixes the following error in configure stage.

configure: error: cannot run test program while cross compiling

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-17 21:21:20 +02:00
Sami Kerola
be26243f9c build-sys: program_invocation_short_name is defined in errno.h
The autotools check is using argp.h which can be missing in some
environments.

Reference: http://old.nabble.com/-PATCH--argp%3A-fix-program_invocation_name-detection-td30252754.html
Reference: http://lists.linuxtogo.org/pipermail/openembedded-core/2011-June/003772.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-16 20:43:16 +02:00
Sami Kerola
1462c4e581 skill, snice: do not encourage building these utilities
Both skill and snice are are mentioned in manual page to be 'obsolete
and unportable'.  This commit discourages distributors to keep these
commands part of default system.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-16 14:34:21 +01:00
Gilles Espinasse
90c0590b4c build-sys: fix typo
Fix a typo s/unnessary/unnecessary/ in configure --help

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-03-03 18:36:29 +11:00
Sami Kerola
bc3710664c build-sys: require compiler running in C99 mode
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:32:29 +11:00
Craig Small
502a79e02f Merge remote-tracking branch 'sami/to-craig' into sami-merge
Conflicts:
	pgrep.c
	w.c
2012-03-03 13:56:32 +11:00
Jim Warner
42fe8a9f39 build-sys: rename the 'tools' subdirectory to 'misc'
The newer tools/ subdirectory shares a common prefix
with the previously existing top/ subdirectory and
thereby hinders shell command completion.

There was already a minor conflict between testsuite/
and top/.  This patch renames the tools/ subdirecory
to avoid an even greater conflict.

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-02 21:25:38 +11:00
Mike Frysinger
96e86ef1a0 use pkg-config for ncurses by default
Newer ncurses install pkg-config files, so search those first.  If they
aren't found, fall back to existing detection logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:17:00 +01:00
Mike Frysinger
061de22bad fix AC_ARG_WITH(ncurses) handling
The third arg is for "the user has specified some flag", not "the user
has disabled things", so use $withval.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:16:59 +01:00