mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: split up internals of wmake/scripts/have_XXX functions
- adds some more flexibility
This commit is contained in:
committed by
Andrew Heather
parent
c156125669
commit
f8ef85b72f
@ -20,7 +20,7 @@
|
||||
# None
|
||||
#
|
||||
# Functions provided
|
||||
# have_readline, no_readline, echo_readline
|
||||
# have_readline, no_readline, echo_readline, search_readline
|
||||
#
|
||||
# Variables set on success
|
||||
# HAVE_LIBREADLINE - as per GNU autoconf
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Reset variables
|
||||
# Reset
|
||||
no_readline()
|
||||
{
|
||||
unset HAVE_LIBREADLINE READLINE_INC_DIR READLINE_LIB_DIR
|
||||
@ -48,17 +48,18 @@ echo_readline()
|
||||
}
|
||||
|
||||
|
||||
# Search
|
||||
# $1 : prefix (*_ARCH_PATH, system, ...)
|
||||
#
|
||||
# On success, return 0 and export variables
|
||||
# -> HAVE_LIBREADLINE, READLINE_INC_DIR, READLINE_LIB_DIR
|
||||
have_readline()
|
||||
search_readline()
|
||||
{
|
||||
local warn # warn="==> skip readline"
|
||||
local settings
|
||||
|
||||
# Expected location, include/library names
|
||||
local prefix=system
|
||||
local incName="readline/readline.h"
|
||||
local libName="libreadline"
|
||||
|
||||
local prefix="${1:-system}"
|
||||
local header library
|
||||
|
||||
# ----------------------------------
|
||||
@ -104,7 +105,16 @@ have_readline()
|
||||
}
|
||||
|
||||
|
||||
# Reset variables
|
||||
# Output as per search_* function
|
||||
have_readline()
|
||||
{
|
||||
search_readline system
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Reset
|
||||
no_readline
|
||||
|
||||
# Test/query
|
||||
|
||||
Reference in New Issue
Block a user