Add option for selecting resolvconf support
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 3 Jan 2009 10:57:07 +0000 (11:57 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 3 Jan 2009 10:57:07 +0000 (11:57 +0100)
bootstrap-configure
configure.ac
plugins/Makefile.am

index c9d8ebe..5abeb4b 100755 (executable)
@@ -20,6 +20,7 @@ fi
                --enable-wifi \
                --enable-udhcp \
                --enable-dhclient \
+               --enable-resolvconf \
                --enable-novatel \
                --enable-huawei \
                --enable-hso \
index 2a4900c..9b70b04 100644 (file)
@@ -86,7 +86,20 @@ if (test "${enable_dhclient}" = "yes"); then
 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}])
index 1d9c85a..4f72e8a 100644 (file)
@@ -1,8 +1,7 @@
 
 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
@@ -66,8 +65,12 @@ endif
 
 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