From c5fa726e189d2c43a81ca3edb37e200a4af73b42 Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Sat, 26 Mar 2011 10:15:44 -0700 Subject: [PATCH] build: add pkgconfig files patch by Jan Engelhardt (jengelh at medozas dot de) fixes http://code.google.com/p/webp/issues/detail?id=64 Change-Id: I5b3bc9b88af967e48b949d9c85daacda45693b1f --- configure.ac | 5 +++++ src/.gitignore | 1 + src/Makefile.am | 4 ++++ src/libwebp.pc.in | 11 +++++++++++ 4 files changed, 21 insertions(+) create mode 100644 src/.gitignore create mode 100644 src/libwebp.pc.in diff --git a/configure.ac b/configure.ac index 512ac4c6..cb7871d4 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,11 @@ AM_INIT_AUTOMAKE AC_PROG_LIBTOOL AM_PROG_CC_C_O +AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], + [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), + [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) +AC_SUBST([pkgconfigdir]) + dnl === check for PNG support === PNG_INCLUDES="" diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 00000000..49ca83d0 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +/*.pc diff --git a/src/Makefile.am b/src/Makefile.am index c3db4bbd..d408e318 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,3 +10,7 @@ libwebp_la_LDFLAGS = -version-info 0:0:0 libwebpinclude_HEADERS = webp/types.h webp/decode.h webp/decode_vp8.h \ webp/encode.h libwebpincludedir = $(includedir)/webp + +pkgconfig_DATA = libwebp.pc + +${pkgconfig_DATA}: ${top_builddir}/config.status diff --git a/src/libwebp.pc.in b/src/libwebp.pc.in new file mode 100644 index 00000000..a925dfa4 --- /dev/null +++ b/src/libwebp.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libwebp +Description: Library for the WebP graphics format +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lwebp +Libs.private: -lm