|
62 | 62 | CXX11CPP=`${R_HOME}/bin/R CMD config CXXCPP` |
63 | 63 | fi |
64 | 64 |
|
65 | | -# Test configuration |
66 | | -echo "Using CXX11CPP: ${CXX11CPP}" |
67 | | -${CXX11CPP} ${CPPFLAGS} ${PKG_CFLAGS} tools/test.cpp >/dev/null 2>configure.log |
68 | | - |
69 | | -# Customize the error |
70 | | -if [ $? -ne 0 ]; then |
71 | | - echo "--------------------------- [ANTICONF] --------------------------------" |
72 | | - echo "Configuration failed to find system libraries. Try installing:" |
73 | | - echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)" |
74 | | - echo " * rpm: $PKG_RPM_NAME (Fedora, CentOS, RHEL)" |
75 | | - echo " * brew: $PKG_BREW_NAME (Mac OSX)" |
76 | | - echo "If the libraries are already installed, check that 'pkg-config' is in your" |
77 | | - echo "PATH and PKG_CONFIG_PATH contains the necessary .pc files. If pkg-config" |
78 | | - echo "is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:" |
79 | | - echo "R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'" |
80 | | - echo "-------------------------- [ERROR MESSAGE] ---------------------------" |
81 | | - cat configure.log |
82 | | - echo "--------------------------------------------------------------------" |
83 | | - exit 1 |
84 | | -fi |
85 | | - |
86 | 65 | # Create a temporary C++ file to test the compatibility with Tesseract |
87 | 66 | cat <<EOF > conftest.cpp |
88 | 67 | #include <tesseract/baseapi.h> |
|
96 | 75 | # Tesseract enforces C++11 |
97 | 76 | if ! ${CXX11} -std=gnu++11 -c conftest.cpp -o conftest.o ${PKG_CFLAGS} |
98 | 77 | then |
99 | | - echo "Tesseract is not compatible with the C++ compiler used by R." |
| 78 | + echo "--------------------------- [ANTICONF] --------------------------------" |
| 79 | + echo "Configuration failed to find system libraries. Try installing:" |
| 80 | + echo " * deb: $PKG_DEB_NAME (Debian, Ubuntu, etc)" |
| 81 | + echo " * rpm: $PKG_RPM_NAME (Fedora, CentOS, RHEL)" |
| 82 | + echo " * brew: $PKG_BREW_NAME (Mac OSX)" |
| 83 | + echo "If the libraries are already installed, check that 'pkg-config' is in your" |
| 84 | + echo "PATH and PKG_CONFIG_PATH contains the necessary .pc files. If pkg-config" |
| 85 | + echo "is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:" |
| 86 | + echo "R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'" |
| 87 | + echo "-------------------------- [ERROR MESSAGE] ---------------------------" |
| 88 | + cat configure.log |
| 89 | + echo "--------------------------------------------------------------------" |
100 | 90 | rm -rf conftest.cpp conftest.o |
101 | 91 | exit 1 |
102 | 92 | else |
103 | | - echo "Tesseract is compatible with the C++ compiler used by R." |
104 | 93 | rm -rf conftest.cpp conftest.o |
105 | 94 | fi |
106 | 95 |
|
|
0 commit comments