Skip to contentSkip to conversation

tools/configure.ac changes

PATCH In review Olaf Hering 2 participants 13 messages Jun 13, 2012 – Jul 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/configure.ac changes

Changes:
tools/configure.ac: add version check for glib2 tools/m4: add AC_LANG_SOURCE to fix autoconf warnings tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

 tools/configure.ac   |    4 ++--
 tools/m4/pthread.m4  |    4 ++--
 tools/m4/ptyfuncs.m4 |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
#1 lore raw

PATCH 1/1 tools/configure.ac: add version check for glib2

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593000 -7200
# Node ID 0dfe08c91739527eb454d5e4957635cb8b90e1e1 # Parent a70b35deb2b5592cc1b2363860f21bb2c7049885 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.

tools/configure.ac +1 -1
diff -r a70b35deb2b5 -r 0dfe08c91739 tools/configure.ac
@@ -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-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#2 lore raw

Re: [PATCH 1 of 3] tools/configure.ac: add version check for glib2

Quoted 27 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593000 -7200
# Node ID 0dfe08c91739527eb454d5e4957635cb8b90e1e1 # Parent a70b35deb2b5592cc1b2363860f21bb2c7049885 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.

Quoted 4 lines

Please rerun autoconf after applying this.

Quoted 13 lines

diff -r a70b35deb2b5 -r 0dfe08c91739 tools/configure.ac

tools/configure.ac +1 -1
@@ -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
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw

PATCH 1/1 tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

In reply to Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593008 -7200
# Node ID 59762b446ab4e6d9a851a91d1457c11f6c828d49 # Parent 0dfe08c91739527eb454d5e4957635cb8b90e1e1 tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

I see these warnings with autoconf 2.68, add AC_LANG_SOURCE as suggested by upstream documentation.

...

 # bash autogen.sh
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/pthread.m4:21: AX_CHECK_PTHREAD is expanded from...
configure.ac:141: the top level
configure.ac:142: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/ptyfuncs.m4:1: AX_CHECK_PTYFUNCS is expanded from...
configure.ac:142: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/pthread.m4:21: AX_CHECK_PTHREAD is expanded from...
configure.ac:141: the top level
configure.ac:142: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/ptyfuncs.m4:1: AX_CHECK_PTYFUNCS is expanded from...
configure.ac:142: the top level

Please rerun autoconf after applying this.

tools/m4/pthread.m4 +2 -2
diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/pthread.m4
@@ -24,13 +24,13 @@ AC_DEFUN([AX_CHECK_PTHREAD],[
         AX_PTHREAD_CV2VARS
         AX_PTHREAD_VARS([AX_SAVEVAR_SAVE])
         AX_PTHREAD_VARS([AX_PTHREAD_VAR_APPLY])
-        AC_LINK_IFELSE([
+        AC_LINK_IFELSE([AC_LANG_SOURCE([
 #include <pthread.h>
 int main(void) {
   pthread_atfork(0,0,0);
   pthread_create(0,0,0,0);
 }
-],[],[ax_cv_pthread_flags=failed])
+])],[],[ax_cv_pthread_flags=failed])
         AX_PTHREAD_VARS([AX_SAVEVAR_RESTORE])
     ])
     if test "x$ax_cv_pthread_flags" = xfailed; then
tools/m4/ptyfuncs.m4 +2 -2
diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/ptyfuncs.m4
@@ -9,7 +9,7 @@ AC_DEFUN([AX_CHECK_PTYFUNCS], [
             fi
             AX_SAVEVAR_SAVE(LIBS)
             LIBS="$LIBS $ax_cv_ptyfuncs_libs"
-            AC_LINK_IFELSE([
+            AC_LINK_IFELSE([AC_LANG_SOURCE([
 #ifdef INCLUDE_LIBUTIL_H
 #include INCLUDE_LIBUTIL_H
 #endif
@@ -17,7 +17,7 @@ int main(void) {
   openpty(0,0,0,0,0);
   login_tty(0);
 }
-],[
+])],[
                 break
             ],[])
             AX_SAVEVAR_RESTORE(LIBS)
Acked-by on v1 1/1
#4 lore raw

Re: [PATCH 2 of 3] tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

Quoted 50 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593008 -7200
# Node ID 59762b446ab4e6d9a851a91d1457c11f6c828d49 # Parent 0dfe08c91739527eb454d5e4957635cb8b90e1e1 tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

I see these warnings with autoconf 2.68, add AC_LANG_SOURCE as suggested by upstream documentation.

...

 # bash autogen.sh
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/pthread.m4:21: AX_CHECK_PTHREAD is expanded from...
configure.ac:141: the top level
configure.ac:142: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/ptyfuncs.m4:1: AX_CHECK_PTYFUNCS is expanded from...
configure.ac:142: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/pthread.m4:21: AX_CHECK_PTHREAD is expanded from...
configure.ac:141: the top level
configure.ac:142: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/ptyfuncs.m4:1: AX_CHECK_PTYFUNCS is expanded from...
configure.ac:142: the top level
Quoted 3 lines

Please rerun autoconf after applying this.

Quoted 46 lines

diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/pthread.m4

tools/m4/pthread.m4 +2 -2
@@ -24,13 +24,13 @@ AC_DEFUN([AX_CHECK_PTHREAD],[
         AX_PTHREAD_CV2VARS
         AX_PTHREAD_VARS([AX_SAVEVAR_SAVE])
         AX_PTHREAD_VARS([AX_PTHREAD_VAR_APPLY])
-        AC_LINK_IFELSE([
+        AC_LINK_IFELSE([AC_LANG_SOURCE([
 #include <pthread.h>
 int main(void) {
   pthread_atfork(0,0,0);
   pthread_create(0,0,0,0);
 }
-],[],[ax_cv_pthread_flags=failed])
+])],[],[ax_cv_pthread_flags=failed])
         AX_PTHREAD_VARS([AX_SAVEVAR_RESTORE])
     ])
     if test "x$ax_cv_pthread_flags" = xfailed; then

diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/ptyfuncs.m4

tools/m4/ptyfuncs.m4 +2 -2
@@ -9,7 +9,7 @@ AC_DEFUN([AX_CHECK_PTYFUNCS], [
             fi
             AX_SAVEVAR_SAVE(LIBS)
             LIBS="$LIBS $ax_cv_ptyfuncs_libs"
-            AC_LINK_IFELSE([
+            AC_LINK_IFELSE([AC_LANG_SOURCE([
 #ifdef INCLUDE_LIBUTIL_H
 #include INCLUDE_LIBUTIL_H
 #endif
@@ -17,7 +17,7 @@ int main(void) {
   openpty(0,0,0,0,0);
   login_tty(0);
 }
-],[
+])],[
                 break
             ],[])
             AX_SAVEVAR_RESTORE(LIBS)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

Re: [PATCH 2 of 3] tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

In reply to Olaf Hering
Quoted 1 line · Olaf Hering

Please rerun autoconf after applying this.

I did this but there was no change to the configure script.

I'm going to assume this is normal with the 2.67 version of autoconf and that changes would only be expected with 2.68 which you are using. IOW I'll commit as is.

Quoted 47 lines

diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/pthread.m4

tools/m4/pthread.m4 +2 -2
@@ -24,13 +24,13 @@ AC_DEFUN([AX_CHECK_PTHREAD],[
         AX_PTHREAD_CV2VARS
         AX_PTHREAD_VARS([AX_SAVEVAR_SAVE])
         AX_PTHREAD_VARS([AX_PTHREAD_VAR_APPLY])
-        AC_LINK_IFELSE([
+        AC_LINK_IFELSE([AC_LANG_SOURCE([
 #include <pthread.h>
 int main(void) {
   pthread_atfork(0,0,0);
   pthread_create(0,0,0,0);
 }
-],[],[ax_cv_pthread_flags=failed])
+])],[],[ax_cv_pthread_flags=failed])
         AX_PTHREAD_VARS([AX_SAVEVAR_RESTORE])
     ])
     if test "x$ax_cv_pthread_flags" = xfailed; then

diff -r 0dfe08c91739 -r 59762b446ab4 tools/m4/ptyfuncs.m4

tools/m4/ptyfuncs.m4 +2 -2
@@ -9,7 +9,7 @@ AC_DEFUN([AX_CHECK_PTYFUNCS], [
             fi
             AX_SAVEVAR_SAVE(LIBS)
             LIBS="$LIBS $ax_cv_ptyfuncs_libs"
-            AC_LINK_IFELSE([
+            AC_LINK_IFELSE([AC_LANG_SOURCE([
 #ifdef INCLUDE_LIBUTIL_H
 #include INCLUDE_LIBUTIL_H
 #endif
@@ -17,7 +17,7 @@ int main(void) {
   openpty(0,0,0,0,0);
   login_tty(0);
 }
-],[
+])],[
                 break
             ],[])
             AX_SAVEVAR_RESTORE(LIBS)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

Re: [PATCH 2 of 3] tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

Quoted 8 lines · Ian Campbell
Quoted 1 line · Olaf Hering

Please rerun autoconf after applying this.

I did this but there was no change to the configure script.

I'm going to assume this is normal with the 2.67 version of autoconf and that changes would only be expected with 2.68 which you are using. IOW I'll commit as is.

It did not change the resulting configure file for me either, just the warning disappeared.

Olaf

#7 lore raw

Re: [PATCH 2 of 3] tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

Quoted 5 lines · Olaf Hering
Quoted 3 lines · Ian Campbell
Quoted 1 line · Olaf Hering

Please rerun autoconf after applying this.

Quoted 8 lines
Quoted 5 lines

I did this but there was no change to the configure script.

I'm going to assume this is normal with the 2.67 version of autoconf and that changes would only be expected with 2.68 which you are using. IOW I'll commit as is.

It did not change the resulting configure file for me either, just the warning disappeared.

OK, and since 2.67 doesn't warn I'd expect not to notice any change.

Thanks.

#8 lore raw

PATCH 1/1 tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

In reply to Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593017 -7200
# Node ID 752a11d976972b3dca886e16f7e07572cf7b3129 # Parent 59762b446ab4e6d9a851a91d1457c11f6c828d49 tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

Upcoming changes will move DOCDIR from Config.mk to config/Tools.mk. To preserve the currently used path, which ends with /xen, specify a value for PACKAGE_TARNAME. Without this change the path would end with /xen-hypervisor.

Also adjust mail adress to [email protected].

Please rerun autoconf after applying this.

tools/configure.ac +1 -1
diff -r 59762b446ab4 -r 752a11d97697 tools/configure.ac
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.67])
 AC_INIT([Xen Hypervisor], m4_esyscmd([../version.sh ../xen/Makefile]),
-    [[email protected]])
+    [[email protected]], [xen], [http://www.xen.org/])
 AC_CONFIG_SRCDIR([libxl/libxl.c])
 AC_CONFIG_FILES([../config/Tools.mk])
 AC_CONFIG_HEADERS([config.h])
Acked-by on v1 1/1
#9 lore raw

Re: [PATCH 3 of 3] tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

Quoted 12 lines · Olaf Hering

# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1339593017 -7200
# Node ID 752a11d976972b3dca886e16f7e07572cf7b3129 # Parent 59762b446ab4e6d9a851a91d1457c11f6c828d49 tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

Upcoming changes will move DOCDIR from Config.mk to config/Tools.mk. To preserve the currently used path, which ends with /xen, specify a value for PACKAGE_TARNAME. Without this change the path would end with /xen-hypervisor.

Quoted 5 lines

Also adjust mail adress to [email protected].

Please rerun autoconf after applying this.

Quoted 18 lines

diff -r 59762b446ab4 -r 752a11d97697 tools/configure.ac

tools/configure.ac +1 -1
@@ -3,7 +3,7 @@
 
 AC_PREREQ([2.67])
 AC_INIT([Xen Hypervisor], m4_esyscmd([../version.sh ../xen/Makefile]),
-    [[email protected]])
+    [[email protected]], [xen], [http://www.xen.org/])
 AC_CONFIG_SRCDIR([libxl/libxl.c])
 AC_CONFIG_FILES([../config/Tools.mk])
 AC_CONFIG_HEADERS([config.h])

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#10 lore raw
In reply to Olaf Hering
Quoted 3 lines · Olaf Hering

Changes:
tools/configure.ac: add version check for glib2 tools/m4: add AC_LANG_SOURCE to fix autoconf warnings

I have applied these two.

Quoted 1 line

tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

This one relates to the DOCDIR change which I think we have decided to defer until 4.3. Is there any benefit to taking this patch for 4.2 without the followup?

I've left it for now anyway.

Quoted 11 lines
 tools/configure.ac   |    4 ++--
 tools/m4/pthread.m4  |    4 ++--
 tools/m4/ptyfuncs.m4 |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#11 lore raw
Quoted 6 lines · Ian Campbell
Quoted 1 line · Olaf Hering

tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

This one relates to the DOCDIR change which I think we have decided to defer until 4.3. Is there any benefit to taking this patch for 4.2 without the followup?

Other than a different configure --help output I think there is no benefit.

Olaf

#12 lore raw
Quoted 11 lines · Olaf Hering
Quoted 6 lines · Ian Campbell
Quoted 1 line · Olaf Hering

tools/configure.ac: fill PACKAGE_TARNAME in AC_INIT

This one relates to the DOCDIR change which I think we have decided to defer until 4.3. Is there any benefit to taking this patch for 4.2 without the followup?

Other than a different configure --help output I think there is no benefit.

OK, lets leave it until 4.3 alongside the DOCDIR change then.

Cheers,
Ian.