Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cleanup
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
rm -f src/Makevars
rm -f src/Makevars configure.log autobrew
rm `find src -name *.o`
12 changes: 7 additions & 5 deletions configure
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Anticonf (tm) script by Jeroen Ooms (2019)
# Anticonf (tm) script by Jeroen Ooms (2020)
# This script will query 'pkg-config' for the required cflags and ldflags.
# If pkg-config is unavailable or does not find the library, try setting
# INCLUDE_DIR and LIB_DIR manually via e.g:
Expand Down Expand Up @@ -37,7 +37,7 @@ else
if [ $? -eq 0 ]; then
BREWDIR=`brew --prefix`
else
curl -sfL "https://jeroen.github.io/autobrew/$PKG_BREW_NAME" > autobrew
curl -sfL "https://autobrew.github.io/scripts/$PKG_BREW_NAME" > autobrew
source autobrew
fi
PKG_CFLAGS="-I$BREWDIR/opt/openssl@1.1/include -I$BREWDIR/opt/openssl/include"
Expand All @@ -55,11 +55,11 @@ CPPFLAGS=`${R_HOME}/bin/R CMD config CPPFLAGS`
echo "Using PKG_CFLAGS=$PKG_CFLAGS"

# Test configuration
${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E ${PKG_TEST_FILE} >/dev/null 2>&1
${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E ${PKG_TEST_FILE} >/dev/null 2>configure.log

# Customize the error
if [ $? -ne 0 ]; then
echo "------------------------- ANTICONF ERROR ---------------------------"
echo "--------------------------- [ANTICONF] --------------------------------"
echo "Configuration failed because $PKG_CONFIG_NAME was not found. Try installing:"
echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)"
echo " * rpm: $PKG_RPM_NAME (Fedora, CentOS, RHEL)"
Expand All @@ -69,8 +69,10 @@ if [ $? -ne 0 ]; then
echo "PATH and PKG_CONFIG_PATH contains a $PKG_CONFIG_NAME.pc file. If pkg-config"
echo "is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:"
echo "R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'"
echo "-------------------------- [ERROR MESSAGE] ---------------------------"
cat configure.log
echo "--------------------------------------------------------------------"
exit 1;
exit 1
fi

# Try to link against the correct OpenSSL version
Expand Down