Skip to content

Commit

Permalink
Prepare for libxml2 depending on bcrypt, use pkg-config.
Browse files Browse the repository at this point in the history
  • Loading branch information
kalibera authored and aviator-bot committed Oct 17, 2024
1 parent c0fcec7 commit 97ee8aa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Makevars.ucrt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ LIB_XML ?= $(R_TOOLS_SOFT)
GLPK_HOME ?= $(R_TOOLS_SOFT)
LIB_GMP ?= $(R_TOOLS_SOFT)

PKG_CPPFLAGS = -I"${LIB_XML}/include/libxml2" -I"${LIB_XML}/include" -DLIBXML_STATIC -DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor -Ivendor/io/parsers -Ivendor/mini-gmp \
ifeq (,$(shell pkg-config --version 2>/dev/null))
PKG_CPPFLAGS = -I"${LIB_XML}/include/libxml2" -I"${LIB_XML}/include" -DLIBXML_STATIC
PKG_LIBS = -L"${LIB_XML}/lib" -lxml2 -liconv -lz -lws2_32 -lstdc++ -lglpk -llzma -lbcrypt
else
PKG_CPPFLAGS = $(shell pkg-config --cflags libxml-2.0 glpk)
PKG_LIBS = $(shell pkg-config --libs libxml-2.0 glpk)
endif

PKG_CPPFLAGS += -DUSING_R -I. -Ivendor -Ivendor/cigraph/src -Ivendor/cigraph/include -Ivendor/cigraph/vendor -Ivendor/io/parsers -Ivendor/mini-gmp \
-DNDEBUG -DNTIMER -DNPRINT -DIGRAPH_THREAD_LOCAL= \
-DPRPACK_IGRAPH_SUPPORT \
-DHAVE_GFORTRAN=1 \
-D_GNU_SOURCE=1 \
-DHAVE_LIBXML

PKG_LIBS = -L"${LIB_XML}/lib" -lxml2 -liconv -lz -lws2_32 -lstdc++ \
-lglpk $(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS) -llzma
PKG_LIBS += $(BLAS_LIBS) $(LAPACK_LIBS) $(FLIBS)

OBJECTS=${SOURCES} ${MINIGMPSOURCES}

0 comments on commit 97ee8aa

Please sign in to comment.