Merge pull request #2788 from stweil/libcurl

Show libcurl version
This commit is contained in:
Egor Pugin 2019-11-28 19:06:47 +03:00 committed by GitHub
commit cbed7dd383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 5 deletions

View File

@ -114,9 +114,7 @@ libtesseract_api_la_CPPFLAGS += -I$(top_srcdir)/src/opencl
libtesseract_api_la_CPPFLAGS += -I$(top_srcdir)/src/textord
libtesseract_api_la_CPPFLAGS += -I$(top_srcdir)/src/viewer
libtesseract_api_la_CPPFLAGS += -I$(top_srcdir)/src/wordrec
if HAVE_LIBCURL
libtesseract_api_la_CPPFLAGS += $(libcurl_CFLAGS) -DHAVE_LIBCURL
endif
libtesseract_api_la_CPPFLAGS += $(libcurl_CFLAGS)
noinst_LTLIBRARIES += libtesseract_api.la

View File

@ -428,6 +428,9 @@ AC_CHECK_TYPES([mbstate_t],,, [#include "wchar.h"])
PKG_CHECK_MODULES([libcurl], [libcurl], [have_libcurl=true], [have_libcurl=false])
AM_CONDITIONAL([HAVE_LIBCURL], $have_libcurl)
if $have_libcurl; then
AC_DEFINE([HAVE_LIBCURL], [1], [Enable libcurl])
fi
PKG_CHECK_MODULES([LEPTONICA], [lept >= 1.74], [have_lept=true], [have_lept=false])
if $have_lept; then
@ -439,7 +442,7 @@ fi
PKG_CHECK_MODULES([libarchive], [libarchive], [have_libarchive=true], [have_libarchive=false])
AM_CONDITIONAL([HAVE_LIBARCHIVE], [$have_libarchive])
if $have_libarchive; then
AC_DEFINE([HAVE_LIBARCHIVE], [], [Enable libarchive])
AC_DEFINE([HAVE_LIBARCHIVE], [1], [Enable libarchive])
CPPFLAGS="$CPPFLAGS $libarchive_CFLAGS"
fi

View File

@ -41,6 +41,9 @@
#if defined(HAVE_LIBARCHIVE)
#include <archive.h>
#endif
#if defined(HAVE_LIBCURL)
#include <curl/curl.h>
#endif
#if defined(_WIN32)
#include <fcntl.h>
@ -148,7 +151,9 @@ static void PrintVersionInfo() {
printf(" Found %s\n", archive_version_string());
# endif // ARCHIVE_VERSION_NUMBER
#endif // HAVE_LIBARCHIVE
#if defined(HAVE_LIBCURL)
printf(" Found %s\n", curl_version());
#endif
}
static void PrintHelpForPSM() {