Fix building dhcpcd-qt by default if some binaries are not available.
authorRoy Marples <roy@marples.name>
Sun, 3 Sep 2017 17:36:23 +0000 (18:36 +0100)
committerRoy Marples <roy@marples.name>
Sun, 3 Sep 2017 17:36:23 +0000 (18:36 +0100)
configure

index 8eb33742fc9df8a3bee83a20cb9a83a7c45f2cc5..97950e9344916d2e4ddc7ac037bbd2ba2716f12d 100755 (executable)
--- a/configure
+++ b/configure
@@ -417,7 +417,6 @@ if [ -z "$WITH_QT" -o "$WITH_QT" != no ]; then
                fi
        fi
        if [ -x "$QMAKE" ]; then
-               UI="$UI${UI+ }dhcpcd-qt"
                DHCPCD_QT=true
                echo "$QMAKE"
        else
@@ -427,6 +426,18 @@ if [ -z "$WITH_QT" -o "$WITH_QT" != no ]; then
                        exit 1
                fi
        fi
+       if $DHCPCD_QT; then
+               QMAKE_CONFIG="$QMAKE_CONFIG PREFIX=$PREFIX"
+               QMAKE_CONFIG="$QMAKE_CONFIG SYSCONFDIR=$SYSCONFDIR"
+               QMAKE_CONFIG="$QMAKE_CONFIG MANDIR=$MANDIR"
+               if (cd src/dhcpcd-qt; $QMAKE $QMAKE_CONFIG dhcpcd-qt.pro); then
+                       UI="$UI${UI+ }dhcpcd-qt"
+               else
+                       echo "Failed to configure dhcpcd-qt" >&2
+                       [ -n "$WITH_QT" ] && exit 1
+                       DHCPCD_QT=false
+               fi
+       fi
 fi
 
 NOTIFY="$_NOTIFY"
@@ -505,11 +516,3 @@ echo
 
 echo "MKDIR=           \${TOPDIR}/mk" >>$CONFIG_MK
 
-if $DHCPCD_QT; then
-       QMAKE_CONFIG="$QMAKE_CONFIG PREFIX=$PREFIX SYSCONFDIR=$SYSCONFDIR"
-       QMAKE_CONFIG="$QMAKE_CONFIG MANDIR=$MANDIR"
-       if ! (cd src/dhcpcd-qt; $QMAKE $QMAKE_CONFIG dhcpcd-qt.pro); then
-               echo "$0: failed to configure dhcpcd-qt" >&2
-               exit 1
-       fi
-fi