summaryrefslogtreecommitdiffstats
path: root/debian/patches/0017-Remove-unused-linking-with-libfl.patch
blob: 6f62b9bf78569a066bb8536a60bb4679bbd54da8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Adrian Bunk <bunk@debian.org>
Date: Thu, 15 Mar 2018 15:55:23 +0200
Subject: Remove unused linking with libfl

Due to the yylex requirement this caused FTBFS
when a shared libfl is provided.

Closes: #893008
---
 Makefile.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 2c8d6f3..2f7e528 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,7 +40,7 @@ CFLAGS=	@CFLAGS@ @CPPFLAGS@ @DEFS@ -DSYSCONFDIR=\"${sysconfdir}\" \
 	-DLOCALDBDIR=\"${localdbdir}\"
 LDFLAGS=@LDFLAGS@
 LIBOBJS=@LIBOBJS@
-LIBS=	@LIBS@ @LEXLIB@
+LIBS=	@LIBS@
 CC=	@CC@
 TARGET=	dhcp6c dhcp6s dhcp6relay dhcp6ctl
 
@@ -63,11 +63,15 @@ RELAYOBJS =	dhcp6relay.o dhcp6relay_script.o common.o timer.o
 CTLOBJS= dhcp6_ctlclient.o base64.o auth.o
 CLEANFILES+=	y.tab.h
 
+# Note: CLIENTLIBS gets overwritten with path to libfl.a for the udeb build
+CLIENTLIBS=@LEXLIB@
+SERVLIBS=  @LEXLIB@
+
 all:	$(TARGET)
 dhcp6c:	$(CLIENTOBJS) $(LIBOBJS)
-	$(CC) $(LDFLAGS) -o dhcp6c $(CLIENTOBJS) $(LIBOBJS) $(LIBS)
+	$(CC) $(LDFLAGS) -o dhcp6c $(CLIENTOBJS) $(LIBOBJS) $(LIBS) $(CLIENTLIBS)
 dhcp6s:	$(SERVOBJS) $(LIBOBJS)
-	$(CC) $(LDFLAGS) -o dhcp6s $(SERVOBJS) $(LIBOBJS) $(LIBS)
+	$(CC) $(LDFLAGS) -o dhcp6s $(SERVOBJS) $(LIBOBJS) $(LIBS) $(SERVLIBS)
 dhcp6relay: $(RELAYOBJS) $(LIBOBJS)
 	$(CC) $(LDFLAGS) -o $@ $(RELAYOBJS) $(LIBOBJS) $(LIBS)
 dhcp6ctl: $(CTLOBJS)