From 941922d66af71154f8f146b32ec3383b92d4b563 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 20 Jul 2026 12:04:26 -0500 Subject: [PATCH] Refresh autoconf files, plus very minor edits to src/Makevars* --- ChangeLog | 9 +++++++++ configure | 19 ++++++++++++++++--- configure.ac | 16 +++++++++++++--- src/Makevars.in | 5 +---- src/Makevars.win | 11 +++++------ 5 files changed, 44 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 69560bcf..0a8ace33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2026-07-20 Dirk Eddelbuettel + + * configure.ac: Refresh version list triggering 'outdated' message; + add test for local compilation using additional flags + * configure: Idem + + * src/Makevars.in: Minor edits to comments + * src/Makevars.win: Idem + 2026-07-14 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll micro release and date diff --git a/configure b/configure index b75df295..0a71501b 100755 --- a/configure +++ b/configure @@ -3375,7 +3375,7 @@ if test x"${QUANTLIB}" = x"yes" ; then printf "%s\n" "$as_me: WARNING: RQuantLib requires QuantLib (>= 1.25)." >&2;} as_fn_error $? "Please upgrade to a current version." "$LINENO" 5 ;; - 1.25.*|1.26*|1.27*|1.28*|1.29*|1.30.*|1.31.*|1.32.*|1.33.*|1.34.*) + 1.25.*|1.26*|1.27*|1.28*|1.29*|1.30.*|1.31.*|1.32.*|1.33.*|1.34.*|1.35.*|1.36.*|1.37.*|1.38.*|1.39.*|1.40.*|1.41.*|1.42.*) echo "checking for suitable QuantLib version... version ${pkg_version} is not the most recent one. Consider upgrading." ;; 1.*) @@ -3383,8 +3383,8 @@ printf "%s\n" "$as_me: WARNING: RQuantLib requires QuantLib (>= 1.25)." >&2;} ;; esac - # now use all these - PKG_CXXFLAGS="${PKG_CXXFLAGS} ${pkg_cxxflags} ${gxx_newer_than_45}" + # now use both + PKG_CXXFLAGS="${PKG_CXXFLAGS} ${pkg_cxxflags}" PKG_LIBS="${PKG_LIBS} $pkg_libs" @@ -3528,6 +3528,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +# Check if building locally +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for .git directory" >&5 +printf %s "checking for .git directory... " >&6; } +if test -d "$srcdir/.git"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, adding extra flags" >&5 +printf "%s\n" "yes, adding extra flags" >&6; } + #AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} "-Wno-nonnull -Wno-maybe-uninitialized"]) +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + # Action if directory is missing +fi + diff --git a/configure.ac b/configure.ac index 799e458d..35a8a70a 100644 --- a/configure.ac +++ b/configure.ac @@ -80,7 +80,7 @@ if test x"${QUANTLIB}" = x"yes" ; then AC_MSG_WARN([RQuantLib requires QuantLib (>= 1.25).]) AC_MSG_ERROR([Please upgrade to a current version.]) ;; - 1.25.*|1.26*|1.27*|1.28*|1.29*|1.30.*|1.31.*|1.32.*|1.33.*|1.34.*) + 1.25.*|1.26*|1.27*|1.28*|1.29*|1.30.*|1.31.*|1.32.*|1.33.*|1.34.*|1.35.*|1.36.*|1.37.*|1.38.*|1.39.*|1.40.*|1.41.*|1.42.*) echo "checking for suitable QuantLib version... version ${pkg_version} is not the most recent one. Consider upgrading." ;; 1.*) @@ -88,8 +88,8 @@ if test x"${QUANTLIB}" = x"yes" ; then ;; esac - # now use all these - AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} ${pkg_cxxflags} ${gxx_newer_than_45}"]) + # now use both + AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} ${pkg_cxxflags}"]) AC_SUBST([PKG_LIBS],["${PKG_LIBS} $pkg_libs"]) elif test "`uname`" = "Darwin" ; then @@ -174,6 +174,16 @@ AC_DEFUN([QL_CHECK_BOOST], ]) QL_CHECK_BOOST +dnl # Check if building locally +dnl AC_MSG_CHECKING([for .git directory]) +dnl if test -d "$srcdir/.git"; then +dnl AC_MSG_RESULT([yes, adding extra flags]) +dnl #AC_SUBST([PKG_CXXFLAGS],["${PKG_CXXFLAGS} "-Wno-nonnull -Wno-maybe-uninitialized"]) +dnl else +dnl AC_MSG_RESULT([no]) +dnl # Action if directory is missing +dnl fi + AC_SUBST(PKG_CXXFLAGS) AC_SUBST(PKG_LIBS) diff --git a/src/Makevars.in b/src/Makevars.in index 29c2ae98..08ca7a20 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -1,10 +1,7 @@ # -*- mode: Makefile -*- # -# Copyright 2008 - 2024 Dirk Eddelbuettel +# Copyright 2008-2026 Dirk Eddelbuettel # See configure.in for how these variables are computed PKG_CXXFLAGS=@PKG_CXXFLAGS@ -I../inst/include -I. $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS=@PKG_LIBS@ $(SHLIB_OPENMP_CXXFLAGS) - -# Use C++14 with QuantLib 1.28 or later -- and the default with R 4.2.* anyway -#CXX_STD=CXX14 diff --git a/src/Makevars.win b/src/Makevars.win index 7eb3e4bc..9d22a397 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,10 +1,10 @@ # -*- mode: Makefile -*- # -# Copyright 2005 - 2006 Dominick Samperi -# Copyright 2005 Uwe Ligges -# Copyright 2008 - 2018 Dirk Eddelbuettel -# Copyright 2011 Uwe Ligges, Brian Ripley, and Josh Ulrich -# Copyright 2018 - 2024 Jeroen Ooms +# Copyright 2005-2006 Dominick Samperi +# Copyright 2005 Uwe Ligges +# Copyright 2008-2018 Dirk Eddelbuettel +# Copyright 2011 Uwe Ligges, Brian Ripley, and Josh Ulrich +# Copyright 2018-2024 Jeroen Ooms PKG_CPPFLAGS = $(shell pkg-config --cflags quantlib 2>/dev/null) PKG_LIBS = $(shell pkg-config --libs quantlib 2>/dev/null) @@ -27,4 +27,3 @@ winlibs: ifneq ($(RWINLIB),) "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" endif -