diff options
author | Eric Blake <eblake@redhat.com> | 2012-08-14 11:36:38 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-08-14 15:33:10 -0600 |
commit | c606671aaad10a9bc87f226bc473a091e00a9629 (patch) | |
tree | ec8ba2693e20fe6c65b5c597477c54f5d80da2c9 /src/Makefile.am | |
parent | network: merge relevant virtualports rather than choosing one (diff) | |
download | libvirt-c606671aaad10a9bc87f226bc473a091e00a9629.tar.gz libvirt-c606671aaad10a9bc87f226bc473a091e00a9629.tar.bz2 libvirt-c606671aaad10a9bc87f226bc473a091e00a9629.zip |
random: link with -lm when needed
Use of ldexp() requires -lm on some platforms; use gnulib to determine
this for our makefile. Also, optimize virRandomInt() for the case
of a power-of-two limit (actually rather common, given that Daniel
has a pending patch to replace virRandomBits(10) with code that will
default to virRandomInt(1024) on default SELinux settings).
* .gnulib: Update to latest, for ldexp.
* bootstrap.conf (gnulib_modules): Import ldexp.
* src/Makefile.am (libvirt_util_la_CFLAGS): Link with -lm when
needed.
* src/util/virrandom.c (virRandomInt): Optimize powers of 2.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e94f97718..cec478948 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -654,7 +654,7 @@ libvirt_util_la_SOURCES = \ $(UTIL_SOURCES) libvirt_util_la_CFLAGS = $(CAPNG_CFLAGS) $(YAJL_CFLAGS) $(LIBNL_CFLAGS) \ $(AM_CFLAGS) $(AUDIT_CFLAGS) $(DEVMAPPER_CFLAGS) \ - $(DBUS_CFLAGS) + $(DBUS_CFLAGS) $(LDEXP_LIBM) libvirt_util_la_LIBADD = $(CAPNG_LIBS) $(YAJL_LIBS) $(LIBNL_LIBS) \ $(THREAD_LIBS) $(AUDIT_LIBS) $(DEVMAPPER_LIBS) \ $(RT_LIBS) $(DBUS_LIBS) $(MSCOM_LIBS) $(LIBXML_LIBS) |