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)

# This emits -fPIC flag which lets ghci fail with
#   unknown symbol `DW.ref.__gxx_personality_v0'
# echo Cflags: $(llvm-config --cflags)

# echo Libs.private: $(llvm-config --ldflags)
# echo Libs: $(llvm-config --libs)
# echo Libs: -L$(llvm-config --libdir)
# echo Libs: $(for dir in $(llvm-config --libdirs); do echo -L$dir; done)
# echo Libs.private: -lm
