Link to system sqlite3 instead of bundled one.

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -497,10 +497,6 @@ set (wsjt_FSRCS
 # temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit
 set_source_files_properties (lib/slasubs.f PROPERTIES COMPILE_FLAGS -O2)
 
-set (sqlite3_CSRCS
-  vendor/sqlite3/sqlite3.c
-  )
-
 set (wsjt_CSRCS
   lib/sgran.c
   lib/golay24_table.c
@@ -547,7 +543,6 @@ set (all_CXXSRCS
   )
 
 set (all_C_and_CXXSRCS
-  ${sqlite3_CSRCS}
   ${wsjt_CSRCS}
   ${all_CXXSRCS}
   )
@@ -719,6 +714,8 @@ if (WIN32)
   find_package (Qt5AxContainer REQUIRED)
 endif (WIN32)
 
+pkg_check_modules(SQLITE3 sqlite3>=3.26 REQUIRED)
+message (STATUS "SQLITE3_LIBRARIES: ${SQLITE3_LIBRARIES}")
 
 #
 # Library building setup
@@ -1044,7 +1041,6 @@ endif (${OPENMP_FOUND} OR APPLE)
 
 # build the main application
 add_executable (js8call MACOSX_BUNDLE
-  ${sqlite3_CSRCS}
   ${wsjtx_CXXSRCS}
   ${wsjtx_GENUISRCS}
   wsjtx.rc
@@ -1073,7 +1069,7 @@ target_include_directories (js8call PRIV
 if (APPLE)
   target_link_libraries (js8call wsjt_fort wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES})
 else ()
-  target_link_libraries (js8call wsjt_fort_omp wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES})
+  target_link_libraries (js8call wsjt_fort_omp wsjt_cxx wsjt_qt wsjt_qtmm ${hamlib_LIBRARIES} ${FFTW3_LIBRARIES} ${SQLITE3_LIBRARIES})
   if (OpenMP_C_FLAGS)
     set_target_properties (js8call PROPERTIES
       COMPILE_FLAGS "${OpenMP_C_FLAGS}"
--- a/Inbox.h
+++ b/Inbox.h
@@ -10,7 +10,7 @@
 #include <QPair>
 #include <QVariant>
 
-#include "vendor/sqlite3/sqlite3.h"
+#include "sqlite3.h"
 
 #include "Message.h"
 
