summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-10 09:51:31 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-10 09:54:30 +0100
commitbb06eb9d7c9c048b5297511b329f0029ecbfd9fc (patch)
tree28ff4ed9cf2b128a9702c570d01a4512c6c4bb0f /openbsc
parenta67704753a6328f725d38d61af8bfbe29012fcbc (diff)
meas: Unbreak the build once more
The code assumes that sqlite3.h is in the standard include path. Maybe sqlite3 wasn't installed or resides in a non standard (/usr/local) location? Fix the build as it has been broken since 1st of January.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/configure.ac5
-rw-r--r--openbsc/src/utils/Makefile.am14
2 files changed, 13 insertions, 6 deletions
diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 3e5ae38a4..00d1b70c9 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -88,6 +88,11 @@ found_cdk=yes
AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no)
AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes)
+found_sqlite3=yes
+PKG_CHECK_MODULES(SQLITE3, sqlite3, ,found_sqlite3=no)
+AM_CONDITIONAL(HAVE_SQLITE3, test "$found_sqlite3" = yes)
+AC_SUBST(found_sqlite3)
+
dnl Checks for typedefs, structures and compiler characteristics
diff --git a/openbsc/src/utils/Makefile.am b/openbsc/src/utils/Makefile.am
index 30f787fa5..f6255a0eb 100644
--- a/openbsc/src/utils/Makefile.am
+++ b/openbsc/src/utils/Makefile.am
@@ -1,13 +1,15 @@
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)
-AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS)
+AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) $(SQLITE3_CFLAGS)
AM_LDFLAGS = $(COVERAGE_LDFLAGS)
noinst_HEADERS = meas_db.h
+bin_PROGRAMS = bs11_config isdnsync
+if HAVE_SQLITE3
+bin_PROGRAMS += osmo-meas-pcap2db osmo-meas-udp2db
+endif
if HAVE_LIBCDK
-bin_PROGRAMS = bs11_config isdnsync osmo-meas-pcap2db osmo-meas-udp2db meas_vis
-else
-bin_PROGRAMS = bs11_config isdnsync osmo-meas-pcap2db osmo-meas-udp2db
+bin_PROGRAMS += meas_vis
endif
if BUILD_SMPP
@@ -31,9 +33,9 @@ meas_vis_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lcdk -lncurses
meas_vis_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
osmo_meas_pcap2db_SOURCES = meas_pcap2db.c meas_db.c
-osmo_meas_pcap2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lpcap -lsqlite3
+osmo_meas_pcap2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lpcap $(SQLITE3_LIBS)
osmo_meas_pcap2db_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)
osmo_meas_udp2db_SOURCES = meas_udp2db.c meas_db.c
-osmo_meas_udp2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) -lsqlite3
+osmo_meas_udp2db_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(SQLITE3_LIBS)
osmo_meas_udp2db_CFLAGS = $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS)