summaryrefslogtreecommitdiff
path: root/net-misc/dhcpcd/files/dhcpcd-9.1.2-embedded_config.patch
blob: 5401317a2ece06a4a04e5fb0577406f411c8ed65 (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
44
45
46
47
48
49
From 9dc6d4b7c8df8425c9b1e893e86b8463abb2053c Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Mon, 15 Jun 2020 22:04:37 +0100
Subject: configure: Fix fallout with disabling embedded config

---
 configure | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/configure b/configure
index 8398ad69..a3701726 100755
--- a/configure
+++ b/configure
@@ -545,15 +545,6 @@ if [ -z "$AUTH" -o "$AUTH" = yes ]; then
 	echo "SRCS+=		auth.c" >>$CONFIG_MK
 fi
 
-if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
-	echo "$DHCPCD_DEFS will be embedded in dhcpcd itself"
-	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
-else
-	echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR"
-	echo "CPPFLAGS+=	-DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK
-	echo "EMBEDDEDINSTALL=	_embeddedinstall" >>$CONFIG_MK
-fi
-
 if [ -z "$PRIVSEP" ]; then
 	# privilege separation works fine .... except on Solaris
 	case "$OS" in
@@ -665,6 +656,16 @@ EOF
         rm -f _pledge.c _pledge
 fi
 
+# This block needs to be after the compiler test due to embedded quotes.
+if [ -z "$EMBEDDED" -o "$EMBEDDED" = yes ]; then
+	echo "$DHCPCD_DEFS will be embedded in dhcpcd itself"
+	echo "DHCPCD_SRCS+=	dhcpcd-embedded.c" >>$CONFIG_MK
+else
+	echo "$DHCPCD_DEFS will be installed to $LIBEXECDIR"
+	echo "CPPFLAGS+=	-DEMBEDDED_CONFIG=\\\"$LIBEXECDIR/dhcpcd-definitions.conf\\\"" >>$CONFIG_MK
+	echo "EMBEDDEDINSTALL=	_embeddedinstall" >>$CONFIG_MK
+fi
+
 if [ "$OS" = linux ]; then
 	printf "Testing for nl80211 ... "
 	cat <<EOF >_nl80211.c
-- 
cgit v1.2.3