From a8f9c2fbf562520d5729860564367ec2b115c903 Mon Sep 17 00:00:00 2001
From: Dan Egnor <egnor@ofb.net>
Date: Sun, 26 Oct 2003 22:46:53 +0000
Subject: [PATCH] Add pkg-config files

---
 .cvsignore         |  1 +
 Makefile.am        |  3 +++
 configure.ac       |  2 +-
 liboop-glib2.pc.in | 11 +++++++++++
 liboop.pc.in       | 10 ++++++++++
 5 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 liboop-glib2.pc.in
 create mode 100644 liboop.pc.in

diff --git a/.cvsignore b/.cvsignore
index 8889db2..26497af 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -9,3 +9,4 @@ ltmain.sh
 missing
 config.guess
 config.sub
+*.pc
diff --git a/Makefile.am b/Makefile.am
index 5757c4e..1eabe00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,6 +10,9 @@ AUTOMAKE_OPTIONS = foreign 1.7
 lib_LTLIBRARIES = liboop.la @LIBOOP_LIBS@
 EXTRA_LTLIBRARIES = liboop-adns.la liboop-glib2.la liboop-glib.la liboop-tcl.la liboop-www.la liboop-rl.la
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = liboop.pc liboop-glib2.pc
+
 # versions updated as of 1.0
 liboop_la_LDFLAGS = -version-info 4:1:0 # version:revision:age
 liboop_la_SOURCES = sys.c select.c signal.c alloc.c read.c read-fd.c read-mem.c
diff --git a/configure.ac b/configure.ac
index 659713e..1388e98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,4 +124,4 @@ AC_SUBST(WWW_INCLUDES)
 AC_SUBST(WWW_LIBS)
 AC_SUBST(READLINE_LIBS)
 AC_SUBST(LIBOOP_LIBS)
-AC_OUTPUT(Makefile)
+AC_OUTPUT([Makefile liboop.pc liboop-glib2.pc])
diff --git a/liboop-glib2.pc.in b/liboop-glib2.pc.in
new file mode 100644
index 0000000..de6a8e7
--- /dev/null
+++ b/liboop-glib2.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: liboop-glib2
+Description: Event loop management library (GLIB2 support)
+Version: @VERSION@
+Requires: liboop = @VERSION@
+Libs: -L${libdir} -loop-glib2
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/liboop.pc.in b/liboop.pc.in
new file mode 100644
index 0000000..bb0edc7
--- /dev/null
+++ b/liboop.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: liboop
+Description: Event loop management library
+Version: @VERSION@
+Libs: -L${libdir} -lpthread -loop
+Cflags: -D_REENTRANT -I${includedir}
-- 
GitLab