254609
diff --git a/Makefile.am b/Makefile.am
254609
index 728e30f..8717d3c 100644
254609
--- a/Makefile.am
254609
+++ b/Makefile.am
254609
@@ -10,6 +10,8 @@ endif
254609
 
254609
 nodist_include_HEADERS = jconfig.h
254609
 
254609
+pkgconfigdir = $(libdir)/pkgconfig
254609
+pkgconfig_DATA = pkgscripts/libjpeg.pc pkgscripts/libturbojpeg.pc
254609
 
254609
 HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
254609
 	jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h
254609
diff --git a/configure.ac b/configure.ac
254609
index 8e75dce..534558c 100644
254609
--- a/configure.ac
254609
+++ b/configure.ac
254609
@@ -21,6 +21,8 @@ AC_PROG_INSTALL
254609
 AC_PROG_LIBTOOL
254609
 AC_PROG_LN_S
254609
 
254609
+PKG_PROG_PKG_CONFIG
254609
+
254609
 # Check whether compiler supports pointers to undefined structures
254609
 AC_MSG_CHECKING(whether compiler supports pointers to undefined structures)
254609
 AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
254609
@@ -411,6 +413,8 @@ AC_CONFIG_FILES([pkgscripts/makemacpkg:release/makemacpkg.in])
254609
 AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
254609
 AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
254609
 AC_CONFIG_FILES([pkgscripts/uninstall:release/uninstall.in])
254609
+AC_CONFIG_FILES([pkgscripts/libjpeg.pc:release/libjpeg.pc.in])
254609
+AC_CONFIG_FILES([pkgscripts/libturbojpeg.pc:release/libturbojpeg.pc.in])
254609
 if test "x$with_turbojpeg" != "xno"; then
254609
 AC_CONFIG_FILES([tjbenchtest])
254609
 fi
254609
diff --git a/release/libjpeg.pc.in b/release/libjpeg.pc.in
254609
new file mode 100644
254609
index 0000000..40795f7
254609
--- /dev/null
254609
+++ b/release/libjpeg.pc.in
254609
@@ -0,0 +1,10 @@
254609
+prefix=@prefix@
254609
+exec_prefix=@exec_prefix@
254609
+libdir=@libdir@
254609
+includedir=@includedir@
254609
+
254609
+Name: libjpeg
254609
+Description: A SIMD-accelerated JPEG codec that provides the libjpeg API
254609
+Version: @PACKAGE_VERSION@
254609
+Libs: -L${libdir} -ljpeg
254609
+Cflags: -I${includedir}
254609
diff --git a/release/libturbojpeg.pc.in b/release/libturbojpeg.pc.in
254609
new file mode 100644
254609
index 0000000..7d4b656
254609
--- /dev/null
254609
+++ b/release/libturbojpeg.pc.in
254609
@@ -0,0 +1,10 @@
254609
+prefix=@prefix@
254609
+exec_prefix=@exec_prefix@
254609
+libdir=@libdir@
254609
+includedir=@includedir@
254609
+
254609
+Name: libturbojpeg
254609
+Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API
254609
+Version: @PACKAGE_VERSION@
254609
+Libs: -L${libdir} -lturbojpeg
254609
+Cflags: -I${includedir}