[ovs-dev] [PATCH v3 1/1] acinclude: Also use LIBS from dpkg pkg-config
Luca Boccassi
bluca at debian.org
Thu Feb 7 11:34:31 UTC 2019
On Thu, 2019-02-07 at 12:00 +0100, Christian Ehrhardt wrote:
> [...]
>
> > case "$with_dpdk" in
> > yes)
> > DPDK_AUTO_DISCOVER="true"
> > - PKG_CHECK_MODULES([DPDK], [libdpdk],
> > - [DPDK_INCLUDE="$DPDK_CFLAGS"],
> > - [DPDK_INCLUDE="-I/usr/local/include/dpdk
> > -I/usr/include/dpdk"])
> > + PKG_CHECK_MODULES_STATIC([DPDK], [libdpdk],
> > + [DPDK_INCLUDE="$DPDK_CFLAGS",
> > DPDK_LIB="$DPDK_LIBS"],
> > + [DPDK_INCLUDE="-
> > I/usr/local/include/dpdk -I/usr/include/dpdk", DPDK_LIB="-ldpdk"])
> > ;;
> > *)
> > DPDK_AUTO_DISCOVER="false"
>
> While working fine in all my builds (and it seems on travis now) I
> got
> reports of the statements above creating a colon in the assignment on
> some builds - thanks James (on CC now).
> It was adding a trailing colon to the FLAGS which broke his build.
>
> I wanted to ask the more experienced autoconf users if that makes any
> sense?
>
> We wondered if instead of colon actions inside the action sections
> would better be newline [1] separated instead:
> dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-
> FOUND],
> dnl [ACTION-IF-NOT-FOUND])
>
> [1]: https://stackoverflow.com/questions/12735432/how-to-pack-multipl
> e-statements
>
> Like the following then:
>
> -+ [DPDK_INCLUDE="$DPDK_CFLAGS",
> DPDK_LIB="$DPDK_LIBS"],
> -+
> [DPDK_INCLUDE="-I/usr/local/include/dpdk -I/usr/include/dpdk",
> DPDK_LIB="-ldpdk"])
> ++ [DPDK_INCLUDE="$DPDK_CFLAGS"
> ++ DPDK_LIB="$DPDK_LIBS"],
> ++
> [DPDK_INCLUDE="-I/usr/local/include/dpdk -I/usr/include/dpdk"
> ++ DPDK_LIB="-ldpdk"])
>
> If that assumption could be backed by some autoconf experience I'd
> make a v4 which splits by newlines instead of the colon.
Hi,
Yes using newlines will work, I've used it before. Or rather should, we
are talking about autoconf after all :-)
https://github.com/zeromq/libzmq/blob/master/configure.ac#L559
--
Kind regards,
Luca Boccassi
More information about the dev
mailing list