From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH v2] use ncurses-config to find all curses related libs Date: Tue, 29 Nov 2011 13:50:29 +0100 Message-ID: <20111129125029.GA13265@aepfle.de> References: <20111122113507.GA28412@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20111122113507.GA28412@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org After a split of libtinfo from libncurses in openSuSE Factory the tools will not link anymore. In the URL below it was suggested to use 'ncurses-config --libs' to find the correct linker options. But ncurses-config does not exist neither in SLES11 nor in openSuSE. So check for both ncurses5-config and ncurses-config, if the latter happens to exist in other environments. With this change xen-unstable tools build succeeds again in SLES11 and the latest openSuSE development branch. http://lists.opensuse.org/opensuse-packaging/2011-11/msg00055.html Signed-off-by: Olaf Hering diff -r 4319d77f5b3b config/StdGNU.mk --- a/config/StdGNU.mk +++ b/config/StdGNU.mk @@ -67,7 +67,7 @@ XEN_CONFIG_DIR = $(CONFIG_DIR)/xen XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts SOCKET_LIBS = -CURSES_LIBS = -lncurses +CURSES_LIBS ?= $(shell if ! ncurses5-config --libs 2>/dev/null;then if ! ncurses-config --libs 2>/dev/null;then echo -lncurses;fi;fi) PTHREAD_LIBS = -lpthread UTIL_LIBS = -lutil DLOPEN_LIBS = -ldl