From a2a383107cded4e379134c02838c84ca6a0fe2a4 Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Thu, 3 Nov 2022 13:43:45 +0100 Subject: [PATCH] Allow users to override PKG_LIBS and PKG_CFLAGS Closes #149 Closes #122 --- NEWS | 1 + configure | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 06cfe99..209d0e3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ 4.2.2 - Fix a sanitizer error by avoiding a broken API on NodeJS (#152) + - You can override build flags by setting V8_PKG_LIBS / V8_PKG_CFLAGS 4.2.1 - Fix a feature test for NodeJS 18 (#145) diff --git a/configure b/configure index 54146fc..7ca33ab 100755 --- a/configure +++ b/configure @@ -11,6 +11,13 @@ PKG_TEST_HEADER="" PKG_LIBS="-lv8 -lv8_libplatform" PKG_CFLAGS="-I/usr/include/v8 -I/usr/include/v8-3.14" +# Allow users to override PKG_LIBS and PKG_CFLAGS +if [ "$V8_PKG_LIBS" ]; then +PKG_LIBS="$V8_PKG_LIBS" +PKG_CFLAGS="$V8_PKG_CFLAGS" +DISABLE_STATIC_LIBV8=1 +fi + UNAME=`uname` UARCH=`uname -m`