On 20/03/12 14:00, Dave Reisner wrote: > Borrowed heavily from libarchive. > > Signed-off-by: Dave Reisner <dreis...@archlinux.org> > --- > Throw a bone to the few projects who link against us... > > configure.ac | 1 + > lib/libalpm/Makefile.am | 3 +++ > lib/libalpm/libalpm.pc.in | 11 +++++++++++ > 3 files changed, 15 insertions(+) > create mode 100644 lib/libalpm/libalpm.pc.in > > diff --git a/configure.ac b/configure.ac > index 12a6e65..9093a90 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -382,6 +382,7 @@ AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", > [The shell used to run > AC_CONFIG_FILES([ > lib/libalpm/Makefile > lib/libalpm/po/Makefile.in > +lib/libalpm/libalpm.pc > src/pacman/Makefile > src/pacman/po/Makefile.in > src/util/Makefile > diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am > index 61dcb87..17d9a58 100644 > --- a/lib/libalpm/Makefile.am > +++ b/lib/libalpm/Makefile.am > @@ -23,6 +23,9 @@ if ENABLE_GNU89_INLINE_CC > AM_CFLAGS += -fgnu89-inline > endif > > +pkgconfigdir = $(libdir)/pkgconfig > +pkgconfig_DATA = libalpm.pc > + > libalpm_la_SOURCES = \ > add.h add.c \ > alpm.h alpm.c \ > diff --git a/lib/libalpm/libalpm.pc.in b/lib/libalpm/libalpm.pc.in > new file mode 100644 > index 0000000..12bea28 > --- /dev/null > +++ b/lib/libalpm/libalpm.pc.in > @@ -0,0 +1,11 @@ > +prefix=@prefix@ > +exec_prefix=@exec_prefix@ > +libdir=@libdir@ > +includedir=@includedir@ > + > +Name: libalpm > +Description: Arch Linux package management library > +Version: @VERSION@ > +Cflags: -I${includedir} > +Libs: -L${libdir} -lalpm > +Libs.private: @LIBS@
I do not think this is quite right... I end up with: Cflags: -I${includedir} Libs: -L${libdir} -lalpm Libs.private: -lssl -larchive -lm -lgpgme -lassuan -lgpg-error Note, no -lcurl or -lcrypto (although that is somewhat covered by -lssl) I am not pkg-config expert... but I think libcurl goes in a "Requires.private" section as it has a pkg-config files. So should libcrypto and libarchive. Libs.private should only have -libgpgme. Allan