configure: Print errors if VPN binaries are not found
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 6 Oct 2011 13:08:10 +0000 (16:08 +0300)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 7 Oct 2011 17:51:02 +0000 (19:51 +0200)
When a VPN has been enabled and its binary is not given
with '--with-<VPN>=PROGRAM', make an additional check
whether AC_PATH_PROG found the binary in question.

configure.ac

index 32b9d19..280e587 100644 (file)
@@ -104,6 +104,9 @@ AC_ARG_ENABLE(openconnect,
 if (test "${enable_openconnect}" != "no"); then
        if (test -z "${path_openconnect}"); then
                AC_PATH_PROG(OPENCONNECT, [openconnect], [], $PATH:/sbin:/usr/sbin)
+               if (test -z "${OPENCONNECT}"); then
+                       AC_MSG_ERROR(openconnect binary not found)
+               fi
        else
                OPENCONNECT="${path_openconnect}"
                AC_SUBST(OPENCONNECT)
@@ -121,6 +124,9 @@ AC_ARG_ENABLE(openvpn,
 if (test "${enable_openvpn}" != "no"); then
        if (test -z "${path_openvpn}"); then
                AC_PATH_PROG(OPENVPN, [openvpn], [], $PATH:/sbin:/usr/sbin)
+               if (test -z "${OPENVPN}"); then
+                       AC_MSG_ERROR(openvpn binary not found)
+               fi
        else
                OPENVPN="${path_openvpn}"
                AC_SUBST(OPENVPN)
@@ -138,6 +144,9 @@ AC_ARG_ENABLE(vpnc,
 if (test "${enable_vpnc}" != "no"); then
        if (test -z "${path_vpnc}"); then
                AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/sbin:/usr/sbin)
+               if (test -z "${VPNC}"); then
+                       AC_MSG_ERROR(vpnc binary not found)
+               fi
        else
                VPNC="${path_vpnc}"
                AC_SUBST(VPNC)