summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--share/Makefile.am4
-rw-r--r--share/pkgconfig/Makefile.am4
-rw-r--r--share/pkgconfig/hexchat-plugin.pc.in9
4 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 11b09c20..fac9ee8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -930,6 +930,7 @@ AC_SUBST(PY_LIBS)
 AC_SUBST(DBUS_CFLAGS)
 AC_SUBST(DBUS_LIBS)
 
+m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
 
 PLUGIN_INCLUDES='-I$(top_srcdir)/plugins'
 AC_SUBST(PLUGIN_INCLUDES)
@@ -955,6 +956,8 @@ Makefile
 share/Makefile
 share/icons/Makefile
 share/misc/Makefile
+share/pkgconfig/Makefile
+share/pkgconfig/hexchat-plugin.pc
 src/Makefile
 src/common/Makefile
 src/common/dbus/Makefile
diff --git a/share/Makefile.am b/share/Makefile.am
index 6d143b61..7642770e 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = pkgconfig
+
 if DO_GTK
-SUBDIRS = icons misc
+SUBDIRS += icons misc
 endif
diff --git a/share/pkgconfig/Makefile.am b/share/pkgconfig/Makefile.am
new file mode 100644
index 00000000..7ee0ac95
--- /dev/null
+++ b/share/pkgconfig/Makefile.am
@@ -0,0 +1,4 @@
+pkgcfgdir = $(pkgconfigdir)
+pkgcfg_DATA = hexchat-plugin.pc
+
+EXTRA_DIST = hexchat-plugin.pc.in
diff --git a/share/pkgconfig/hexchat-plugin.pc.in b/share/pkgconfig/hexchat-plugin.pc.in
new file mode 100644
index 00000000..23957236
--- /dev/null
+++ b/share/pkgconfig/hexchat-plugin.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+includedir=@includedir@
+hexchatlibdir=@hexchatlibdir@
+
+Name: HexChat plugins
+Description: Header and path for HexChat plugins
+Version: @VERSION@
+Cflags: -I${includedir}