configure: detect xen with --extra-cflags / --extra-ldflags
authorChristoph Egger <Christoph.Egger@amd.com>
Tue, 30 Jun 2009 12:59:38 +0000 (14:59 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 9 Jul 2009 21:06:36 +0000 (16:06 -0500)
Attached patch lets configure find xen headers and xen libs
when called with --extra-cflags and --extra-ldflags options.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure

index ed58b0a..7eeb054 100755 (executable)
--- a/configure
+++ b/configure
@@ -849,9 +849,9 @@ if test "$xen" = "yes" ; then
 cat > $TMPC <<EOF
 #include <xenctrl.h>
 #include <xs.h>
-int main(void) { xs_daemon_open; xc_interface_open; }
+int main(void) { xs_daemon_open(); xc_interface_open(); return 0; }
 EOF
-   if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC -lxenstore -lxenctrl 2> /dev/null > /dev/null ; then
+   if $cc $CFLAGS $ARCH_CFLAGS -c -o $TMPO $TMPC $LDFLAGS -lxenstore -lxenctrl 2> /dev/null > /dev/null ; then
       :
    else
       xen="no"