Commit Graph

51 Commits

Author SHA1 Message Date
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
Samuli Suominen
62c0cf67f6 fix basic ncurses check
The first check for ncurses is for the non-wide variant, so drop the "w".
The wide version gets checked later on based on watch8bit.

Signed-off-by: Samuli Suominen <ssuominen@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-26 21:16:57 +01:00
Sami Kerola
cac93d35d0 build-sys: use dist-xz
Even as conservative project as coreutils has switched to xz distributions so
neither should we have any reason to use gz and waste space & bandwidth.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-08 23:02:17 +01:00
Sami Kerola
794298b9f9 build-sys: use git version as package version
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-08 21:35:07 +01:00
Craig Small
a99002e3fe Merge branch 'master' into nls
Conflicts:
	configure.ac
	pmap.c
	ps/Makefile.am
2011-12-26 09:11:27 +11:00
Craig Small
2983b30523 Renaming libprocfs to libprocps
The library used to be called libprocps but it was renamed to make sure
there was only one. However the formatting of the library SONAME has
changed so there cannot be any confusion.

libprocps makes it clear that its a library from this project and not a
set of functions directly on the filesystem.
2011-12-23 09:18:43 +11:00
Jim Warner
32a9adbc13 top: provide extensive, generalized nls support
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Jim Warner <james.warner@comcast.net>
2011-12-22 23:48:04 +11:00
Sami Kerola
b40353c91e skill: use rpmatch() to yes/no question
The patch also removes fixed size of input, which can be problematic.
I do not know how long the string `yes' might be in all of the worlds
languages.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:53 +01:00
Sami Kerola
b260b11a3b lib: add strtol into utility library
The utility library is for functions which are shared in commands,
but that does not belong to libproc-ng.  The first function is a
wrapper for strtol that performs error checking, and exists if such
happen.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:52 +01:00
Jim Warner
364325362d build-sys: we don't need wide-ncurses, what were we thinking?
. 1 program uses curses (top)
. 2 programs use ncurses (slabtop, watch)
. all 3 include non-wide <curses.h> or <ncurses.h>
. those 3 do not currently need wide support
. but anticipating nls, we link against libncursesw

This patch ensures an environment consistent with current
and future ncurses needs.
2011-12-20 17:30:52 +01:00
Jim Warner
50fca987cc build-sys: added tabs to AC_CONFIG_FILES for consistency 2011-12-20 17:30:51 +01:00
Jim Warner
326c510e70 build-sys: alphabeticized strverscmp in AC_CHECK_FUNCS 2011-12-20 17:30:51 +01:00
Jim Warner
cb10eb8e18 build-sys: added some missing files to AC_CHECK_HEADERS 2011-12-20 17:30:51 +01:00
Jim Warner
0d48df69a4 build-sys: corrected/simplified ncurses support detection 2011-12-20 17:30:51 +01:00
Sami Kerola
ab3ff3cdab build-sys: add missing files to distribution
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:51 +01:00
Sami Kerola
a220ba6770 build-sys: add NLS support
Add GNU gettext internationalization and localization support.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Craig Small
367b8bb616 Fixed watch 8 bit so its optional
You can make watch 8bit clean by using the configure option
--enable-watch8bit
2011-12-20 22:12:37 +11:00
unknown
fe82a3246a ps: add build option to disable ps option warning
Slackware seems to have this patch, while it is not in use(?) Well,
the upstream procps-ng allows one to disable warnings if that is
wanted. After all having this sort of 'feature' does not cost much,
while lacking it might annoy someone.

A patch from Slackware.

Reference: http://www.ftp.be/packages/slackware/slackware_source/a/procps/procps.nowarning.diff.gz
Backported-by: Sami Kerola <kerolasa@iki.fi>

Conflicts:

	proc/ksym.c
2011-12-18 10:53:44 +11:00
Craig Small
38763ede40 Rename library and use proper versioning
Previously the version of libproc always tracked the version of procps.
This doesn't work when other non-procps programs link to the library as
they are always playing catch up.

This change makes the library version independent of the procps version.
It will only be incremented when needed.
2011-12-17 22:35:05 +11:00
Craig Small
5a991f0444 updated to version 3.3.2 2011-12-14 23:10:55 +11:00
Craig Small
3d807ae853 Minor test fixes for non-linux
procps works well on Linux, on other arches there are some strange
differences due to their emulation of procfs which is not 100%
Disabling checks for non-linux until that can be sorted out.
2011-12-03 00:32:14 +11:00
Craig Small
61dec8f664 Merge remote-tracking branch 'main/master' into testsuite 2011-11-27 22:49:14 +11:00
Craig Small
20463f1a13 vmstat -p <part> works and updated version to 3.3.1
configure.ac now set to 3.3.1
vmstat -p has not worked for a long time, this applies Debian patch
vmstat_part_format, the details:

Author: Daniel Novotny
Description: The contents of /proc/diskstats have changed since 2.6.25
 Changed PATH_MAX to 32 because its missing on hurd
Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=485243
Bug-Debian: http://bugs.debian.org/588677
Last-Update: 2010-11-17
2011-11-27 22:47:17 +11:00
Craig Small
451f6e6111 testsuite fixes 2011-11-23 21:44:51 +11:00
Sami Kerola
64b420936e libproc-ng: add pkg-config support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-05 14:13:40 +01:00
Jim Warner
fadce3f1b2 build-sys: a minimialst approach to ncurses
. 3 pgms require non-wide <curses.h> or <ncurses.h>

This patch represents the tests for a minimal environment
consistent with current ncurses needs.

It should allow a successful configure and build
2011-10-31 22:05:17 +11:00
Jim Warner
8348b4cc97 build-sys: ensure consistent procps-ng ncurses
. 1 program uses curses (top)
. 2 programs use ncurses (slabtop, watch)
. all 3 include non-wide <curses.h> or <ncurses.h>
. those 3 do not currently need wide support
. but anticipating nls, we link against libncursesw

This patch ensures an environment consistent with current
and future ncurses needs.
2011-10-29 09:27:31 +11:00
Craig Small
e4836e08ee ncurses and configure again
Another fix to link properly to ncurses
Some minor top fixes
Added *~ to gitignore because these files crop up sometimes
2011-10-27 08:53:55 +11:00
Craig Small
38e764606d fixed ncurses double linking 2011-10-26 22:29:44 +11:00
Sami Kerola
6d42a58200 build-sys: add --enable-w-from build option
Some distributions apparently want to have w command to print FROM
field by default.

Reported-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-06 21:46:33 +02:00
Sami Kerola
c8b820d04f build-sys: add --disable-kill build option
The kill from procps-ng is not always wanted. For example RedHat
seems to prefer kill from util-linux package.

Reported-by: Jaromir Capik <jcapik@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-06 21:46:33 +02:00
Sami Kerola
367fd902da build-sys: add ./configure --enable-oomem option
Add out-of-memory fields to the library and top.

Refrences:
http://www.freelists.org/post/procps/PATCH-12-Add-missed-oom-support-to-libproc
http://www.freelists.org/post/procps/PATCH-22-Initialize-smp-num-cpus-only-if-really-required

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-29 20:28:31 +02:00
Jim Warner
bf4c442699 build-sys: check strverscmp
This function is a GNU extension.

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-23 05:57:02 +02:00
Jim Warner
655a4b88d1 build-sys: use AC_HEADER_STDBOOL in configure.ac
The AC_CHECK_HEADER_STDBOOL, which was used earlier, requires
autoconf 2.68 (2010-09-22), without great functional benefit in
comparison AC_HEADER_STDBOOL.  The only thing newer macro does is
a problem for many user who has older autoconf in use.

Reference: http://lists.gnu.org/archive/html/autoconf-commit/2011-02/msg00000.html

Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-23 05:57:02 +02:00
Sami Kerola
a425a65d46 build-sys: add contrib directory
Move files that are not compiled to <build-root>/contrib
directory. The files consist two unmaintained commands,
alternative ps & w, and and broken utmp examination / printing
utility. The dummy.c became unnecessary at the point when
autotools where re-introduced.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-05 12:44:35 +02:00
Sami Kerola
71d10d3a49 name change: procps -> procps-ng
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-04 20:50:12 +02:00