From 1d2a7a7a7f3e031e7ef05075d491655de345fc9a Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Tue, 30 Aug 2016 14:24:04 +0200
Subject: Use package-provided jimsh and libjim

---
 Makefile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index 463a11f..4f3634a 100644
--- a/Makefile
+++ b/Makefile
@@ -13,12 +13,8 @@ UDEVDIR     = $(DESTDIR)/lib/udev
 SBINDIR     = $(PREFIX)/sbin
 MANDIR      = $(PREFIX)/share/man/man1
 VPATH       = jimtcl
-HOST_TCL   := $(shell cd jim && ./autosetup/find-tclsh)
-ifeq (,$(findstring jimsh0,$(HOST_TCL)))
-TCL        ?= $(HOST_TCL)
-else
-TCL        ?= /usr/bin/tclsh
-endif
+HOST_TCL   := /usr/bin/jimsh
+TCL        := /usr/bin/jimsh
 JIM_CONFIGURE_OPTS = --disable-lineedit \
 	--with-out-jim-ext="stdlib posix load signal syslog" --prefix=/usr
 
@@ -49,7 +45,7 @@ jim/libjim.a:
 dispatcher-script: usb_modeswitch.tcl
 	sed 's_!/usr/bin/tclsh_!'"$(TCL)"'_' < usb_modeswitch.tcl > usb_modeswitch_dispatcher
 
-dispatcher-shared: jim/libjim.so dispatcher.c usb_modeswitch.string
+dispatcher-shared: dispatcher.c usb_modeswitch.string
 	$(CC) dispatcher.c $(LDFLAGS) -Ljim -ljim -Ijim -o usb_modeswitch_dispatcher $(CFLAGS)
 
 dispatcher-static: jim/libjim.a dispatcher.c usb_modeswitch.string
