client: Fix 'make distcheck' bypassing pkg-config usbdropdir
For some strange reason, 'make distcheck' wants to do a 'make install'
without using DESTDIR. In this case, asking pkg-config for the
various directories as described in the libpcsclite.pc is of course
not working.
Change-Id: I87c68e8d14f8ddb6054178118ff1f96216483f5c
diff --git a/configure.ac b/configure.ac
index 36c469d..26c330b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,13 +69,17 @@
PKG_CHECK_MODULES(OSMOSIMTRACE2, libosmo-simtrace2)
PKG_CHECK_MODULES(USB, libusb-1.0)
- serialconfdir=`pkg-config --variable=serialconfdir libpcsclite`
- AC_SUBST(serialconfdir)
- ifd_dropdir=`pkg-config --variable=usbdropdir libpcsclite`
+ # we cannot use the below command, as 'make distcheck' would fail due to the lack
+ # of ${prefix} being involved :(
+ #ifd_dropdir=`pkg-config --variable=usbdropdir libpcsclite`
+ #serialconfdir=`pkg-config --variable=serialconfdir libpcsclite`
+ ifd_dropdir="${libdir}/pcsc"
+ serialconfdir="${sysconfdir}/reader.conf.d"
# allow user to override the dropdir for the PCSC driver bundle
AC_ARG_WITH(usbdropdir, [--with-usbdropdir PCSC bundle location],
[usbdropdir="${withval}"], [usbdropdir="${ifd_dropdir}"])
AC_SUBST(usbdropdir)
+ AC_SUBST(serialconfdir)
fi
AM_CONDITIONAL(BUILD_CLIENT, test "x$osmo_ac_build_client" = "xyes")
AC_SUBST(BUILD_CLIENT)