Re: [vtv] fix default configure

2013-08-08 Thread Benjamin De Kosnik

More patches to fix disable issus on non-linux.

 Here's a patch for the build failure on darwin.

Will check in when testing completes.

tested x86/linux
tested x86_64/darwin12

-benjamin2013-08-08  Benjamin Kosnik  b...@rehat.com
	Michael Meissner meiss...@linux.vnet.ibm.com

	* configure.tgt : Simplify, just use VTV_SUPPORTED.


diff --git a/libvtv/configure.tgt b/libvtv/configure.tgt
index a84ed27..801d2f0 100644
--- a/libvtv/configure.tgt
+++ b/libvtv/configure.tgt
@@ -19,6 +19,7 @@
 # lets us skip running autoconf when modifying target specific information.
 
 # Filter out unsupported systems.
+VTV_SUPPORTED=no
 case ${target} in
   x86_64-*-linux* | i?86-*-linux*)
 	VTV_SUPPORTED=yes
@@ -30,9 +31,7 @@ case ${target} in
   arm*-*-linux*)
 	;;
   x86_64-*-darwin[1]* | i?86-*-darwin[1]*)
-	VTV_SUPPORTED=no
 	;;
   *)
-	UNSUPPORTED=1
 	;;
 esac
2013-08-02  Benjamin Kosnik  b...@redhat.com

	* configure.ac: Adjust to check VTV_SUPPORTED.
	* configure: Regenerated.

diff --git a/configure.ac b/configure.ac
index bcbc95c..6f3d801 100644
--- a/configure.ac
+++ b/configure.ac
@@ -561,7 +561,7 @@ if test -d ${srcdir}/libvtv; then
 	AC_MSG_CHECKING([for libvtv support])
 	if (srcdir=${srcdir}/libvtv; \
 		. ${srcdir}/configure.tgt; \
-		test -n $UNSUPPORTED)
+		test $VTV_SUPPORTED != yes)
 	then
 	AC_MSG_RESULT([no])
 	noconfigdirs=$noconfigdirs target-libvtv


[vtv] fix default configure

2013-08-07 Thread Benjamin De Kosnik

Here's a patch for the build failure on darwin.

tested x86/linux

-benjamindiff --git a/libvtv/Makefile.am b/libvtv/Makefile.am
index ab3233f..73acfb4 100644
--- a/libvtv/Makefile.am
+++ b/libvtv/Makefile.am
@@ -19,7 +19,11 @@
 ## along with this library; see the file COPYING3.  If not see
 ## http://www.gnu.org/licenses/.
 
+if ENABLE_VTABLE_VERIFY
 SUBDIRS = testsuite
+else
+SUBDIRS = 
+endif
 
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
diff --git a/libvtv/acinclude.m4 b/libvtv/acinclude.m4
index 6faca98..53e62d2 100644
--- a/libvtv/acinclude.m4
+++ b/libvtv/acinclude.m4
@@ -30,17 +30,6 @@ dnl  - lots of tools, like CC and CXX
 dnl
 AC_DEFUN([LIBVTV_CONFIGURE], [
 
-  # Use same top-level configure hooks in libgcc/libstdc++/libvtv.
-  AC_ARG_ENABLE(vtable-verify,
-  [  --enable-vtable-verifyEnable vtable verification feature ],
-  [case $enableval in
-   yes) enable_vtable_verify=yes ;;
-   no)  enable_vtable_verify=no ;;
-   *)   enable_vtable_verify=no;;
-   esac],
-  [enable_vtable_verify=no])
-  AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $enable_vtable_verify = yes)
-
   # These need to be absolute paths, yet at the same time need to
   # canonicalize only relative paths, because then amd will not unmount
   # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
diff --git a/libvtv/configure.ac b/libvtv/configure.ac
index cc8e280..4724312 100644
--- a/libvtv/configure.ac
+++ b/libvtv/configure.ac
@@ -20,6 +20,34 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
 [version_specific_libs=no])
 AC_MSG_RESULT($version_specific_libs)
 
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+AC_MSG_CHECKING([for --enable-vtable-verify])
+AC_ARG_ENABLE(vtable-verify,
+[  --enable-vtable-verifyEnable vtable verification feature ],
+[case $enableval in
+ yes) enable_vtable_verify=yes ;;
+ no)  enable_vtable_verify=no ;;
+ *)   enable_vtable_verify=no;;
+ esac],
+[enable_vtable_verify=no])
+AC_MSG_RESULT($enable_vtable_verify)
+
+# See if supported.
+unset VTV_SUPPORTED
+AC_MSG_CHECKING([for host support for vtable verification])
+. ${srcdir}/configure.tgt
+AC_MSG_RESULT($VTV_SUPPORTED)
+
+# Decide if it's usable.
+use_vtable_verify=no
+if test x$VTV_SUPPORTED = xyes; then
+  if test x$enable_vtable_verify = xyes; then
+use_vtable_verify=yes
+AC_MSG_NOTICE(using vtable verification)
+  fi
+fi 
+AM_CONDITIONAL(ENABLE_VTABLE_VERIFY, test $use_vtable_verify = yes)
+
 # Do not delete or change the following two lines.  For why, see
 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
 AC_CANONICAL_SYSTEM
@@ -31,6 +59,8 @@ AM_INIT_AUTOMAKE(foreign no-dist)
 AM_ENABLE_MULTILIB(, ..)
 AM_MAINTAINER_MODE
 
+LIBVTV_CONFIGURE
+
 # Calculate toolexeclibdir
 # Also toolexecdir, though it's only used in toolexeclibdir
 case ${version_specific_libs} in
@@ -102,13 +132,6 @@ else
   multilib_arg=
 fi
 
-LIBVTV_CONFIGURE
-
-# Get target configury.
-unset VTV_SUPPORTED
-. ${srcdir}/configure.tgt
-AM_CONDITIONAL(VTV_SUPPORTED, [test x$VTV_SUPPORTED = xyes])
-
 AC_CONFIG_FILES([Makefile])
 
 if test x$VTV_SUPPORTED = xyes; then