[libvirt] [PATCH] fix syntax error in configure.ac

When I run configure, I receive some syntax error. # ./configure --without-xenapi --without-xen ...... checking where to find <rpc/rpc.h>... none checking for library containing dlopen... -ldl ./configure: line 52500: test: =: unary operator expected ./configure: line 52766: test: =: unary operator expected checking linux/kvm.h usability... yes checking linux/kvm.h presence... yes ...... Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> --- configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 51da1b0..377b9c6 100644 --- a/configure.ac +++ b/configure.ac @@ -430,6 +430,7 @@ old_CFLAGS="$CFLAGS" LIBXENSERVER_LIBS="" LIBXENSERVER_CFLAGS="" dnl search for the XenServer library +fail=0 if test "$with_xenapi" != "no" ; then if test "$with_xenapi" != "yes" && test "$with_xenapi" != "check" ; then LIBXENSERVER_CFLAGS="-I$with_xenapi/include" -- 1.7.1

On 12/23/2010 02:32 AM, Wen Congyang wrote:
When I run configure, I receive some syntax error.
# ./configure --without-xenapi --without-xen ...... checking where to find <rpc/rpc.h>... none checking for library containing dlopen... -ldl ./configure: line 52500: test: =: unary operator expected ./configure: line 52766: test: =: unary operator expected checking linux/kvm.h usability... yes checking linux/kvm.h presence... yes
Yep - when xenapi is explicitly disable, $fail was used uninitialized.
+++ b/configure.ac @@ -430,6 +430,7 @@ old_CFLAGS="$CFLAGS" LIBXENSERVER_LIBS="" LIBXENSERVER_CFLAGS="" dnl search for the XenServer library +fail=0 if test "$with_xenapi" != "no" ; then if test "$with_xenapi" != "yes" && test "$with_xenapi" != "check" ; then LIBXENSERVER_CFLAGS="-I$with_xenapi/include"
Almost - rather than duplicate the initialization, you can remove the second one. I'm squashing this in, and pushing. diff --git i/configure.ac w/configure.ac index 377b9c6..80ee331 100644 --- i/configure.ac +++ w/configure.ac @@ -436,7 +436,6 @@ if test "$with_xenapi" != "no" ; then LIBXENSERVER_CFLAGS="-I$with_xenapi/include" LIBXENSERVER_LIBS="-L$with_xenapi" fi - fail=0 CFLAGS="$CFLAGS $LIBXENSERVER_CFLAGS" LIBS="$LIBS $LIBXENSERVER_LIBS" AC_CHECK_LIB([xenserver], [xen_vm_start], [ -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

At 12/24/2010 12:21 AM, Eric Blake Write:
On 12/23/2010 02:32 AM, Wen Congyang wrote:
When I run configure, I receive some syntax error.
# ./configure --without-xenapi --without-xen ...... checking where to find <rpc/rpc.h>... none checking for library containing dlopen... -ldl ./configure: line 52500: test: =: unary operator expected ./configure: line 52766: test: =: unary operator expected checking linux/kvm.h usability... yes checking linux/kvm.h presence... yes
Yep - when xenapi is explicitly disable, $fail was used uninitialized.
+++ b/configure.ac @@ -430,6 +430,7 @@ old_CFLAGS="$CFLAGS" LIBXENSERVER_LIBS="" LIBXENSERVER_CFLAGS="" dnl search for the XenServer library +fail=0 if test "$with_xenapi" != "no" ; then if test "$with_xenapi" != "yes" && test "$with_xenapi" != "check" ; then LIBXENSERVER_CFLAGS="-I$with_xenapi/include"
Almost - rather than duplicate the initialization, you can remove the second one. I'm squashing this in, and pushing. Thanks.
diff --git i/configure.ac w/configure.ac index 377b9c6..80ee331 100644 --- i/configure.ac +++ w/configure.ac @@ -436,7 +436,6 @@ if test "$with_xenapi" != "no" ; then LIBXENSERVER_CFLAGS="-I$with_xenapi/include" LIBXENSERVER_LIBS="-L$with_xenapi" fi - fail=0 CFLAGS="$CFLAGS $LIBXENSERVER_CFLAGS" LIBS="$LIBS $LIBXENSERVER_LIBS" AC_CHECK_LIB([xenserver], [xen_vm_start], [
participants (2)
-
Eric Blake
-
Wen Congyang