1
1
#! /usr/bin/env bash
2
- # Anticonf (tm) script by Jeroen Ooms (2019 )
2
+ # Anticonf (tm) script by Jeroen Ooms (2020 )
3
3
# This script will query 'pkg-config' for the required cflags and ldflags.
4
4
# If pkg-config is unavailable or does not find the library, try setting
5
5
# INCLUDE_DIR and LIB_DIR manually via e.g:
37
37
if [ $? -eq 0 ]; then
38
38
BREWDIR=` brew --prefix`
39
39
else
40
- curl -sfL " https://jeroen .github.io/autobrew /$PKG_BREW_NAME " > autobrew
40
+ curl -sfL " https://autobrew .github.io/scripts /$PKG_BREW_NAME " > autobrew
41
41
source autobrew
42
42
fi
43
43
PKG_CFLAGS=
" -I$BREWDIR /opt/[email protected] /include -I$BREWDIR /opt/openssl/include"
@@ -55,11 +55,11 @@ CPPFLAGS=`${R_HOME}/bin/R CMD config CPPFLAGS`
55
55
echo " Using PKG_CFLAGS=$PKG_CFLAGS "
56
56
57
57
# Test configuration
58
- ${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E ${PKG_TEST_FILE} > /dev/null 2>&1
58
+ ${CC} ${CPPFLAGS} ${PKG_CFLAGS} ${CFLAGS} -E ${PKG_TEST_FILE} > /dev/null 2> configure.log
59
59
60
60
# Customize the error
61
61
if [ $? -ne 0 ]; then
62
- echo " ------------------------- ANTICONF ERROR ---------------------------"
62
+ echo " --------------------------- [ ANTICONF] ----- ---------------------------"
63
63
echo " Configuration failed because $PKG_CONFIG_NAME was not found. Try installing:"
64
64
echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)"
65
65
echo " * rpm: $PKG_RPM_NAME (Fedora, CentOS, RHEL)"
@@ -69,8 +69,10 @@ if [ $? -ne 0 ]; then
69
69
echo " PATH and PKG_CONFIG_PATH contains a $PKG_CONFIG_NAME .pc file. If pkg-config"
70
70
echo " is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:"
71
71
echo " R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'"
72
+ echo " -------------------------- [ERROR MESSAGE] ---------------------------"
73
+ cat configure.log
72
74
echo " --------------------------------------------------------------------"
73
- exit 1;
75
+ exit 1
74
76
fi
75
77
76
78
# Try to link against the correct OpenSSL version
0 commit comments