GPGRT-CONFIG(1) GnuPG GPGRT-CONFIG(1)

# [NAME](#NAME)

**gpgrt-config** - Helper script to get information about the installed version of gpg libraries

# [SYNOPSIS](#SYNOPSIS)

**gpgrt-config** \[*options*] *\[ module ]*

# [DESCRIPTION](#DESCRIPTION)

**gpgrt-config** is a script tool that is used by the autoconf macros shipped with gnupg software (e.g., AM\_PATH\_GPG\_ERROR and AM\_PATH\_GPGME) to determine the compiler and linker flags that should be used to compile and link programs that use the specific library (e.g., libgpg-error or libgpgme). **gpgrt-config** uses pkg-config .pc files as data source.

Apart from options **gpgrt-config** accepts a single argument **module** specifying the basename (without the ".pc"-suffix) of the pkg-config file to be used as input. **module** will default to **gpg-error** if it is not specified.

# [OPTIONS](#OPTIONS)

**gpgrt-config** accepts the following options:

[**--libdir=*LIBDIR***](#libdir=)

Parent directory path of pkgconfig file search path. e.g., ‘gpgrt-config --libdir=/usr/lib --exists gpgme’ will parse ‘*/usr/lib/pkgconfig/gpgme.pc*’.

[**--exists**](#exists)

Test whether the pkg-config file ‘*module.pc*’ exist and exits with success or error accordingly.

[**--modversion**](#modversion)

Print the currently installed version of **module** on the standard output.

[**--libs**](#libs)

Print the linker flags that are necessary to link a program using the **module**.

[**--cflags**](#cflags)

Print the compiler flags that are necessary to compile a program using the **module**.

[**--static**](#static)

Modifies output if linking statically instead of dynamically.

[**--variable=*VARNAME***](#variable=)

Output variable VARNAME from the module's pkg-config file.

# [BUGS](#BUGS)

**gpgrt-config** is tried to be compatible to pkg-config, and to support cross build well, but it is not intended to be a replacement.

2026-10-26 Libgpg-error 1.61

---

Document: gpgrt-config(1) from libgpg-error 1.61-r6 (Chainguard OS)
Source: https://github.com/gpg/libgpg-error.git
