From 889fc82f8a2c788223c15c26a95064e1a9984c80 Mon Sep 17 00:00:00 2001
From: Feng Yu <fengyu@dhcp5-240.iucf.indiana.edu>
Date: Sun, 17 May 2009 03:59:49 -0400
Subject: [PATCH] pkgconfig integration

---
 libyaml/Makefile.am       |    4 ++++
 libyaml/configure.ac      |    6 +++++-
 libyaml/libyaml-1.0.pc.in |   13 +++++++++++++
 3 files changed, 22 insertions(+), 1 deletions(-)
 create mode 100644 libyaml/libyaml-1.0.pc.in

diff --git a/libyaml/Makefile.am b/libyaml/Makefile.am
index 7835b61..827ab5a 100644
--- a/libyaml/Makefile.am
+++ b/libyaml/Makefile.am
@@ -9,7 +9,11 @@ maintainer-clean-local:
 	-rm -f aclocal.m4 config.h.in configure config/*
 	-find ${builddir} -name Makefile.in -exec rm -f '{}' ';'
 
+pkgconfigdir=$(libdir)/pkgconfig
+pkgconfig_DATA= libyaml-1.0.pc
+
 .PHONY: bootstrap
 bootstrap: maintainer-clean
 	./bootstrap
 
+DISTCLEANFILES = libyaml-1.0.pc
diff --git a/libyaml/configure.ac b/libyaml/configure.ac
index 32bc8dd..417125c 100644
--- a/libyaml/configure.ac
+++ b/libyaml/configure.ac
@@ -67,7 +67,11 @@ AC_C_CONST
 AC_TYPE_SIZE_T
 
 # Define Makefiles.
-AC_CONFIG_FILES([include/Makefile src/Makefile Makefile tests/Makefile win32/Makefile])
+AC_CONFIG_FILES([include/Makefile \
+                 src/Makefile Makefile
+                 tests/Makefile
+                 win32/Makefile
+                 libyaml-1.0.pc])
 
 # Generate the "configure" script.
 AC_OUTPUT
diff --git a/libyaml/libyaml-1.0.pc.in b/libyaml/libyaml-1.0.pc.in
new file mode 100644
index 0000000..a29a13a
--- /dev/null
+++ b/libyaml/libyaml-1.0.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+bindir=@bindir@
+includedir=@includedir@
+datadir=@datadir@
+
+Name: libyaml
+Description: a C library for parsing and emitting YAML
+Version: @VERSION@
+Requires: 
+Libs: -L${libdir} -lyaml
+Cflags:
-- 
1.5.5.6

