[libvirt] [PATCH] Automagically check if libssh2 is new enough for Phyp-support to be build
Daniel Veillard
veillard at redhat.com
Tue Sep 8 12:59:37 UTC 2009
On Tue, Sep 08, 2009 at 12:24:08PM +0200, Maximilian Wilhelm wrote:
> Anno domini 2009 Maximilian Wilhelm scripsit:
>
> Hi!
>
> > My buildbot spotted a problem with the latest changes to Phyp, as the
> > function libssh2_session_block_directions() only is available with
> > libssh2 version 1.0 and later.
>
> > At least on Debian Lenny there is an older one which prevents libVirt
> > from building, so I updated the configure.in script to add another
> > piece of magic (and thereby fixed the indenation of the Phypchecks).
>
> > See attached patch.
>
> Nobody interested?
Yeah, I wanted to look at it but got sidetracked ...
Small problem, with the patch it fails for me even with
libssh2-devel-1.0-2.fc11
from config.log:
configure:44489: checking for libssh2_session_startup in -lssh2
configure:44524: gcc -o conftest -g -O2 conftest.c -lssh2 -lpthread
>&5
configure:44531: $? = 0
configure:44552: result: yes
configure:44572: checking for libssh2.h
configure:44594: gcc -c -g -O2 conftest.c >&5
configure:44601: $? = 0
configure:44618: result: yes
configure:44666: gcc -o conftest -g -O2 conftest.c -lpthread >&5
/tmp/ccAcKiEO.o: In function `main':
/u/veillard/libvirt/conftest.c:214: undefined reference to
`libssh2_session_block_directions'
collect2: ld returned 1 exit status
the problem is taht -lssh2 is not passed to the linker so I guess
this would always fail :-)
Somehow the AC_TRY_LINK should get the flags but it doesn't ...
+ if test "$with_phyp" != "no"; then
+ AC_TRY_LINK([#include <libssh2.h>], [
+ (void) libssh2_session_block_directions(NULL);
+ ], [
+ AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM
driver is enabled])
+ ], [
I you know how to fix this :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list