build: merge branch 'th/build-fixes-cloud-setup'

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1627
This commit is contained in:
Thomas Haller 2023-05-18 09:18:11 +02:00
commit 94d651067a
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
7 changed files with 14 additions and 11 deletions

View file

@ -1049,6 +1049,7 @@ else
fi
AM_CONDITIONAL(WITH_LIBPSL, test "$with_libpsl" != "no")
have_libcurl=''
AC_ARG_ENABLE(concheck,
AS_HELP_STRING([--enable-concheck], [enable connectivity checking support]),
@ -1072,12 +1073,12 @@ AC_ARG_WITH(nmcli,
AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli]),
[],
[with_nmcli=yes])
if test "$with_nmcli" == yes; then
if test "$with_nmcli" = yes; then
if test "$with_readline" = none; then
AC_MSG_FAILURE([nmcli requires readline library. Use --with-readline or --with-nmcli=no])
fi
build_nmcli=yes
elif test "$with_nmcli" == no; then
elif test "$with_nmcli" = no; then
build_nmcli=no
else
AC_MSG_ERROR([invalid --with-nmcli option. Valid options are --with-nmcli=yes|no])
@ -1085,9 +1086,11 @@ fi
AM_CONDITIONAL(BUILD_NMCLI, test "$build_nmcli" = yes)
AC_ARG_WITH(nm-cloud-setup,
AS_HELP_STRING([--with-nm-cloud-setup=yes|no], [Build nm-cloud-setup, a tool for automatically configure networking in cloud (EXPERIMENTAL!)]))
AS_HELP_STRING([--with-nm-cloud-setup=yes|no], [Build nm-cloud-setup, a tool for automatically configuring networking in cloud]))
if test "$with_nm_cloud_setup" != no; then
PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.24.0], [have_libcurl=yes], [have_libcurl=no])
if test "$have_libcurl" = ""; then
PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.24.0], [have_libcurl=yes], [have_libcurl=no])
fi
if test "$have_libcurl" != "yes"; then
AC_MSG_ERROR(--with-nm-cloud-setup requires libcurl library.)
fi

View file

@ -56,7 +56,7 @@ in_set() {
local v="$1"
shift
for v2; do
test "$v" == "$v2" && return 0
test "$v" = "$v2" && return 0
done
return 1
}

View file

@ -34,7 +34,7 @@ in_set() {
local v="$1"
shift
for v2; do
test "$v" == "$v2" && return 0
test "$v" = "$v2" && return 0
done
return 1
}

View file

@ -102,7 +102,7 @@ unset _WITH_VALGRIND_CHECKED
_with_valgrind() {
_is_true "$WITH_VALGRIND" 0 || return 1
test "$_WITH_VALGRIND_CHECKED" == "1" && return 0
test "$_WITH_VALGRIND_CHECKED" = "1" && return 0
_WITH_VALGRIND_CHECKED=1
if [ "$IS_ALPINE" = 1 ]; then

View file

@ -62,7 +62,7 @@ git_config_reset() {
local val="$2"
local c=(git config --replace-all "$key" "$val")
test "$#" == 2 || die "invalid arguments to git_config_add(): $@"
test "$#" -eq 2 || die "invalid arguments to git_config_add(): $@"
if [ "$(git config --get-all "$key")" = "$val" ]; then
SKIP=1 call "${c[@]}"
@ -76,7 +76,7 @@ git_config_add() {
local val="$2"
local c=(git config --add "$key" "$val")
test "$#" == 2 || die "invalid arguments to git_config_add(): $@"
test "$#" -eq 2 || die "invalid arguments to git_config_add(): $@"
if git config --get-all "$key" | grep -qFx "$val"; then
SKIP=1 call "${c[@]}"

View file

@ -39,7 +39,7 @@ option('teamdctl', type: 'boolean', value: false, description: 'enable Teamd con
option('ovs', type: 'boolean', value: true, description: 'enable Open vSwitch support')
option('nmcli', type: 'boolean', value: true, description: 'Build nmcli')
option('nmtui', type: 'boolean', value: true, description: 'Build nmtui')
option('nm_cloud_setup', type: 'boolean', value: false, description: 'Build nm-cloud-setup, a tool for automatically configure networking in cloud (EXPERIMENTAL!)')
option('nm_cloud_setup', type: 'boolean', value: true, description: 'Build nm-cloud-setup, a tool for automatically configuring networking in cloud')
option('bluez5_dun', type: 'boolean', value: false, description: 'enable Bluez5 DUN support')
option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: 'Enable eBPF support')

View file

@ -39,7 +39,7 @@ libnm_headers() {
SOURCEDIR="$1"
BUILDDIR="$2"
if test "$SOURCEDIR" == "$BUILDDIR"; then
if test "$SOURCEDIR" = "$BUILDDIR"; then
BUILDDIR=
fi
[ -z "$SOURCEDIR" ] && SOURCEDIR='.'