[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] tools/configure.ac: add version check for glib2
# HG changeset patch # User Olaf Hering <olaf@xxxxxxxxx> # Date 1341413176 -3600 # Node ID 197138cc94363f046f79ca89fc1d831a56004e4e # Parent 328f466f9ee6b8748c8af50090bb7ed12bf83ca5 tools/configure.ac: add version check for glib2 xen-unstable fails to build in a SLES10SP4 environment since a long time because the included version of glib is slightly older than the required glib version. According to the glib docs version 2.12 includes base64 support, but SLES10 is shipped with glib 2.8.6: qemu-timer-common.o: In function `init_get_clock': /usr/src/packages/BUILD/xen-4.2.25432/non-dbg/tools/qemu-xen-dir/qemu-timer-common.c:57: undefined reference to `clock_gettime' qga/guest-agent-commands.o: In function `qmp_guest_file_write': qga/guest-agent-commands.c:249: undefined reference to `g_base64_decode' qga/guest-agent-commands.o: In function `qmp_guest_file_read': qga/guest-agent-commands.c:224: undefined reference to `g_base64_encode' collect2: ld returned 1 exit status make[3]: *** [qemu-ga] Error 1 Add a version check to toplevel configure to require at least glib 2.12. This makes sure configure can detect the condition early instead of failing later in the middle of tools build when qemu-upstream errors out. Please rerun autoconf after applying this. Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 328f466f9ee6 -r 197138cc9436 tools/configure --- a/tools/configure Wed Jul 04 15:46:15 2012 +0100 +++ b/tools/configure Wed Jul 04 15:46:16 2012 +0100 @@ -5961,12 +5961,12 @@ if test -n "$glib_CFLAGS"; then pkg_cv_glib_CFLAGS="$glib_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_glib_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0" 2>/dev/null` + pkg_cv_glib_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.12" 2>/dev/null` else pkg_failed=yes fi @@ -5977,12 +5977,12 @@ if test -n "$glib_LIBS"; then pkg_cv_glib_LIBS="$glib_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.12\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.12") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_glib_LIBS=`$PKG_CONFIG --libs "glib-2.0" 2>/dev/null` + pkg_cv_glib_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.12" 2>/dev/null` else pkg_failed=yes fi @@ -6002,14 +6002,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - glib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0" 2>&1` + glib_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.12" 2>&1` else - glib_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0" 2>&1` + glib_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.12" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$glib_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.12) were not met: $glib_PKG_ERRORS diff -r 328f466f9ee6 -r 197138cc9436 tools/configure.ac --- a/tools/configure.ac Wed Jul 04 15:46:15 2012 +0100 +++ b/tools/configure.ac Wed Jul 04 15:46:16 2012 +0100 @@ -115,7 +115,7 @@ AX_PATH_PROG_OR_FAIL([BCC], [bcc]) AX_PATH_PROG_OR_FAIL([IASL], [iasl]) AX_CHECK_UUID AX_CHECK_CURSES -PKG_CHECK_MODULES(glib, glib-2.0) +PKG_CHECK_MODULES(glib, [glib-2.0 >= 2.12]) # Check library path AX_DEFAULT_LIB _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |