Skip to content

Commit e64c1e8

Browse files
authored
Use quantlib from the system when available via pkg-config. (#192)
* Use quantlib from the system when available via pkg-config. * Mention src/Makevars.win in ChangeLog.
1 parent c653d16 commit e64c1e8

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2024-03-25 Tomas Kalibera <tomas.kalibera@gmail.com>
2+
3+
* src/Makevars.win: Preferentially use QuantLib from the system if
4+
found via pkg-config (prepare for upcoming Rtools)
5+
16
2025-03-24 Dirk Eddelbuettel <edd@debian.org>
27

38
* DESCRIPTION (Version, Date): New release 0.4.25

src/Makevars.win

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,25 @@
66
# Copyright 2011 Uwe Ligges, Brian Ripley, and Josh Ulrich
77
# Copyright 2018 - 2024 Jeroen Ooms
88

9-
RWINLIB=../windows/quantlib
10-
PKG_CPPFLAGS=-I$(RWINLIB)/include -I../inst/include
11-
PKG_CXXFLAGS=-DBOOST_NO_AUTO_PTR
12-
PKG_LIBS = -L$(RWINLIB)/lib$(R_ARCH) -L$(RWINLIB)/lib -lQuantLib
9+
PKG_CPPFLAGS = $(shell pkg-config --cflags quantlib 2>/dev/null)
10+
PKG_LIBS = $(shell pkg-config --libs quantlib 2>/dev/null)
11+
12+
ifeq ($(PKG_LIBS),)
13+
RWINLIB = ../windows/quantlib
14+
PKG_CPPFLAGS = -I$(RWINLIB)/include
15+
PKG_LIBS = -L$(RWINLIB)/lib$(R_ARCH) -L$(RWINLIB)/lib -lQuantLib
16+
endif
17+
18+
PKG_CPPFLAGS += -I../inst/include
19+
PKG_CXXFLAGS = -DBOOST_NO_AUTO_PTR
1320

1421
all: clean winlibs
1522

1623
clean:
1724
rm -f $(SHLIB) $(OBJECTS)
1825

1926
winlibs:
27+
ifneq ($(RWINLIB),)
2028
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
29+
endif
30+

0 commit comments

Comments
 (0)