[Nut-upsdev] New default for SNMP and USB (and HAL) compilation

Peter Selinger selinger at mathstat.dal.ca
Fri Dec 29 05:10:02 CET 2006


Charles Lepple wrote:
> 
> > > * the checks for libusb, libhal, and libnetsnmp are performed even if
> > >   the corresponding --without options are given. This is because we
> > >   have no good way of checking which drivers the user selected with
> > >   --with-drivers=xxx,yyy,zzz, and these drivers might need the
> > >   libraries.
> >
> > With SVN rev 658, "--with-hal=no" doesn't seem to prevent the system
> > from building main-hal.c:
> 
> Looks like this was just a simple fix (committed as rev 661; revert or
> change as necessary):
> 
> Index: drivers/Makefile.am
> ===================================================================
> --- drivers/Makefile.am (revision 660)
> +++ drivers/Makefile.am (working copy)
> @@ -191,9 +191,11 @@
>  # for object files. This library is used during the build process,
>  # and is not meant to be installed.
> 
> +if WITH_HAL
>  noinst_LIBRARIES = libnuthalmain.a
>  libnuthalmain_a_SOURCES = main-hal.c dstate-hal.c
>  libnuthalmain_a_CFLAGS = $(AM_CFLAGS) $(LIBHAL_CFLAGS)
> +endif
> 
>  EXTRA_DIST = Doxyfile

I have solved this slightly differently, by using EXTRA_LIBRARIES
instead of noinst_LIBRARIES. Your solution will not work if the user
selects something like 
--without-hal --with-drivers=hald-addon-usbhid-ups

-- Peter



More information about the Nut-upsdev mailing list