fi
AM_CONDITIONAL(DHCLIENT, test "${enable_dhclient}" = "yes")
-AC_PATH_PROG(RESOLVCONF, [resolvconf], [], $PATH:/sbin:/usr/sbin)
+AC_ARG_WITH(resolvconf, AC_HELP_STRING([--with-resolvconf=PROGRAM],
+ [specific location of resolvconf binary]), [path_resolvconf=${withval}])
+
+AC_ARG_ENABLE(RESOLVCONF, AC_HELP_STRING([--enable-resolvconf],
+ [enable resolvconf support]), [enable_resolvconf=${enableval}])
+if (test "${enable_resolvconf}" = "yes"); then
+ if (test -z "${path_resolvconf}"); then
+ AC_PATH_PROG(RESOLVCONF, [resolvconf], [], $PATH:/sbin:/usr/sbin)
+ else
+ UDHCPC="${path_resolvconf}"
+ AC_SUBST(RESOLVCONF)
+ fi
+fi
+AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" = "yes")
AC_ARG_ENABLE(novatel, AC_HELP_STRING([--enable-novatel],
[enable Novatel support]), [enable_novatel=${enableval}])
plugindir = $(libdir)/connman/plugins
-plugin_LTLIBRARIES = ethernet.la bluetooth.la \
- ipv4.la dnsproxy.la resolvconf.la
+plugin_LTLIBRARIES = ethernet.la bluetooth.la ipv4.la dnsproxy.la
if LOOPBACK
plugin_LTLIBRARIES += loopback.la
dnsproxy_la_SOURCES = dnsproxy.c
+if RESOLVCONF
+plugin_LTLIBRARIES += resolvconf.la
+
resolvconf_la_SOURCES = resolvconf.c
resolvconf_la_CFLAGS = @GLIB_CFLAGS@ -DRESOLVCONF=\"@RESOLVCONF@\"
+endif
if POLKIT
plugin_LTLIBRARIES += polkit.la