Skip to content

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Nov 12, 2016

Use pkg-config to find cppunit, libxml2 and expat. All those libraries
provide pkg-config files, and in all of those cases the pkg-config macro
is superior to the custom macros used currently.

The advantages of pkg-config files include:

  • Explicit static linking support via --static. Currently, e.g.
    'xml2-config --libs' prints all libraries needed for static linking when
    doing dynamic linking unnecessary, resulting in unnecessary direct deps.

  • Better cross-build support. You don't have to build the additional
    *-config tools for target.

  • Better multilib support. Per-ABI pkgconfig directories are commonly
    supported while packages usually fail to look for per-CHOST *-config
    variants.

  • Better override support. The current macros allow little to no
    result overrides, the pkg-config macros let you pass FOO_CFLAGS
    and FOO_LIBS manually.

  • Cleaner version checks. The code used in libxml.m4 is really creepy.

Use pkg-config to find cppunit, libxml2 and expat. All those libraries
provide pkg-config files, and in all of those cases the pkg-config macro
is superior to the custom macros used currently.

The advantages of pkg-config files include:

- Explicit static linking support via --static. Currently, e.g.
'xml2-config --libs' prints all libraries needed for static linking when
doing dynamic linking unnecessary, resulting in unnecessary direct deps.

- Better cross-build support. You don't have to build the additional
*-config tools for target.

- Better multilib support. Per-ABI pkgconfig directories are commonly
supported while packages usually fail to look for per-CHOST *-config
variants.

- Better override support. The current macros allow little to no
result overrides, the pkg-config macros let you pass FOO_CFLAGS
and FOO_LIBS manually.

- Cleaner version checks. The code used in libxml.m4 is really creepy.
@tatsuhiro-t
Copy link
Collaborator

Thank you for PR. It looks good to me. We will merge this PR after v1.29.0 is released.

@tatsuhiro-t tatsuhiro-t added this to the v1.30.0 milestone Nov 13, 2016
@tatsuhiro-t tatsuhiro-t merged commit c087ab1 into aria2:master Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants