mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 18:27:20 +02:00
GnuTLS
- Added GnuTLS discovery, linking. - Added '+/-tls' indicator to diagnostics command. - Added libgnutls version number to diagnostics command. - Renamed wcwidth6.c to wcwidth6.cpp, to eliminate a strange build error.
This commit is contained in:
parent
2f4c9b2653
commit
a736568e68
7 changed files with 34 additions and 3 deletions
|
@ -48,10 +48,19 @@ set (PACKAGE_TARNAME "${PACKAGE}")
|
||||||
set (PACKAGE_VERSION "${VERSION}")
|
set (PACKAGE_VERSION "${VERSION}")
|
||||||
set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
set (PACKAGE_STRING "${PACKAGE} ${VERSION}")
|
||||||
|
|
||||||
|
message ("-- Looking for GnuTLS")
|
||||||
|
find_package (GnuTLS)
|
||||||
|
if (GNUTLS_FOUND)
|
||||||
|
message ("-- Found GnuTLS: ${GNUTLS_LIBRARIES}")
|
||||||
|
set (HAVE_LIBGNUTLS true)
|
||||||
|
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR})
|
||||||
|
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${GNUTLS_LIBRARIES})
|
||||||
|
endif (GNUTLS_FOUND)
|
||||||
|
|
||||||
message ("-- Looking for Lua51")
|
message ("-- Looking for Lua51")
|
||||||
find_package (Lua51)
|
find_package (Lua51)
|
||||||
if (LUA51_FOUND)
|
if (LUA51_FOUND)
|
||||||
message ("-- Found Lua51: ${LUA_LIBRARIES}")
|
message ("-- Found Lua51: ${LUA_LIBRARIES}")
|
||||||
set (HAVE_LIBLUA true)
|
set (HAVE_LIBLUA true)
|
||||||
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
|
||||||
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${LUA_LIBRARIES})
|
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${LUA_LIBRARIES})
|
||||||
|
|
|
@ -42,6 +42,9 @@ Override PACKAGE_LANGUAGE, then
|
||||||
#cmakedefine SOLARIS
|
#cmakedefine SOLARIS
|
||||||
#cmakedefine UNKNOWN
|
#cmakedefine UNKNOWN
|
||||||
|
|
||||||
|
/* Found the GnuTLS library */
|
||||||
|
#cmakedefine HAVE_LIBGNUTLS
|
||||||
|
|
||||||
/* Found the lua library */
|
/* Found the lua library */
|
||||||
#cmakedefine HAVE_LIBLUA
|
#cmakedefine HAVE_LIBLUA
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ set (task_SRCS A3.cpp A3.h
|
||||||
text.cpp text.h
|
text.cpp text.h
|
||||||
utf8.cpp utf8.h
|
utf8.cpp utf8.h
|
||||||
util.cpp util.h
|
util.cpp util.h
|
||||||
wcwidth6.c)
|
wcwidth6.cpp)
|
||||||
|
|
||||||
add_library (task STATIC ${task_SRCS})
|
add_library (task STATIC ${task_SRCS})
|
||||||
add_executable (task_executable main.cpp)
|
add_executable (task_executable main.cpp)
|
||||||
|
|
|
@ -46,6 +46,10 @@ extern "C"
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBGNUTLS
|
||||||
|
#include <gnutls/gnutls.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <CmdDiagnostics.h>
|
#include <CmdDiagnostics.h>
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
|
@ -150,6 +154,14 @@ int CmdDiagnostics::execute (std::string& output)
|
||||||
<< "libuuid, no uuid_unparse_lower"
|
<< "libuuid, no uuid_unparse_lower"
|
||||||
#else
|
#else
|
||||||
<< "n/a"
|
<< "n/a"
|
||||||
|
#endif
|
||||||
|
<< "\n";
|
||||||
|
|
||||||
|
out << " libgnutls: "
|
||||||
|
#ifdef HAVE_LIBGNUTLS
|
||||||
|
<< GNUTLS_VERSION
|
||||||
|
#else
|
||||||
|
<< "n/a"
|
||||||
#endif
|
#endif
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
|
|
||||||
|
@ -184,6 +196,12 @@ int CmdDiagnostics::execute (std::string& output)
|
||||||
#else
|
#else
|
||||||
<< " -uuid"
|
<< " -uuid"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBGNUTLS
|
||||||
|
<< " +tls"
|
||||||
|
#else
|
||||||
|
<< " -tls"
|
||||||
|
#endif
|
||||||
<< "\n\n";
|
<< "\n\n";
|
||||||
|
|
||||||
// Config: .taskrc found, readable, writable
|
// Config: .taskrc found, readable, writable
|
||||||
|
|
|
@ -48,7 +48,6 @@ static const char* newline = "\n";
|
||||||
static const char* noline = "";
|
static const char* noline = "";
|
||||||
|
|
||||||
static void replace_positional (std::string&, const std::string&, const std::string&);
|
static void replace_positional (std::string&, const std::string&, const std::string&);
|
||||||
extern "C" int mk_wcwidth (wchar_t);
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
void wrapText (
|
void wrapText (
|
||||||
|
|
|
@ -91,5 +91,7 @@ std::string rightJustifyZero (const int, const int);
|
||||||
std::string rightJustify (const int, const int);
|
std::string rightJustify (const int, const int);
|
||||||
std::string rightJustify (const std::string&, const int);
|
std::string rightJustify (const std::string&, const int);
|
||||||
|
|
||||||
|
int mk_wcwidth (wchar_t);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue