2011-06-04 22:26:58 +08:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.64])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2011-06-05 01:40:29 +08:00
|
|
|
AC_INIT([procps-ng],
|
2011-12-14 20:10:55 +08:00
|
|
|
[3.3.2],
|
2011-06-04 22:26:58 +08:00
|
|
|
[procps@freelists.org],,[http://gitorious.org/procps])
|
|
|
|
AM_INIT_AUTOMAKE
|
2011-06-05 18:17:14 +08:00
|
|
|
AC_CONFIG_SRCDIR([top.c])
|
2011-06-04 22:26:58 +08:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_GNU_SOURCE
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_MAJOR
|
|
|
|
AC_CHECK_HEADERS([\
|
|
|
|
fcntl.h \
|
|
|
|
langinfo.h \
|
|
|
|
limits.h \
|
|
|
|
locale.h \
|
|
|
|
netinet/in.h \
|
|
|
|
stdlib.h \
|
|
|
|
string.h \
|
|
|
|
sys/file.h \
|
|
|
|
sys/ioctl.h \
|
|
|
|
sys/param.h \
|
|
|
|
sys/time.h \
|
|
|
|
termios.h \
|
|
|
|
unistd.h \
|
|
|
|
utmp.h \
|
|
|
|
values.h \
|
|
|
|
wchar.h \
|
|
|
|
wctype.h
|
|
|
|
])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
2011-09-22 17:10:05 +08:00
|
|
|
AC_HEADER_STDBOOL
|
2011-06-04 22:26:58 +08:00
|
|
|
AC_CHECK_MEMBERS([struct stat.st_rdev])
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_RESTRICT
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_SSIZE_T
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
|
|
|
|
dnl libtool
|
|
|
|
LT_INIT
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_ERROR_AT_LINE
|
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_MBRTOWC
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_STRTOD
|
|
|
|
AC_CHECK_FUNCS([\
|
|
|
|
alarm \
|
|
|
|
getpagesize \
|
|
|
|
gettimeofday \
|
|
|
|
iswprint \
|
|
|
|
memchr \
|
|
|
|
memmove \
|
|
|
|
memset \
|
|
|
|
munmap \
|
|
|
|
nl_langinfo \
|
|
|
|
putenv \
|
|
|
|
regcomp \
|
|
|
|
select \
|
|
|
|
setlocale \
|
|
|
|
strcasecmp \
|
2011-09-22 17:10:05 +08:00
|
|
|
strverscmp \
|
2011-06-04 22:26:58 +08:00
|
|
|
strchr \
|
|
|
|
strcspn \
|
|
|
|
strdup \
|
|
|
|
strerror \
|
|
|
|
strncasecmp \
|
|
|
|
strpbrk \
|
|
|
|
strrchr \
|
|
|
|
strspn \
|
|
|
|
strstr \
|
|
|
|
strtol \
|
|
|
|
strtoul \
|
|
|
|
uname \
|
|
|
|
utmpname \
|
|
|
|
wcwidth
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_ARG_WITH([ncurses],
|
2011-10-26 19:29:44 +08:00
|
|
|
AS_HELP_STRING([--without-ncurses], [build only applications not needing ncurses]),
|
2011-10-27 05:53:55 +08:00
|
|
|
[with_ncurses=no], [with_ncurses=yes]
|
2011-06-04 22:26:58 +08:00
|
|
|
)
|
|
|
|
|
2011-10-27 05:53:55 +08:00
|
|
|
if test "x$with_ncurses" = xno; then
|
|
|
|
AM_CONDITIONAL(WITH_NCURSES, false)
|
|
|
|
else
|
2011-10-30 05:52:46 +08:00
|
|
|
AC_CHECK_LIB(ncurses, initscr, [have_ncurses=yes], [have_ncurses=no])
|
|
|
|
AC_CHECK_HEADERS(curses.h ncurses.h, [], [have_ncurses=no], AC_INCLUDES_DEFAULT)
|
2011-06-04 22:26:58 +08:00
|
|
|
if test "x$have_ncurses" = xno; then
|
2011-10-28 20:30:48 +08:00
|
|
|
AC_MSG_ERROR([ncurses support missing/incomplete (for partial build use --without-ncurses)])
|
2011-06-04 22:26:58 +08:00
|
|
|
fi
|
2011-10-27 05:53:55 +08:00
|
|
|
AM_CONDITIONAL(WITH_NCURSES, true)
|
2011-10-30 05:52:46 +08:00
|
|
|
NCURSES_LIBS="-lncurses"
|
2011-06-04 22:26:58 +08:00
|
|
|
fi
|
|
|
|
AC_SUBST([NCURSES_LIBS])
|
|
|
|
|
2011-10-27 05:53:55 +08:00
|
|
|
usrbin_execdir='${exec_prefix}/usr/bin'
|
|
|
|
AC_SUBST([usrbin_execdir])
|
|
|
|
|
2011-10-05 02:16:46 +08:00
|
|
|
AC_ARG_ENABLE([kill],
|
|
|
|
AS_HELP_STRING([--disable-kill], [do not build kill]),
|
|
|
|
[], enable_kill=yes
|
|
|
|
)
|
|
|
|
AM_CONDITIONAL(BUILD_KILL, test "x$enable_kill" = xyes)
|
2011-12-02 21:32:14 +08:00
|
|
|
AM_CONDITIONAL(LINUX, test "x$host_os" = xlinux-gnu)
|
2011-10-05 02:16:46 +08:00
|
|
|
|
2011-09-29 19:37:52 +08:00
|
|
|
AC_ARG_ENABLE([oomem],
|
|
|
|
AS_HELP_STRING([--enable-oomem], [add out-of-memory fields to the library and top]),
|
|
|
|
[], enable_oomem=no
|
|
|
|
)
|
|
|
|
if test "x$enable_oomem" = xyes; then
|
|
|
|
AC_DEFINE(OOMEM_ENABLE, 1, [add out-of-memory fields to the library and top])
|
|
|
|
fi
|
|
|
|
|
2011-10-05 02:40:19 +08:00
|
|
|
AC_ARG_ENABLE([w-from],
|
|
|
|
AS_HELP_STRING([--enable-w-from], [enable w from field by default]),
|
|
|
|
[], enable_w_from=no
|
|
|
|
)
|
|
|
|
if test "x$enable_w_from" = xyes; then
|
|
|
|
AC_DEFINE(W_SHOWFROM, 1, [enable w from field by default])
|
|
|
|
fi
|
|
|
|
|
2011-12-05 23:35:35 +08:00
|
|
|
AC_ARG_ENABLE([whining],
|
|
|
|
AS_HELP_STRING([--disable-whining], [do not print unnessary warnings (slackware-ism)]),
|
|
|
|
[], enable_whining=yes
|
|
|
|
)
|
|
|
|
if test "x$enable_whining" = xyes; then
|
|
|
|
AC_DEFINE(BUILD_WITH_WHINE, 1, [should extra warnings be printed (slackware-ism)])
|
|
|
|
fi
|
|
|
|
|
2011-11-23 18:44:51 +08:00
|
|
|
if test x"$DEJAGNU" = x
|
|
|
|
then
|
|
|
|
DEJAGNU="\$(top_srcdir)/testsuite/global-conf.exp"
|
|
|
|
fi
|
|
|
|
AC_SUBST(DEJAGNU)
|
|
|
|
|
2011-06-04 22:26:58 +08:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
proc/Makefile
|
2011-12-17 19:35:05 +08:00
|
|
|
proc/libprocfs.pc
|
2011-06-04 22:26:58 +08:00
|
|
|
ps/Makefile
|
2011-11-23 18:44:51 +08:00
|
|
|
testsuite/Makefile
|
2011-06-04 22:26:58 +08:00
|
|
|
])
|
|
|
|
AC_OUTPUT
|