use libpcsclite.pc's new serialconfdir

This commit is contained in:
Frank Morgner
2013-06-25 01:44:10 +02:00
parent fb4dbe59ba
commit 04efb3588e
2 changed files with 25 additions and 12 deletions

View File

@@ -61,12 +61,12 @@ AC_ARG_ENABLE(serialdropdir,
[serialdropdir="${enableval}"], [serialdropdir=false]) [serialdropdir="${enableval}"], [serialdropdir=false])
if test "${serialdropdir}" = false ; then if test "${serialdropdir}" = false ; then
if test "${prefix}" = NONE ; then if test "${prefix}" = NONE ; then
serialdropdir=`$PKG_CONFIG libpcsclite --variable=usbdropdir`/serial serialdropdir="`$PKG_CONFIG libpcsclite --variable=usbdropdir`/serial"
if test "${serialdropdir}" = "/serial" ; then if test "${serialdropdir}" = "/serial" ; then
AC_MSG_ERROR([use --enable-serialdropdir=DIR]) AC_MSG_ERROR([use --enable-serialdropdir=DIR])
fi fi
else else
serialdropdir=${prefix}`$PKG_CONFIG libpcsclite --variable=usbdropdir`/serial serialdropdir="${prefix}`$PKG_CONFIG libpcsclite --variable=usbdropdir`/serial"
if test "${serialdropdir}" = "${prefix}/serial" ; then if test "${serialdropdir}" = "${prefix}/serial" ; then
AC_MSG_ERROR([use --enable-serialdropdir=DIR]) AC_MSG_ERROR([use --enable-serialdropdir=DIR])
fi fi
@@ -74,11 +74,24 @@ if test "${serialdropdir}" = false ; then
fi fi
# --enable-confdir=DIR # --enable-serialconfdir=DIR
AC_ARG_ENABLE(confdir, AC_ARG_ENABLE(serialconfdir,
AC_HELP_STRING([--enable-confdir=DIR],[directory to install the AC_HELP_STRING([--enable-serialconfdir=DIR],[directory to install the
vpcd configuration (default to pcscd config or /etc/reader.conf.d)]), serial wrapper driver (default to pcscd config or /etc/reader.conf.d)]),
[confdir="${enableval}"], [confdir=/etc/reader.conf.d]) [serialconfdir="${enableval}"], [serialconfdir=false])
if test "${serialconfdir}" = false ; then
if test "${prefix}" = NONE ; then
serialconfdir="`$PKG_CONFIG libpcsclite --variable=serialconfdir`"
if test "${serialconfdir}" = "" ; then
serialconfdir="/etc/reader.conf.d"
fi
else
serialconfdir="${prefix}`$PKG_CONFIG libpcsclite --variable=serialconfdir`"
if test "${serialconfdir}" = "${prefix}" ; then
serialconfdir="${prefix}/etc/reader.conf.d"
fi
fi
fi
PACKAGE_SUMMARY="Smart card emulator written in Python" PACKAGE_SUMMARY="Smart card emulator written in Python"
@@ -101,7 +114,7 @@ AC_SUBST(BUNDLE_HOST)
AC_SUBST(DYN_LIB_EXT) AC_SUBST(DYN_LIB_EXT)
AC_SUBST(LIB_PREFIX) AC_SUBST(LIB_PREFIX)
AC_SUBST(serialdropdir) AC_SUBST(serialdropdir)
AC_SUBST(confdir) AC_SUBST(serialconfdir)
case "$host" in case "$host" in
*-*-darwin*) *-*-darwin*)
BUNDLE_HOST="MacOS" BUNDLE_HOST="MacOS"
@@ -145,7 +158,7 @@ ${PACKAGE} has been configured with following options:
Version: ${PACKAGE_VERSION} Version: ${PACKAGE_VERSION}
User binaries: $(eval eval eval echo "${bindir}") User binaries: $(eval eval eval echo "${bindir}")
PC/SC configuration: ${confdir} PC/SC configuration: ${serialconfdir}
Python site-packages: $(eval eval eval echo "${pythondir}") Python site-packages: $(eval eval eval echo "${pythondir}")
Driver directory: ${serialdropdir} Driver directory: ${serialdropdir}

View File

@@ -21,8 +21,8 @@ install_libvpcd: libvpcd.la reader.conf.in
$(LIBTOOL) --mode=install cp .libs/$(VPCD_LIB) $(DESTDIR)$(serialdropdir)/$(VPCD_LIB).$(VERSION) $(LIBTOOL) --mode=install cp .libs/$(VPCD_LIB) $(DESTDIR)$(serialdropdir)/$(VPCD_LIB).$(VERSION)
(cd $(DESTDIR)$(serialdropdir) && \ (cd $(DESTDIR)$(serialdropdir) && \
$(LN_S) -f $(VPCD_LIB).$(VERSION) $(VPCD_LIB)) $(LN_S) -f $(VPCD_LIB).$(VERSION) $(VPCD_LIB))
$(mkinstalldirs) $(DESTDIR)$(confdir) $(mkinstalldirs) $(DESTDIR)$(serialconfdir)
$(do_subst) < $(srcdir)/reader.conf.in > $(DESTDIR)$(confdir)/vpcd $(do_subst) < $(srcdir)/reader.conf.in > $(DESTDIR)$(serialconfdir)/vpcd
uninstall: uninstall_libvpcd uninstall: uninstall_libvpcd
@@ -30,4 +30,4 @@ uninstall: uninstall_libvpcd
uninstall_libvpcd: uninstall_libvpcd:
rm -f $(DESTDIR)$(serialdropdir)/$(VPCD_LIB).$(VERSION) \ rm -f $(DESTDIR)$(serialdropdir)/$(VPCD_LIB).$(VERSION) \
$(DESTDIR)$(serialdropdir)/$(VPCD_LIB) \ $(DESTDIR)$(serialdropdir)/$(VPCD_LIB) \
$(DESTDIR)$(confdir)/vpcd $(DESTDIR)$(serialconfdir)/vpcd