DHCLIENT="${path_dhclient}"
AC_SUBST(DHCLIENT)
fi
+ AC_MSG_CHECKING(dhclient major version)
+ version_dhclient=`${DHCLIENT} --version 2>&1 | sed '/^isc-dhclient-*/!d; s///; s/\..*//;q'`
+ AC_MSG_RESULT(${version_dhclient})
+ if (test "${version_dhclient}" = "4"); then
+ AC_DEFINE(HAVE_DHCLIENT_HOSTNAME, 1, [Define to 1 if you have dhclient hostname support.])
+ fi
fi
AM_CONDITIONAL(DHCLIENT, test "${enable_dhclient}" != "no")
AM_CONDITIONAL(DHCLIENT_BUILTIN, test "${enable_dhclient}" = "builtin")
connman_task_add_argument(task, "-sf", "%s/dhclient-script", SCRIPTDIR);
hostname = connman_utsname_get_hostname();
+#ifdef HAVE_DHCLIENT_HOSTNAME
if (hostname != NULL)
connman_task_add_argument(task, "-H", hostname);
+#endif
connman_task_add_argument(task, ifname, NULL);
connman_task_add_argument(task, "-n", NULL);