Skip to content

Commit

Permalink
Release 4.3.9 (#184)
Browse files Browse the repository at this point in the history
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu>
Signed-off-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
Signed-off-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
Co-authored-by: Duncan Ragsdale <88173870+Thistleman@users.noreply.github.com>
Co-authored-by: Alyona Teyber <Ivanova.alyona5@gmail.com>
  • Loading branch information
3 people committed Apr 18, 2024
1 parent 4be9eab commit 8ac7c6d
Show file tree
Hide file tree
Showing 70 changed files with 589,392 additions and 383 deletions.
21 changes: 18 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ while [ $# -gt 0 ]; do
fi
VERIFY="-T 0 --validate"
;;
--ignore )
export MAKEFLAGS="$MAKEFLAGS -i"
;;
--install )
VERIFY="--version=all"
TARGET="$TARGET install"
Expand All @@ -115,9 +118,9 @@ while [ $# -gt 0 ]; do
PROCS=$(echo $1 | cut -f2 -d=)
test "$PROCS" = "--parallel" && PROCS=3
if nproc --help 1>/dev/null 2>&1 ; then
MAKEFLAGS=-j$(($(nproc)*$PROCS))
export MAKEFLAGS="$MAKEFLAGS -j$(($(nproc)*$PROCS))"
elif sysctl -a 1>/dev/null 2>&1 ; then
MAKEFLAGS=-j$(($(sysctl -n hw.ncpu)*$PROCS))
export MAKEFLAGS="$MAKEFLAGS -j$(($(sysctl -n hw.ncpu)*$PROCS))"
else
error "unable to determine the number of available CPUs"
fi
Expand All @@ -136,9 +139,21 @@ while [ $# -gt 0 ]; do
esac
shift 1
done

OS_NAME=$(uname -s)
OS_VERSION=$(uname -r)

if [ "$OS_NAME" = "Darwin" ] && [ "${OS_VERSION%%.*}" -ge 23 ]; then
REQUIRED_AUTOCONF_VERSION="2.72"
TEST_AUTOCONF_VERSION="2.71"
else
REQUIRED_AUTOCONF_VERSION="2.71"
TEST_AUTOCONF_VERSION="2.70"
fi

mkdir -p /usr/local/opt/gridlabd || error "you do not have permission to create /usr/local/opt/gridlabd"
autoconf --version 1>/dev/null 2>&1 || error "autoconf not installed. Did you run setup.sh?"
test "$(autoconf --version 2>/dev/null | head -n 1 | grep -o '[^ ]*$')" = "2.71" || error "autoconf version 2.71 required. Did you run setup.sh?"
test "$(autoconf --version 2>/dev/null | head -n 1 | grep -o '[^ ]*$')" '>' "$TEST_AUTOCONF_VERSION" || error "autoconf version $REQUIRED_AUTOCONF_VERSION or later required. Did you run setup.sh?"
git --version 1>/dev/null 2>&1 || error "you must install git to build GridLAB-D"
test -f $SRCDIR/configure.ac || error "you must build from the source directory where configure.ac is located"
test -f $HOME/.gridlabd/bin/activate || error "$HOME/.gridlabd is not found. Run setup.sh again."
Expand Down
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ m4_define([versionname], sbuild_m4_esyscmd_s([build-aux/version.sh --name]))
m4_define([pkginstall], sbuild_m4_esyscmd_s([build-aux/version.sh --install]))
m4_define([pkgorigin],sbuild_m4_esyscmd_s([git rev-parse --abbrev-ref HEAD]))
# Set minimum autoconf version, cannot be conditional
# Build.sh will handle validation of later version for Darwin 23 and later
AC_PREREQ([2.71])
AC_INIT([pkgname],[pkgversion],[gridlabd@gmail.com],[pkg])
AC_CONFIG_SRCDIR([source/gridlabd.h])
Expand Down Expand Up @@ -527,6 +529,14 @@ AS_IF([test "x$MYSQL" != "xno"],
# Define HAVE_MYSQL
AC_DEFINE([HAVE_MYSQL], [1], [Define when you have MySQL])
# Add brew paths for Darwin systems
AS_CASE([$host_os],
[darwin*], [
BREW_PREFIX=$(brew --prefix)
MYSQL_LDFLAGS="$MYSQL_LDFLAGS -L${BREW_PREFIX}/opt/openssl/lib -L${BREW_PREFIX}/lib"
MYSQL_CPPFLAGS="$MYSQL_CPPFLAGS -I${BREW_PREFIX}/opt/openssl/include -I${BREW_PREFIX}/include"
])
],
[HAVE_MYSQL=no])
Expand Down

0 comments on commit 8ac7c6d

Please sign in to comment.