Skip to content

Commit

Permalink
Test runtime version on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Oct 21, 2024
1 parent 9bbb16c commit f889643
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ if [ $? -ne 0 ]; then
exit 1
fi

# On MacOS the runtime version can be different from SDK version
if [ `uname` = "Darwin" ] && ${R_HOME}/bin/Rscript tools/testversion.R; then
PKG_CFLAGS="$PKG_CFLAGS -DENABLE_ALL_FEATURES"
fi

# Write to Makevars
sed -e "s|@cflags@|$PKG_CFLAGS|" -e "s|@libs@|$PKG_LIBS|" src/Makevars.in > src/Makevars

Expand Down
2 changes: 1 addition & 1 deletion src/curl-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ SEXP reflist_add(SEXP x, SEXP target);
SEXP reflist_remove(SEXP x, SEXP target);

/* Workaround for CRAN using outdated MacOS11 SDK */
#if defined(__APPLE__) && !defined(HAS_CURL_EASY_OPTION)
#if defined(__APPLE__) && !defined(HAS_CURL_EASY_OPTION) && defined(ENABLE_ALL_FEATURES)
#include "libcurl-options-polyfill.h"
const char *curl_url_strerror(CURLUcode);
#define HAS_CURL_EASY_OPTION 1
Expand Down
3 changes: 3 additions & 0 deletions tools/testversion.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ver <- libcurlVersion()
cat("Curl runtime version", ver, "\n")
q('no', status = (numeric_version(ver) < "7.80"))

0 comments on commit f889643

Please sign in to comment.