From def44d0d70d706925fb781a9d2b0c1563645bb9d Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 1 Aug 2017 09:48:04 +0100 Subject: [PATCH] setSet: Add ncurses to link-line if available Resolves potential issue linking with readline on systems where readline has ncurses support enabled. Resolves bug-report https://bugs.openfoam.org/view.php?id=2642 --- .../utilities/mesh/manipulation/setSet/Allwmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/applications/utilities/mesh/manipulation/setSet/Allwmake b/applications/utilities/mesh/manipulation/setSet/Allwmake index 49aaea637..ddb23d21d 100755 --- a/applications/utilities/mesh/manipulation/setSet/Allwmake +++ b/applications/utilities/mesh/manipulation/setSet/Allwmake @@ -6,14 +6,20 @@ cd ${0%/*} || exit 1 # Run from this directory unset COMP_FLAGS LINK_FLAGS -# -# use readline if available -# +# Use readline if available if [ -f /usr/include/readline/readline.h ] then echo " found -- enabling readline support." export COMP_FLAGS="-DHAS_READLINE" - export LINK_FLAGS="-lreadline" + + # readline may require ncurses + if [ -f /usr/include/ncurses/ncurses.h ] + then + echo " found -- maybe required by readline." + export LINK_FLAGS="-lreadline -lncurses" + else + export LINK_FLAGS="-lreadline" + fi fi wmake $targetType