]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
configure: Fix fallout with disabling embedded config
authorRoy Marples <roy@marples.name>
Mon, 15 Jun 2020 21:04:37 +0000 (22:04 +0100)
committerRoy Marples <roy@marples.name>
Mon, 15 Jun 2020 21:04:37 +0000 (22:04 +0100)
configure

index 8398ad6918e72d5df64b4c67bbafce505bcbb5f7..a3701726f3f5b22cd070f873162d6f7a530f902a 100755 (executable)
--- 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