diff --git a/Makefile.am b/Makefile.am index 2bfad464..40c5ed18 100644 --- a/Makefile.am +++ b/Makefile.am @@ -267,6 +267,11 @@ libuv_la_LIBADD = uv-dtrace.lo CLEANFILES += src/unix/uv-dtrace.o src/unix/uv-dtrace.lo endif +if HAVE_PKG_CONFIG +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = @PACKAGE_NAME@.pc +endif + SUFFIXES = .d include/uv-dtrace.h: src/unix/uv-dtrace.d diff --git a/configure.ac b/configure.ac index c7e3df65..d52be980 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,12 @@ AM_CONDITIONAL([NETBSD], [AS_CASE([$host_os], [netbsd*], [true], [false])]) AM_CONDITIONAL([OPENBSD], [AS_CASE([$host_os], [openbsd*], [true], [false])]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os], [solaris*], [true], [false])]) AM_CONDITIONAL([WINNT], [AS_CASE([$host_os], [mingw*], [true], [false])]) +PKG_PROG_PKG_CONFIG([0.20]) +AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"]) +AC_SUBST(HAVE_PKG_CONFIG) PANDORA_ENABLE_DTRACE +AS_IF([test "x$PKG_CONFIG" != "x"], [ + AC_CONFIG_FILES([libuv.pc]) +]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/libuv.pc.in b/libuv.pc.in new file mode 100644 index 00000000..86c1a126 --- /dev/null +++ b/libuv.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Version: @PACKAGE_VERSION@ +Description: multi-platform support library with a focus on asynchronous I/O. + +Libs: -L${libdir} -luv +Cflags: -I${includedir}