pkgconf - Man Page

a system for configuring build dependency information

Synopsis

pkgconf[options] [list of modules]

Description

pkgconf is a program which helps to configure compiler and linker flags for development libraries. This allows build systems to detect other dependencies and use them with the system toolchain.

General Options

--version

Display the supported pkg-config version and exit.

--atleast-pkgconfig-version=VERSION

Exit with error if we do not support the requested pkg-config version.

--errors-to-stdout

Print all errors on the main output stream instead of the error output stream.

--silence-errors

Do not display any errors at all.

--list-all

Walk all directories listed in the PKG_CONFIG_PATH environmental variable and display information on packages which have registered information there.

--simulate

Simulates resolving a dependency graph based on the requested modules on the command line. Dumps a series of trees denoting pkgconf's resolver state.

--no-cache

Skip caching packages when they are loaded into the internal resolver. This may result in an alternate dependency graph being computed.

--ignore-conflicts

Ignore ‘Conflicts’ rules in modules.

--env-only

Learn about pkgconf's configuration strictly from environmental variables.

--validate package ...

Validate specific ‘.pc’ files for correctness.

--maximum-traverse-depth=DEPTH

Impose a limit on the allowed depth in the dependency graph. For example, a depth of 2 will restrict the resolver from acting on child dependencies of modules added to the resolver's solution.

--static

Compute a deeper dependency graph and use compiler/linker flags intended for static linking.

--shared

Compute a simple dependency graph that is only suitable for shared linking.

--pure

Treats the computed dependency graph as if it were pure. This is mainly intended for use with the --static flag.

--no-provides

Ignore ‘Provides’ rules in modules when resolving dependencies.

--with-path=PATH

Adds a new module search path to pkgconf's dependency resolver. Paths added in this way are given preference before other paths.

--define-prefix

Attempts to determine the prefix variable to use for CFLAGS and LIBS entry relocations. This is mainly useful for platforms where framework SDKs are relocatable, such as Windows.

--dont-define-prefix

Disables the ‘define-prefix’ feature.

--prefix-variable=VARIABLE

Sets the ‘prefix’ variable used by the ‘define-prefix’ feature.

--relocate=PATH

Relocates a path using the pkgconf_path_relocate API. This is mainly used by the testsuite to provide a guaranteed interface to the system's path relocation backend.

--dont-relocate-paths

Disables the path relocation feature.

Module-Specific Options

--atleast-version=VERSION

Exit with error if a module's version is less than the specified version.

--exact-version=VERSION

Exit with error if a module's version is not exactly the specified version.

--max-version=VERSION

Exit with error if a module's version is greater than the specified version.

--exists

Exit with a non-zero result if the dependency resolver was unable to find all of the requested modules.

--uninstalled

Exit with a non-zero result if the dependency resolver uses an ‘uninstalled’ module as part of its solution.

--no-uninstalled

Forbids the dependency resolver from considering 'uninstalled' modules as part of a solution.

Query-Specific Options

--cflags, --cflags-only-I, --cflags-only-other

Display either all CFLAGS, only -I CFLAGS or only CFLAGS that are not -I.

--libs, --libs-only-L, --libs-only-l, --libs-only-other

Display either all linker flags, only -L linker flags, only -l linker flags or only linker flags that are not -L or -l.

--keep-system-cflags, --keep-system-libs

Keep CFLAGS or linker flag fragments that would be filtered due to being included by default in the compiler.

--define-variable=VARNAME=VALUE

Define VARNAME as VALUE. Variables are used in query output, and some modules' results may change based on the presence of a variable definition.

--print-variables

Print all seen variables for a module to the output channel.

--print-provides

Print all relevant ‘Provides’ entries for a module to the output channel.

--variable=VARNAME

Print the value of VARNAME.

--print-requires, --print-requires-private

Print the modules included in either the Requires field or the Requires.private field.

--digraph

Dump the dependency resolver's solution as a graphviz ‘dot’ file. This can be used with graphviz to visualize module interdependencies.

--path

Display the filenames of the ‘.pc’ files used by the dependency resolver for a given dependency set.

--env=VARNAME

Print the requested values as variable declarations in a similar format as the env(1) command.

--fragment-filter=TYPES

Filter the fragment lists for the specified types.

--modversion

Print the version of the queried module.

Environment

PKG_CONFIG_PATH

List of secondary directories where ‘.pc’ files are looked up.

PKG_CONFIG_LIBDIR

List of primary directories where ‘.pc’ files are looked up.

PKG_CONFIG_SYSROOT_DIR

‘sysroot’ directory, will be prepended to every path defined in PKG_CONFIG_PATH. Useful for cross compilation.

PKG_CONFIG_TOP_BUILD_DIR

Provides an alternative setting for the ‘pc_top_builddir’ global variable.

PKG_CONFIG_PURE_DEPGRAPH

If set, enables the same behaviour as the --pure flag.

PKG_CONFIG_SYSTEM_INCLUDE_PATH

List of paths that are considered system include paths by the toolchain. This is a pkgconf-specific extension.

PKG_CONFIG_SYSTEM_LIBRARY_PATH

List of paths that are considered system library paths by the toolchain. This is a pkgconf-specific extension.

PKG_CONFIG_DISABLE_UNINSTALLED

If set, enables the same behaviour as the --no-uninstalled flag.

PKG_CONFIG_LOG

‘logfile’ which is used for dumping audit information concerning installed module versions.

PKG_CONFIG_DEBUG_SPEW

If set, enables additional debug logging. The format of the debug log messages is implementation-specific.

PKG_CONFIG_DONT_RELOCATE_PATHS

If set, disables the path relocation feature.

PKG_CONFIG_MSVC_SYNTAX

If set, uses MSVC syntax for fragments.

PKG_CONFIG_FDO_SYSROOT_RULES

If set, follow the sysroot prefixing rules that freedesktop.org pkg-config uses.

DESTDIR

If set to PKG_CONFIG_SYSROOT_DIR, assume that PKG_CONFIG_FDO_SYSROOT_RULES is set.

Examples

Displaying the CFLAGS of a package:

$ pkgconf --cflags foo

-fPIC -I/usr/include/foo

See Also

pc(5), pkg.m4(7)

Referenced By

caca-config(1), commoncpp-config(1), csharp(1), cups-config(1), file-hierarchy(7), flickcurl-config(1), freetype-config(1), gimptool-2.0(1), ibv_get_device_list(3), libbsd(7), libIDL-config-2(1), libmd(7), libnbd(3), libnet(3), libsystemd(3), libudev(3), lowdown(3), mcs(1), nbdkit-probing(1), notcurses(3), nspr-config(1), nss-config(1), pc(5), pkgconf-personality(5), sd_booted(3), sd-bus(3), sd_bus_add_match(3), sd_bus_add_node_enumerator(3), sd_bus_add_object(3), sd_bus_add_object_manager(3), sd_bus_attach_event(3), sd_bus_call(3), sd_bus_call_method(3), sd_bus_can_send(3), sd_bus_close(3), sd_bus_creds_get_pid(3), sd_bus_creds_new_from_pid(3), sd_bus_default(3), sd_bus_emit_signal(3), sd_bus_enqueue_for_read(3), sd_bus_error(3), sd_bus_error_add_map(3), sd-bus-errors(3), sd_bus_get_current_handler(3), sd_bus_get_fd(3), sd_bus_get_name_creds(3), sd_bus_get_name_machine_id(3), sd_bus_interface_name_is_valid(3), sd_bus_is_open(3), sd_bus_list_names(3), sd_bus_message_append(3), sd_bus_message_append_array(3), sd_bus_message_append_basic(3), sd_bus_message_append_string_memfd(3), sd_bus_message_append_strv(3), sd_bus_message_at_end(3), sd_bus_message_copy(3), sd_bus_message_dump(3), sd_bus_message_get_cookie(3), sd_bus_message_get_monotonic_usec(3), sd_bus_message_get_signature(3), sd_bus_message_get_type(3), sd_bus_message_new(3), sd_bus_message_new_method_call(3), sd_bus_message_new_method_error(3), sd_bus_message_new_signal(3), sd_bus_message_open_container(3), sd_bus_message_read(3), sd_bus_message_rewind(3), sd_bus_message_seal(3), sd_bus_message_sensitive(3), sd_bus_message_set_destination(3), sd_bus_message_set_expect_reply(3), sd_bus_message_skip(3), sd_bus_message_verify_type(3), sd_bus_negotiate_fds(3), sd_bus_new(3), sd_bus_path_encode(3), sd_bus_process(3), sd_bus_query_sender_creds(3), sd_bus_reply_method_error(3), sd_bus_reply_method_return(3), sd_bus_request_name(3), sd_bus_send(3), sd_bus_set_address(3), sd_bus_set_close_on_exit(3), sd_bus_set_connected_signal(3), sd_bus_set_description(3), sd_bus_set_exit_on_disconnect(3), sd_bus_set_fd(3), sd_bus_set_method_call_timeout(3), sd_bus_set_property(3), sd_bus_set_sender(3), sd_bus_set_server(3), sd_bus_set_watch_bind(3), sd_bus_slot_get_bus(3), sd_bus_slot_ref(3), sd_bus_slot_set_description(3), sd_bus_slot_set_destroy_callback(3), sd_bus_slot_set_floating(3), sd_bus_slot_set_userdata(3), sd_bus_start(3), sd_bus_track_add_name(3), sd_bus_track_new(3), sd_bus_wait(3), sd-daemon(3), sd-device(3), sd_device_get_syspath(3), sd-event(3), sd_event_add_child(3), sd_event_add_defer(3), sd_event_add_inotify(3), sd_event_add_io(3), sd_event_add_memory_pressure(3), sd_event_add_signal(3), sd_event_add_time(3), sd_event_exit(3), sd_event_get_fd(3), sd_event_new(3), sd_event_now(3), sd_event_run(3), sd_event_set_signal_exit(3), sd_event_set_watchdog(3), sd_event_source_get_event(3), sd_event_source_get_pending(3), sd_event_source_set_description(3), sd_event_source_set_destroy_callback(3), sd_event_source_set_enabled(3), sd_event_source_set_exit_on_failure(3), sd_event_source_set_floating(3), sd_event_source_set_prepare(3), sd_event_source_set_priority(3), sd_event_source_set_ratelimit(3), sd_event_source_set_userdata(3), sd_event_source_unref(3), sd_event_wait(3), sd_get_seats(3), sd-hwdb(3), sd_hwdb_get(3), sd_hwdb_new(3), sd-id128(3), sd_id128_get_machine(3), sd_id128_randomize(3), sd_id128_to_string(3), sd_is_fifo(3), sd-journal(3), sd_journal_add_match(3), sd_journal_enumerate_fields(3), sd_journal_get_catalog(3), sd_journal_get_cursor(3), sd_journal_get_cutoff_realtime_usec(3), sd_journal_get_data(3), sd_journal_get_fd(3), sd_journal_get_realtime_usec(3), sd_journal_get_seqnum(3), sd_journal_get_usage(3), sd_journal_has_runtime_files(3), sd_journal_next(3), sd_journal_open(3), sd_journal_print(3), sd_journal_query_unique(3), sd_journal_seek_head(3), sd_journal_stream_fd(3), sd_listen_fds(3), sd-login(3), sd_login_monitor_new(3), sd_machine_get_class(3), sd_notify(3), sd_path_lookup(3), sd_pid_get_owner_uid(3), sd_seat_get_active(3), sd_session_is_active(3), sd_uid_get_state(3), sd_watchdog_enabled(3), setup-nsssysinit(1), systemd(1), ucommon-config(1), varnishtest(1).

The man page pkg-config(1) is an alias of pkgconf(1).

November 15, 2016