Sorry, I missed this email when it first came in. The use of AC_LANG_PUSH and AC_LANG_POP come from previous bad experiences with macros setting other languages. I usually consider it good practice to not assume the C language has been previously set.
It is quite possible that nothing in OVS sets a different language in any of the existing macros today so you might safely get rid of these 2 lines. However, these lines ensure the correct language is used whether some other macro changes the language or not. Gary -----Original Message----- From: Ben Pfaff [mailto:b...@nicira.com] Sent: Thursday, July 16, 2015 16:21 To: Mussar, Gary Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] Fix detection of vhost_cuse in dpdk rte_config.h On Mon, Jul 06, 2015 at 05:41:38PM -0400, Mussar, Gary wrote: > Fix detection of vhost_cuse in dpdk rte_config.h > > Dpdk allows users to create a config that includes other config files > and then override values. > > Eg. > defconfig_x86_64-native_vhost_cuse-linuxapp-gcc: > > CONFIG_RTE_BUILD_COMBINE_LIBS=y > CONFIG_RTE_BUILD_SHARED_LIB=n > CONFIG_RTE_LIBRTE_VHOST=y > CONFIG_RTE_LIBRTE_VHOST_USER=n > > This allows you to have both a vhostuser and vhostcuse config in the > same source tree without the need to replicate everything in those > config files just to change a couple of settings. The resultant > .config file has all of the settings from the included files with the updated > settings at the end. > The resultant rte_config.h contains multiple undefs and defines for > the overridden settings. > > Eg. > > grep RTE_LIBRTE_VHOST_USER > > x86_64-native_vhost_cuse-linuxapp-gcc/include/rte_config.h > > The current mechanism to detect the RTE_LIBRTE_VHOST_USER setting > merely greps the rte_config.h file for the string "define > RTE_LIBRTE_VHOST_USER 1" > rather than the final setting of RTE_LIBRTE_VHOST_USER. The following > patch changes this test to detect the final setting of RTE_LIBRTE_VHOST_USER. > > Signed-off-by: Gary Mussar <gmus...@ciena.com> Daniele asked me to shepherd this in, since I know Autoconf pretty well. I have one question. Why does this patch use AC_LANG_PUSH and AC_LANG_POP? Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev