Add the archs variable in the pkg-config file (#1828)
Usage:
$ pkg-config --variable=archs capstone
arm aarch64 m68k mips powerpc sparc systemz x86
xcore tms320c64x m680x evm riscv mos65xx wasm bpf
Co-authored-by: pancake <pancake@nopcode.org>
diff --git a/Makefile b/Makefile
index ade74fe..942dcca 100644
--- a/Makefile
+++ b/Makefile
@@ -609,4 +609,5 @@
echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF)
echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF)
echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)
+ echo 'archs: ${CAPSTONE_ARCHS}' >> $(PKGCFGF)
endef
diff --git a/capstone.pc.in b/capstone.pc.in
index b8ea3d3..ea52256 100644
--- a/capstone.pc.in
+++ b/capstone.pc.in
@@ -10,3 +10,4 @@
archive=${libdir}/libcapstone.a
Libs: -L${libdir} -lcapstone
Cflags: -I${includedir}
+archs=@CAPSTONE_ARCHITECTURES@