Skip to content

Commit 16ebeec

Browse files
committed
update configure
1 parent f0cd04d commit 16ebeec

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

configure

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,27 +62,6 @@ else
6262
CXX11CPP=`${R_HOME}/bin/R CMD config CXXCPP`
6363
fi
6464

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-
8665
# Create a temporary C++ file to test the compatibility with Tesseract
8766
cat <<EOF > conftest.cpp
8867
#include <tesseract/baseapi.h>
@@ -96,11 +75,21 @@ EOF
9675
# Tesseract enforces C++11
9776
if ! ${CXX11} -std=gnu++11 -c conftest.cpp -o conftest.o ${PKG_CFLAGS}
9877
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 "--------------------------------------------------------------------"
10090
rm -rf conftest.cpp conftest.o
10191
exit 1
10292
else
103-
echo "Tesseract is compatible with the C++ compiler used by R."
10493
rm -rf conftest.cpp conftest.o
10594
fi
10695

0 commit comments

Comments
 (0)