[libvirt] [PATCH libvirt 1/3] build: do not build shunloadtest if pthread missing
Eric Blake
eblake at redhat.com
Wed May 2 18:45:22 UTC 2012
On 04/20/2012 07:13 AM, Marc-André Lureau wrote:
> Fixes build on Windows systems
> ---
> configure.ac | 2 ++
> tests/Makefile.am | 8 +++++++-
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 89fe818..347c48c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -154,6 +154,8 @@ AC_CHECK_FUNC([clock_gettime],[
> LIBS=$old_libs
> AC_SUBST(RT_LIBS)
>
> +AM_CONDITIONAL([HAVE_PTHREAD], [test x"$HAVE_PTHREAD_H" = x"1"])
NACK. If I understand things, the only reason you are adding this
conditional is so that:
> +if HAVE_PTHREAD
> shunloadtest_SOURCES = \
> shunloadtest.c
> shunloadtest_LDADD = -lpthread
this line won't trigger a link failure if -lpthread does not exist. But
we've already conditionalized -pthread; so does this (shorter) patch
work to fix the problem instead?
diff --git i/tests/Makefile.am w/tests/Makefile.am
index c4d550f..b30d79c 100644
--- i/tests/Makefile.am
+++ w/tests/Makefile.am
@@ -529,7 +529,7 @@ libshunload_la_LDFLAGS = -module -avoid-version
-rpath /evil/libtool/hack/to/for
shunloadtest_SOURCES = \
shunloadtest.c
-shunloadtest_LDADD = -lpthread
+shunloadtest_LDADD = $(LIB_PTHREAD)
shunloadtest_DEPENDENCIES = libshunload.la
if WITH_CIL
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120502/47ba20e6/attachment-0001.sig>
More information about the libvir-list
mailing list