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
28 lines
775 B
Bash
Executable File
28 lines
775 B
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
|
|
# Parse arguments for compilation (at least for error catching)
|
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
|
|
|
unset COMP_FLAGS LINK_FLAGS
|
|
|
|
# Use readline if available
|
|
if [ -f /usr/include/readline/readline.h ]
|
|
then
|
|
echo " found <readline/readline.h> -- enabling readline support."
|
|
export COMP_FLAGS="-DHAS_READLINE"
|
|
|
|
# readline may require ncurses
|
|
if [ -f /usr/include/ncurses/ncurses.h ]
|
|
then
|
|
echo " found <ncurses/ncurses.h> -- maybe required by readline."
|
|
export LINK_FLAGS="-lreadline -lncurses"
|
|
else
|
|
export LINK_FLAGS="-lreadline"
|
|
fi
|
|
fi
|
|
|
|
wmake $targetType
|
|
|
|
#------------------------------------------------------------------------------
|