Skip to content

Commit

Permalink
Update configure{,.ac} once more
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Jul 29, 2024
1 parent 54ed0ae commit 3ad421c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 29 deletions.
34 changes: 20 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3351,21 +3351,27 @@ printf "%s\n" "$as_me: WARNING: RQuantLib requires QuantLib (>= 1.25)." >&2;}
PKG_LIBS="${PKG_LIBS} $pkg_libs"
elif test "`uname`" == "Darwin" ; then
quantlib="https://github.com/autobrew/bundler/releases/download/quantlib-1.31.1/quantlib-1.31.1-universal.tar.xz"
quantlibdir="$PWD/.deps"
mkdir -p $quantlibdir
echo "downloading $quantlib"
curl -sSL "$quantlib" -o quantlib.tar.xz
tar xf quantlib.tar.xz --strip 1 -C "$quantlibdir"
rm quantlib.tar.xz
pkg_cxxflags="-I${quantlibdir}/include"
pkg_libs="-L${quantlibdir}/lib -lQuantLib"
quantlib="https://github.com/autobrew/bundler/releases/download/quantlib-1.31.1/quantlib-1.31.1-universal.tar.xz"
quantlibdir="$PWD/.deps"
mkdir -p $quantlibdir
echo "downloading $quantlib"
curl -sSL "$quantlib" -o quantlib.tar.xz
tar xf quantlib.tar.xz --strip 1 -C "$quantlibdir"
rm quantlib.tar.xz
pkg_cxxflags="-I${quantlibdir}/include"
pkg_libs="-L${quantlibdir}/lib -lQuantLib"
# Same as above
PKG_CXXFLAGS="${PKG_CXXFLAGS} $pkg_cxxflags"
PKG_LIBS="${PKG_LIBS} $pkg_libs"
# Same as above
PKG_CXXFLAGS="${PKG_CXXFLAGS} $pkg_cxxflags"
PKG_LIBS="${PKG_LIBS} $pkg_libs"
# Boost test needs CXXFLAGS set to find Boost headers in macOS tar.xz
CXXFLAGS="$CXXFLAGS $pkg_cxxflags"
LDFLAGS="$LDFLAGS $pkg_libs"
else
as_fn_error $? "Please install QuantLib before trying to build RQuantLib." "$LINENO" 5
Expand Down Expand Up @@ -4636,8 +4642,8 @@ fi
echo "
${PACKAGE_NAME} $PACKAGE_VERSION
================
${PACKAGE_NAME} $PACKAGE_VERSION (using QuantLib ${pkg_version})
======================================
cxxflags: ${PKG_CXXFLAGS}
libs: ${PKG_LIBS}
Expand Down
34 changes: 19 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,23 @@ if test x"${QUANTLIB}" == x"yes" ; then
AC_SUBST([PKG_LIBS],["${PKG_LIBS} $pkg_libs"])

elif test "`uname`" == "Darwin" ; then
quantlib="https://github.com/autobrew/bundler/releases/download/quantlib-1.31.1/quantlib-1.31.1-universal.tar.xz"
quantlibdir="$PWD/.deps"
mkdir -p $quantlibdir
echo "downloading $quantlib"
curl -sSL "$quantlib" -o quantlib.tar.xz
tar xf quantlib.tar.xz --strip 1 -C "$quantlibdir"
rm quantlib.tar.xz
pkg_cxxflags="-I${quantlibdir}/include"
pkg_libs="-L${quantlibdir}/lib -lQuantLib"

# Same as above
AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} $pkg_cxxflags"])
AC_SUBST([PKG_LIBS],["${PKG_LIBS} $pkg_libs"])
quantlib="https://github.com/autobrew/bundler/releases/download/quantlib-1.31.1/quantlib-1.31.1-universal.tar.xz"
quantlibdir="$PWD/.deps"
mkdir -p $quantlibdir
echo "downloading $quantlib"
curl -sSL "$quantlib" -o quantlib.tar.xz
tar xf quantlib.tar.xz --strip 1 -C "$quantlibdir"
rm quantlib.tar.xz
pkg_cxxflags="-I${quantlibdir}/include"
pkg_libs="-L${quantlibdir}/lib -lQuantLib"

# Same as above
AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} $pkg_cxxflags"])
AC_SUBST([PKG_LIBS],["${PKG_LIBS} $pkg_libs"])

# Boost test needs CXXFLAGS set to find Boost headers in macOS tar.xz
CXXFLAGS="$CXXFLAGS $pkg_cxxflags"
LDFLAGS="$LDFLAGS $pkg_libs"

else
AC_MSG_ERROR([Please install QuantLib before trying to build RQuantLib.])
Expand Down Expand Up @@ -175,8 +179,8 @@ AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT

echo "
${PACKAGE_NAME} $PACKAGE_VERSION
================
${PACKAGE_NAME} $PACKAGE_VERSION (using QuantLib ${pkg_version})
======================================

cxxflags: ${PKG_CXXFLAGS}
libs: ${PKG_LIBS}
Expand Down

0 comments on commit 3ad421c

Please sign in to comment.