LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 9405 - Support for pkg-config
Summary: Support for pkg-config
Status: NEW
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-config (show other bugs)
Version: 2.8
Hardware: Other All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL: http://pkg-config.freedesktop.org/
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-05 03:03 PST by Henning Thielemann
Modified: 2019-05-06 01:48 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Thielemann 2011-03-05 03:03:34 PST
I would very like to have support for the pkg-config tool, since that is directly supported by Haskell's build system Cabal.
Comment 1 Alexandre Demers 2013-11-25 00:45:07 PST
Is there no .pc file because there is no interest from the developpers or is it because no one volonteered to do it? In the latter case, I'll do it there is an interest to merge it in the source tree.
Comment 2 Henning Thielemann 2014-01-19 03:42:14 PST
I came up with the following bash script that writes a pc file to stdout. The pc file addresses the LLVM shared object.

$ cat make-pkg-config.sh 
version=$(llvm-config --version)

echo Name: LLVM
echo Description: Low-level Virtual Machine compiler framework
# We keep the initial numeric part of a version number.
# I.e. a suffix like 'svn' or 'rc' will be removed.
# This way Cabal can match on version ranges.
echo Version: $(echo ${version} | sed 's/\([0-9.]\+\).*/\1/')
echo URL: http://www.llvm.org/
echo Requires:
echo Conflicts:
echo Libs: -L$(llvm-config --libdir) -lLLVM-${version}
echo Cflags: -I$(llvm-config --includedir)
Comment 3 Henning Thielemann 2014-03-11 04:24:00 PDT
I have written a Haskell program that performs almost the same as the given shell script:
  http://hackage.haskell.org/package/llvm-pkg-config

You may install it with
$ cabal install llvm-pkg-config