mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 05:10:09 +01:00
build: add --with-dnsmasq, to specify dnsmasq path
https://bugzilla.gnome.org/show_bug.cgi?id=700219
This commit is contained in:
parent
c4edeb6da4
commit
691422a460
3 changed files with 14 additions and 3 deletions
10
configure.ac
10
configure.ac
|
|
@ -601,6 +601,16 @@ fi
|
|||
AC_DEFINE_UNQUOTED(IPTABLES_PATH, "$IPTABLES_PATH", [Define to path of iptables binary])
|
||||
AC_SUBST(IPTABLES_PATH)
|
||||
|
||||
# dnsmasq path
|
||||
AC_ARG_WITH(dnsmasq, AS_HELP_STRING([--with-dnsmasq=/path/to/dnsmasq], [path to dnsmasq]))
|
||||
if test "x${with_dnsmasq}" = x; then
|
||||
AC_PATH_PROG(DNSMASQ_PATH, dnsmasq, [], $PATH:/sbin:/usr/sbin)
|
||||
else
|
||||
DNSMASQ_PATH="$with_dnsmasq"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(DNSMASQ_PATH, "$DNSMASQ_PATH", [Define to path of dnsmasq binary])
|
||||
AC_SUBST(DNSMASQ_PATH)
|
||||
|
||||
# system CA certificates path
|
||||
AC_ARG_WITH(system-ca-path, AS_HELP_STRING([--with-system-ca-path=/path/to/ssl/certs], [path to system CA certificates]))
|
||||
if test "x${with_system_ca_path}" = x; then
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ static inline const char *
|
|||
find_dnsmasq (void)
|
||||
{
|
||||
static const char *paths[] = {
|
||||
DNSMASQ_PATH,
|
||||
"/usr/local/sbin/dnsmasq",
|
||||
"/usr/sbin/dnsmasq",
|
||||
"/sbin/dnsmasq",
|
||||
|
|
@ -62,7 +63,7 @@ find_dnsmasq (void)
|
|||
const char **binary = paths;
|
||||
|
||||
while (*binary != NULL) {
|
||||
if (g_file_test (*binary, G_FILE_TEST_EXISTS))
|
||||
if (**binary && g_file_test (*binary, G_FILE_TEST_EXISTS))
|
||||
return *binary;
|
||||
binary++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -169,16 +169,16 @@ static inline const char *
|
|||
nm_find_dnsmasq (void)
|
||||
{
|
||||
static const char *dnsmasq_binary_paths[] = {
|
||||
DNSMASQ_PATH,
|
||||
"/usr/local/sbin/dnsmasq",
|
||||
"/usr/sbin/dnsmasq",
|
||||
"/sbin/dnsmasq",
|
||||
NULL
|
||||
};
|
||||
|
||||
const char **dnsmasq_binary = dnsmasq_binary_paths;
|
||||
|
||||
while (*dnsmasq_binary != NULL) {
|
||||
if (g_file_test (*dnsmasq_binary, G_FILE_TEST_EXISTS))
|
||||
if (**dnsmasq_binary && g_file_test (*dnsmasq_binary, G_FILE_TEST_EXISTS))
|
||||
break;
|
||||
dnsmasq_binary++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue