]> granicus.if.org Git - procps-ng/commitdiff
build-sys: corrected/simplified ncurses support detection
authorJim Warner <james.warner@comcast.net>
Wed, 26 Oct 2011 22:29:48 +0000 (17:29 -0500)
committerSami Kerola <kerolasa@iki.fi>
Tue, 20 Dec 2011 16:30:51 +0000 (17:30 +0100)
configure.ac

index e6ba06b690949b9576e10e2bff360a4e5e477896..a0be092d88d70fbf19635085bc246052fd50e0a0 100644 (file)
@@ -113,19 +113,13 @@ dnl else
 dnl    ALL_LINGUAS="af am ar as be bg bn_IN bn ca cs cy da de el en_GB es et eu_ES fa fi fr gl gu he hi hr hu hy id is it ja ka kn ko ku lo lt lv mk ml mr ms my nb nl nn no nso or pa pl pt_BR pt ro ru si sk sl sq sr@Latn sr sv ta te th tr uk ur vi zh_CN zh_TW zu"
 dnl fi
 
-dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1]))
-dnl The VARSUFFIX is optional and overrides the default behaviour. For example:
-dnl     UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX
-dnl     UTIL_CHECK_LIB(yyy, func)      generates have_yyy and HAVE_LIBYYY
-dnl ---------------------------------
-AC_DEFUN([UTIL_CHECK_LIB], [
-  m4_define([suffix], m4_default([$3],$1))
-  [have_]suffix=yes
-  m4_ifdef([$3],
-    [AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])],
-    [AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])])
-  AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes])
-])
+AC_MSG_CHECKING(whether program_invocation_short_name is defined)
+AC_TRY_COMPILE([#include <argp.h>],
+               [program_invocation_short_name = "test";],
+               AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME, 1,
+                       [Define if program_invocation_short_name is defined])
+               AC_MSG_RESULT(yes),
+               AC_MSG_RESULT(no))
 
 AC_ARG_WITH([ncurses],
   AS_HELP_STRING([--without-ncurses], [build only applications not needing ncurses]),
@@ -152,9 +146,6 @@ fi
 AC_SUBST([NCURSES_LIBS])
 AC_SUBST([WATCH_NCURSES_LIBS])
 
-usrbin_execdir='${exec_prefix}/usr/bin'
-AC_SUBST([usrbin_execdir])
-
 AC_ARG_ENABLE([kill],
   AS_HELP_STRING([--disable-kill], [do not build kill]),
   [], enable_kill=yes