Fix building against sqlite3

* Explicitly check for sqlite3 at configure stage, remove old include
  dir, fix header inclusion.
* Use configure results for linking instead of hardcoded linker option
  for sqlite.
* Add dependency on -dev package for .deb

Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e
Fixes: OS#1928
This commit is contained in:
Max 2017-01-26 14:57:44 +01:00
parent 1f1cebb2e5
commit 2dee3e996e
7 changed files with 12 additions and 11 deletions

View File

@ -78,7 +78,7 @@ URLEncodeTest_SOURCES = URLEncodeTest.cpp
URLEncodeTest_LDADD = libcommon.la URLEncodeTest_LDADD = libcommon.la
BitVectorTest_SOURCES = BitVectorTest.cpp BitVectorTest_SOURCES = BitVectorTest.cpp
BitVectorTest_LDADD = libcommon.la $(SQLITE_LA) BitVectorTest_LDADD = libcommon.la $(SQLITE3_LIBS)
InterthreadTest_SOURCES = InterthreadTest.cpp InterthreadTest_SOURCES = InterthreadTest.cpp
InterthreadTest_LDADD = libcommon.la InterthreadTest_LDADD = libcommon.la
@ -92,19 +92,19 @@ TimevalTest_SOURCES = TimevalTest.cpp
TimevalTest_LDADD = libcommon.la TimevalTest_LDADD = libcommon.la
VectorTest_SOURCES = VectorTest.cpp VectorTest_SOURCES = VectorTest.cpp
VectorTest_LDADD = libcommon.la $(SQLITE_LA) VectorTest_LDADD = libcommon.la $(SQLITE3_LIBS)
RegexpTest_SOURCES = RegexpTest.cpp RegexpTest_SOURCES = RegexpTest.cpp
RegexpTest_LDADD = libcommon.la RegexpTest_LDADD = libcommon.la
ConfigurationTest_SOURCES = ConfigurationTest.cpp ConfigurationTest_SOURCES = ConfigurationTest.cpp
ConfigurationTest_LDADD = libcommon.la $(SQLITE_LA) ConfigurationTest_LDADD = libcommon.la $(SQLITE3_LIBS)
# ReportingTest_SOURCES = ReportingTest.cpp # ReportingTest_SOURCES = ReportingTest.cpp
# ReportingTest_LDADD = libcommon.la $(SQLITE_LA) # ReportingTest_LDADD = libcommon.la $(SQLITE_LA)
LogTest_SOURCES = LogTest.cpp LogTest_SOURCES = LogTest.cpp
LogTest_LDADD = libcommon.la $(SQLITE_LA) LogTest_LDADD = libcommon.la $(SQLITE3_LIBS)
F16Test_SOURCES = F16Test.cpp F16Test_SOURCES = F16Test.cpp

View File

@ -4,7 +4,7 @@
*/ */
#include "sqlite3.h" #include <sqlite3.h>
#include "sqlite3util.h" #include "sqlite3util.h"
#include <string.h> #include <string.h>

View File

@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common include $(top_srcdir)/Makefile.common
ACLOCAL_AMFLAGS = -I config ACLOCAL_AMFLAGS = -I config
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USB_INCLUDES) $(WITH_INCLUDES) $(SQLITE3_CFLAGS)
AM_CXXFLAGS = -Wall -pthread -ldl AM_CXXFLAGS = -Wall -pthread -ldl
#AM_CXXFLAGS = -Wall -O2 -NDEBUG -pthread -ldl #AM_CXXFLAGS = -Wall -O2 -NDEBUG -pthread -ldl
#AM_CFLAGS = -Wall -O2 -NDEBUG -pthread -ldl #AM_CFLAGS = -Wall -O2 -NDEBUG -pthread -ldl

View File

@ -23,16 +23,13 @@ top_builddir = $(abs_top_builddir)
COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs COMMON_INCLUDEDIR = $(top_srcdir)/CommonLibs
GSM_INCLUDEDIR = $(top_srcdir)/GSM GSM_INCLUDEDIR = $(top_srcdir)/GSM
SQLITE_INCLUDEDIR = $(top_srcdir)/sqlite3
STD_DEFINES_AND_INCLUDES = \ STD_DEFINES_AND_INCLUDES = \
$(SVNDEV) \ $(SVNDEV) \
-I$(COMMON_INCLUDEDIR) \ -I$(COMMON_INCLUDEDIR) \
-I$(GSM_INCLUDEDIR) \ -I$(GSM_INCLUDEDIR)
-I$(SQLITE_INCLUDEDIR)
COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la COMMON_LA = $(top_builddir)/CommonLibs/libcommon.la
GSM_LA = $(top_builddir)/GSM/libGSM.la GSM_LA = $(top_builddir)/GSM/libGSM.la
SQLITE_LA = -lsqlite3
MOSTLYCLEANFILES = *~ MOSTLYCLEANFILES = *~

View File

@ -98,7 +98,7 @@ osmo_trx_LDADD = \
libtransceiver.la \ libtransceiver.la \
$(ARCH_LA) \ $(ARCH_LA) \
$(GSM_LA) \ $(GSM_LA) \
$(COMMON_LA) $(SQLITE_LA) $(COMMON_LA) $(SQLITE3_LIBS)
if USRP1 if USRP1
libtransceiver_la_SOURCES += USRPDevice.cpp libtransceiver_la_SOURCES += USRPDevice.cpp

View File

@ -118,7 +118,10 @@ AM_CONDITIONAL(USRP1, [test "x$with_usrp1" = "xyes"])
AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"])
AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"])
AC_CHECK_LIB(sqlite3, sqlite3_open, , AC_MSG_ERROR(sqlite3 is not available))
PKG_CHECK_MODULES(LIBUSB, libusb-1.0) PKG_CHECK_MODULES(LIBUSB, libusb-1.0)
PKG_CHECK_MODULES(SQLITE3, sqlite3)
AC_CHECK_HEADER([boost/config.hpp],[], AC_CHECK_HEADER([boost/config.hpp],[],
[AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])]) [AC_MSG_ERROR([boost/config.hpp not found, install e.g. libboost-dev])])

1
debian/control vendored
View File

@ -5,6 +5,7 @@ Maintainer: Ivan Klyuchnikov <ivan.kluchnikov@fairwaves.ru>
Build-Depends: debhelper (>= 9), Build-Depends: debhelper (>= 9),
autotools-dev, autotools-dev,
libdbd-sqlite3, libdbd-sqlite3,
libsqlite3-dev,
pkg-config, pkg-config,
dh-autoreconf, dh-autoreconf,
libuhd-dev, libuhd-dev,