Re: [PATCH] nmcli: Made nmcli build optional
On Thu, 2015-11-19 at 00:02 +, Joel Holdsworth wrote: > --- > clients/cli/Makefile.am | 4 > configure.ac| 13 ++--- > 2 files changed, 14 insertions(+), 3 deletions(-) > merged to master as http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=8051038b4d9b96788d9989127e00ead9e1524057 [I only reworded the commit-message] Thank you for the patch!! Thomas signature.asc Description: This is a digitally signed message part ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] nmcli: Made nmcli build optional
--- clients/cli/Makefile.am | 4 configure.ac| 13 ++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/clients/cli/Makefile.am b/clients/cli/Makefile.am index eef99cb..a2250ad 100644 --- a/clients/cli/Makefile.am +++ b/clients/cli/Makefile.am @@ -1,3 +1,5 @@ +if BUILD_NMCLI + bin_PROGRAMS = \ nmcli @@ -71,3 +73,5 @@ uninstall-hook: rm -f $(DESTDIR)$(completiondir)/nmcli EXTRA_DIST += nmcli-completion + +endif diff --git a/configure.ac b/configure.ac index 7b4ca9a..6f38831 100644 --- a/configure.ac +++ b/configure.ac @@ -531,9 +531,6 @@ PKG_CHECK_MODULES(LIBNL, libnl-3.0 >= 3.2.8) # uuid library PKG_CHECK_MODULES(UUID, uuid) -dnl Checks for readline library - used by nmcli -AX_LIB_READLINE - # Teamd control checks PKG_CHECK_MODULES(LIBTEAMDCTL, [libteamdctl >= 1.9], [have_teamdctl=yes],[have_teamdctl=no]) AC_ARG_ENABLE(teamdctl, AS_HELP_STRING([--enable-teamdctl], [enable Teamd control support]), @@ -860,6 +857,15 @@ AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes") PKG_CHECK_MODULES(LIBNDP, [libndp]) +AC_ARG_WITH(nmcli, AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli])) +if test "$with_nmcli" != no; then +AX_LIB_READLINE +build_nmcli=yes +else +build_nmcli=no +fi +AM_CONDITIONAL(BUILD_NMCLI, test "$build_nmcli" = yes) + AC_ARG_WITH(nmtui, AS_HELP_STRING([--with-nmtui=yes|no], [Build nmtui])) if test "$with_nmtui" != no; then PKG_CHECK_MODULES(NEWT, [libnewt >= 0.52.15], [build_nmtui=yes], [build_nmtui=no]) @@ -1145,6 +1151,7 @@ echo " modemmanager-1: $with_modem_manager_1" echo " concheck: $enable_concheck" echo " libteamdctl: $enable_teamdctl" echo " libnm-glib: $with_libnm_glib" +echo " nmcli: $build_nmcli" echo " nmtui: $build_nmtui" echo -- 1.9.1 ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] nmcli: Made nmcli build optional
Sure. I'll do it tomorrow. Thanks Joel On 15 Nov 2015 09:54, "Dan Williams" wrote: > On Fri, 2015-11-13 at 19:35 +, Joel Holdsworth wrote: > > Hi, here's a patch to make the nmcli build optional. In my use-case I > > need to cross-build NetworkManager, and I don't want to have to > > cross-build GNU readline for a binary I don't need. > > Thanks for the patch! Would you mind making two quick fixes to it? > > 1) first, the patch will actually break the case where --with-nmcli is > not specified on the command-line, because build_nmcli doesn't get set > to 'yes' if not specified. You could simply add: > > if test "$with_nmcli" != no; then > AX_LIB_READLINE > +build_nmcli=yes > else > > 2) We should put some log info near the bottom whether nmcli is enabled > or not, like is done for nmcli. That would be something like: > > echo " libnm-glib: $with_libnm_glib" > +echo " nmcli: $build_nmcli" > echo " nmtui: $build_nmtui" > echo > > Any chance you could make those changes and resubmit? > > Thanks! > Dan > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] nmcli: Made nmcli build optional
On Fri, 2015-11-13 at 19:35 +, Joel Holdsworth wrote: > Hi, here's a patch to make the nmcli build optional. In my use-case I > need to cross-build NetworkManager, and I don't want to have to > cross-build GNU readline for a binary I don't need. Thanks for the patch! Would you mind making two quick fixes to it? 1) first, the patch will actually break the case where --with-nmcli is not specified on the command-line, because build_nmcli doesn't get set to 'yes' if not specified. You could simply add: if test "$with_nmcli" != no; then AX_LIB_READLINE +build_nmcli=yes else 2) We should put some log info near the bottom whether nmcli is enabled or not, like is done for nmcli. That would be something like: echo " libnm-glib: $with_libnm_glib" +echo " nmcli: $build_nmcli" echo " nmtui: $build_nmtui" echo Any chance you could make those changes and resubmit? Thanks! Dan ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] nmcli: Made nmcli build optional
Hi, here's a patch to make the nmcli build optional. In my use-case I need to cross-build NetworkManager, and I don't want to have to cross-build GNU readline for a binary I don't need. Best Regards Joel Holdsworth >From 6e0b258f7cea23834677be4f4ea85d46d7316114 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Wed, 12 Aug 2015 23:40:35 +0100 Subject: [PATCH] nmcli: Made nmcli build optional --- clients/cli/Makefile.am | 4 configure.ac| 11 --- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/clients/cli/Makefile.am b/clients/cli/Makefile.am index eef99cb..a2250ad 100644 --- a/clients/cli/Makefile.am +++ b/clients/cli/Makefile.am @@ -1,3 +1,5 @@ +if BUILD_NMCLI + bin_PROGRAMS = \ nmcli @@ -71,3 +73,5 @@ uninstall-hook: rm -f $(DESTDIR)$(completiondir)/nmcli EXTRA_DIST += nmcli-completion + +endif diff --git a/configure.ac b/configure.ac index 7b4ca9a..3df98a1 100644 --- a/configure.ac +++ b/configure.ac @@ -531,9 +531,6 @@ PKG_CHECK_MODULES(LIBNL, libnl-3.0 >= 3.2.8) # uuid library PKG_CHECK_MODULES(UUID, uuid) -dnl Checks for readline library - used by nmcli -AX_LIB_READLINE - # Teamd control checks PKG_CHECK_MODULES(LIBTEAMDCTL, [libteamdctl >= 1.9], [have_teamdctl=yes],[have_teamdctl=no]) AC_ARG_ENABLE(teamdctl, AS_HELP_STRING([--enable-teamdctl], [enable Teamd control support]), @@ -860,6 +857,14 @@ AM_CONDITIONAL(WITH_CONCHECK, test "${enable_concheck}" = "yes") PKG_CHECK_MODULES(LIBNDP, [libndp]) +AC_ARG_WITH(nmcli, AS_HELP_STRING([--with-nmcli=yes|no], [Build nmcli])) +if test "$with_nmcli" != no; then +AX_LIB_READLINE +else +build_nmcli=no +fi +AM_CONDITIONAL(BUILD_NMCLI, test "$build_nmcli" = yes) + AC_ARG_WITH(nmtui, AS_HELP_STRING([--with-nmtui=yes|no], [Build nmtui])) if test "$with_nmtui" != no; then PKG_CHECK_MODULES(NEWT, [libnewt >= 0.52.15], [build_nmtui=yes], [build_nmtui=no]) -- 1.9.1 ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list