Avoid useless dependency on libcsv
We don't want to link everything against libvsv. Only bankd needs it.
Change-Id: I288c27611b042fef76101e247b41c7a2f6c7483b
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libosmo-rspro1/usr/lib/x86_64-linux-gnu/libosmo-rspro.so.1.0.0 was not linked against libcsv.so.3 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-server/usr/bin/osmo-remsim-server was not linked against libcsv.so.3 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-client/usr/bin/osmo-remsim-client-shell debian/osmo-remsim-client/usr/bin/osmo-remsim-client-st2 were not linked against libcsv.so.3 (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libifd-osmo-remsim-client0/usr/lib/pcsc/drivers/libifd-osmo-remsim-client.bundle/Contents/Linux/libifd_remsim_client.so.0.0.0 was not linked against libcsv.so.3 (it uses none of the library's symbols)
diff --git a/configure.ac b/configure.ac
index 0ccb0ba..586d7ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,8 +32,9 @@
fi
PKG_PROG_PKG_CONFIG([0.20])
-AC_CHECK_LIB(csv, csv_init, LIBS="$LIBS -lcsv", [AC_MSG_ERROR([*** libcsv library not found!])])
+AC_CHECK_LIB(csv, csv_init, CSV_LIBS="-lcsv", [AC_MSG_ERROR([*** libcsv library not found!])])
AC_CHECK_HEADERS([csv.h])
+AC_SUBST(CSV_LIBS)
PKG_CHECK_MODULES(OSMOCORE, libosmocore >= 1.3.0)
PKG_CHECK_MODULES(OSMOGSM, libosmogsm >= 0.11.0)
diff --git a/src/bankd/Makefile.am b/src/bankd/Makefile.am
index 62ed581..f2afa19 100644
--- a/src/bankd/Makefile.am
+++ b/src/bankd/Makefile.am
@@ -15,7 +15,7 @@
osmo_remsim_bankd_SOURCES = ../slotmap.c ../rspro_client_fsm.c ../debug.c \
bankd_main.c bankd_pcsc.c
osmo_remsim_bankd_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) $(OSMOSIM_LIBS) \
- $(PCSC_LIBS) $(top_builddir)/src/libosmo-rspro.la -lcsv
+ $(PCSC_LIBS) $(CSV_LIBS) $(top_builddir)/src/libosmo-rspro.la
# as suggested in http://lists.gnu.org/archive/html/automake/2009-03/msg00011.html
FORCE: