On 05/08/2016 12:44 PM, Rainer Orth wrote:
With the recent change not to install libvtv without
--enable-vtable-verify, I noticed that gcc/g++ would still accept
-fvtable-verify without errors, only to emit obscure link-time errors
about missing vtv_*.o (which hadn't been installed in that situation
before) and libvtv.

It seems to me a much better user experience to emit a clear error
message in this case, which is what this patch does.

Generally ok, but...

+AC_ARG_ENABLE(vtable-verify,
+[AS_HELP_STRING([--enable-vtable-verify],
+               [enable 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])
+vtable_verify=`if test $enable_vtable_verify != no; then echo 1; else echo 0; 
fi`
+AC_DEFINE_UNQUOTED(ENABLE_VTABLE_VERIFY, $vtable_verify,
+[Define 0/1 if vtable verification feature is enabled.])

That looks a little overly complicated. Don't you get the enable_ variables set by autoconf? And if you do need the case statement, you might as well set things to 0/1 directly and skip the enable_vtable_verify variable entirely.


Bernd

Reply via email to