diff -Naur a/configure b/configure
--- a/configure	2017-12-07 20:55:50.000000000 +0600
+++ b/configure	2024-03-15 16:51:27.191259824 +0600
@@ -14801,6 +14801,8 @@
 
 ac_config_files="$ac_config_files src/versioninfo.rc"
 
+ac_config_files="$ac_config_files src/libassuan.pc"
+
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -15921,6 +15923,7 @@
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
     "src/libassuan-config") CONFIG_FILES="$CONFIG_FILES src/libassuan-config" ;;
     "src/versioninfo.rc") CONFIG_FILES="$CONFIG_FILES src/versioninfo.rc" ;;
+    "src/libassuan.pc") CONFIG_FILES="$CONFIG_FILES src/libassuan.pc" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
diff -Naur a/configure.ac b/configure.ac
--- a/configure.ac	2017-12-07 20:53:45.000000000 +0600
+++ b/configure.ac	2024-03-15 17:09:36.553206721 +0600
@@ -73,9 +73,6 @@
 AC_SUBST(LIBASSUAN_LT_AGE)
 AC_SUBST(LIBASSUAN_LT_REVISION)
 
-PACKAGE=$PACKAGE_NAME
-VERSION=$PACKAGE_VERSION
-
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
 AM_MAINTAINER_MODE
@@ -88,12 +85,6 @@
 
 AC_GNU_SOURCE
 
-
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
-AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",[Bug report address])
 VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \
                           mym4_minor mym4_micro)
 AC_SUBST(VERSION_NUMBER)
@@ -485,6 +476,7 @@
 AC_CONFIG_FILES([tests/Makefile])
 AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
 AC_CONFIG_FILES([src/versioninfo.rc])
+AC_CONFIG_FILES([src/libassuan.pc])
 
 AC_OUTPUT
 
diff -Naur a/libassuan.pc.in b/libassuan.pc.in
--- a/src/libassuan.pc.in	1970-01-01 06:00:00.000000000 +0600
+++ b/scr/libassuan.pc.in	2024-03-15 16:47:41.398721127 +0600
@@ -0,0 +1,15 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+host=@LIBASSUAN_CONFIG_HOST@
+api_version=@LIBASSUAN_CONFIG_API_VERSION@
+
+Name: libassuan
+Description: IPC library for the GnuPG components
+Requires.private: gpg-error
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir} @LIBASSUAN_CONFIG_CFLAGS@
+Libs: -L${libdir} @LIBASSUAN_CONFIG_LIBS@
+Libs.private: @NETLIBS@
+URL: https://www.gnupg.org/related_software/libassuan/index.html
diff -Naur a/src/libassuan-config.in b/src/libassuan-config.in
--- a/src/libassuan-config.in	2017-11-15 21:52:31.000000000 +0600
+++ b/src/libassuan-config.in	2024-03-15 17:13:47.121583049 +0600
@@ -70,7 +70,16 @@
     --exec-prefix)
       echo_exec_prefix=yes
       ;;
-    --version)
+    --variable=*)
+        case "${1#*=}" in
+            prefix) echo "$prefix" ;;
+            exec_prefix) echo "$exec_prefix" ;;
+            host) echo "$my_host" ;;
+            api_version) echo "$api_version" ;;
+        esac
+        exit 0
+        ;;
+    --modversion|--version)
       echo "@VERSION@"
       exit 0
       ;;
diff -Naur a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am	2017-11-15 21:31:49.000000000 +0600
+++ b/src/Makefile.am	2024-03-15 17:08:47.061527425 +0600
@@ -19,8 +19,12 @@
 # SPDX-License-Identifier: LGPL-2.1+
 ## Process this file with automake to produce Makefile.in
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libassuan.pc
+
 EXTRA_DIST = libassuan-config.in libassuan.m4 libassuan.vers \
-             versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def
+             versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def \
+             libassuan.pc.in
 AM_CPPFLAGS = -I..
 
 bin_SCRIPTS = libassuan-config
diff -Naur a/src/Makefile.in b/src/Makefile.in
--- a/src/Makefile.in	2017-12-07 20:55:49.000000000 +0600
+++ b/src/Makefile.in	2024-03-15 17:01:20.349420974 +0600
@@ -111,7 +111,7 @@
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(srcdir)/libassuan-config.in $(srcdir)/versioninfo.rc.in \
 	setenv.c funopen.c isascii.c stpcpy.c putc_unlocked.c \
-	memrchr.c $(top_srcdir)/build-aux/depcomp
+	memrchr.c $(top_srcdir)/build-aux/depcomp $(srcdir)/libassuan.pc.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \
 	$(top_srcdir)/m4/gpg-error.m4 $(top_srcdir)/m4/libtool.m4 \
@@ -123,7 +123,7 @@
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = libassuan-config versioninfo.rc
+CONFIG_CLEAN_FILES = libassuan-config versioninfo.rc libassuan.pc
 CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -416,7 +416,8 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 EXTRA_DIST = libassuan-config.in libassuan.m4 libassuan.vers \
-             versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def
+             versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def \
+             libassuan.pc.in
 
 AM_CPPFLAGS = -I..
 bin_SCRIPTS = libassuan-config
