Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for Solaris 10 support #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ else
LIBFILENAMELINK=$(LIBNAME).so
endif

INSTALL?= install
ifeq ((_UNAME_S),SunOs)
INSTALL?= /usr/ucb/install
else
INSTALL?= install
endif
INSTALL_PROGRAM?= $(INSTALL)
INSTALL_DATA?= $(INSTALL) -m 644

Expand Down Expand Up @@ -133,17 +137,17 @@ $(BIN): $(OBJS)

file-check:
@printf "$(MKL_YELLOW)Checking $(LIBNAME) integrity$(MKL_CLR_RESET)\n"
@RET=true ; \
@RET=0 ; \
for f in $(CHECK_FILES) ; do \
printf "%-30s " $$f ; \
if [ -f "$$f" ]; then \
printf "$(MKL_GREEN)OK$(MKL_CLR_RESET)\n" ; \
else \
printf "$(MKL_RED)MISSING$(MKL_CLR_RESET)\n" ; \
RET=false ; \
RET=1 ; \
fi ; \
done ; \
$$RET
exit $$RET


lib-install:
Expand Down
5 changes: 2 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

BASHVER=$(expr ${BASH_VERSINFO[0]} \* 1000 + ${BASH_VERSINFO[1]})

if [ "$BASHVER" -lt 3002 ]; then
echo "ERROR: mklove requires bash version 3.2 or later but you are using $BASH_VERSION ($BASHVER)"
echo " See https://github.com/edenhill/mklove/issues/15"
if [ "$BASHVER" -lt 3000 ]; then
echo "ERROR: mklove requires bash version 3.0 or later but you are using $BASH_VERSION ($BASHVER)"
exit 1
fi

Expand Down
10 changes: 8 additions & 2 deletions modules/configure.base
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,17 @@ function mkl_define_set {
fi

# Define as code, string or integer?
# We need to put the regexes in variables, because starting with
# Bash 3.2, quoting the regex as in [[ "$string" =~ '$regex' ]]
# forced string matching. But prior to 3.2, bash would error out
# on unquoted regexes that contained special characters.
int_re='^[0-9]+([lL]?[lL][dDuU]?)?$'
hex_re='^0x[0-9a-fA-F]+([lL]?[lL][dDuU]?)?$'

if [[ $val == code:* ]]; then
# Code block, copy verbatim without quotes, strip code: prefix
val=${val#code:}
elif [[ ! ( "$val" =~ ^[0-9]+([lL]?[lL][dDuU]?)?$ || \
"$val" =~ ^0x[0-9a-fA-F]+([lL]?[lL][dDuU]?)?$ ) ]]; then
elif [[ ! ( "$val" =~ $int_re || "$val" =~ $hex_re ) ]]; then
# String: quote
val="\"$val\""
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/configure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function checks {
if mkl_command_check ginstall "" ignore "ginstall --version"; then
INSTALL=ginstall
else
INSTALL=install
INSTALL=/usr/ucb/install
fi
else
INSTALL=install
Expand Down