diff options
author | Ben Pfaff <blp@ovn.org> | 2018-01-11 15:49:24 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-01-12 10:46:50 -0800 |
commit | d4042a708f08a79bb1f7501dec16607a6f602490 (patch) | |
tree | 34635219a99a6467cc338f30c68f7ffafb32792c /acinclude.m4 | |
parent | 2daae85a06d5e0038b94f9a6403bdbf2845ee7b6 (diff) | |
download | openvswitch-d4042a708f08a79bb1f7501dec16607a6f602490.tar.gz |
configure: New --enable-sparse option to enable sparse checking by default.
Until now, "make" called sparse to do checking only if C=1 was passed on
the command line. It was easy for developers to forget to specify that.
This commit adds another option: specifying --enable-sparse on the
configure command line enables sparse checking by default. (It can still
be disabled with C=0.)
Requested-by: Justin Pettit <jpettit@ovn.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 0eeb1bf89..16a57a341 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1005,7 +1005,13 @@ AC_DEFUN([OVS_ENABLE_SPARSE], : ${SPARSE=sparse} AC_SUBST([SPARSE]) AC_CONFIG_COMMANDS_PRE( - [CC='$(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) $(SPARSE_WERROR) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"')'])]) + [CC='$(if $(C:0=),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) $(SPARSE_WERROR) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"')']) + + AC_ARG_ENABLE( + [sparse], + [AC_HELP_STRING([--enable-sparse], [Run "sparse" by default])], + [], [enable_sparse=no]) + AM_CONDITIONAL([ENABLE_SPARSE_BY_DEFAULT], [test $enable_sparse = yes])]) dnl OVS_CTAGS_IDENTIFIERS dnl |