---
name: "roy-config"
section: "1"
platform: "linux"
package: "libroy-dev"
version: "1.0.8-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/roy-config"
---

# roy-config(1)

A configuration tool for roy.

## NAME

roy-config - A configuration tool for roy.

## SYNOPSIS

Usage: roy-config --prefix\
        roy-config --version\
        roy-config \[--libs\] \[--cflags\]

## DESCRIPTION

[*roy-config*(1)](/roy-config/1.md) is a shell script that is built when roy is compiled. It is used to determine the location of the installation, and the include and link lines necessary to compile programs that use roy.

The following options are available:

\--prefix    Print the prefix where roy was installed.

\--version   Print the version of roy installed.

\--libs      Print the library arguments for [*cc*(1)](/cc/1.md) \
             required to link a program that uses roy.

\--cflags    Print the includes arguments for [*cc*(1)](/cc/1.md)\
             required to compile a program that \
             includes roy header files.

The arguments --libs and --cflags may be specified at the same time.

With a default install, the following command:

`"$ roy-config --libs --cflags"`

Will output:

`"-I/usr/local/include"` `"-L/usr/local/lib -lroy"`

This output can then be used on the [*cc*(1)](/cc/1.md) command line in various forms to  build roy applications, regardless of the installation location of roy.

## EXAMPLES

``"cc `roy-config --libs --cflags` foo.c -o foo"``

The above will compile foo.c into binary foo, linking with libroy.

``"cc `roy-config --cflags` -c foo.c"``

Will create an object file of foo.o for later linking.  The roy-config will supply the necessary header search path to find all headers necessary for roy and associated libraries.

You could then link it using:

``"cc `roy-config --libs` foo.o -o foo"``

Note that the quotes used above are backquotes (usually found above the tab key), and not single forward quotes, or double quotes. The backquotes make the shell execute the command, and substitute its output on the command line.

## AUTOMAKE INTEGRATION

Roy provides an autoconf macro, AM\_PATH\_ROY, that handles the necessary calls to [*roy-config*(1)](/roy-config/1.md).  This macro is provided to make it easy to use Roy with the GNU build tools.  It is placed in the configure.{in,ac} file, and accepts the following arguments:

MINIMUM-VERSION      The earliest version of Roy\
                      acceptable to compile and link\
                      against.  If not specified,\
                      require at least version 1.0.2,\
                      the first version containing \
                      the AM\_PATH\_ROY macro.

ACTION-IF-FOUND      Shell code to execute if a Roy\
                      of sufficient version is found.\
                      Defaults to no action.

ACTION-IF-NOT-FOUND  Shell code to execute if a Roy\
                      of sufficient version is not\
                      found.  Defaults to no action.

Additionally, AM\_PATH\_ROY defines the following substitutions, suitable for inclusion in Makefile.ams and other configure-generated files:

ROY\_CFLAGS   The list of [*cc*(1)](/cc/1.md) options returned by\
              roy-config --cflags

ROY\_LIBS     The list of [*cc*(1)](/cc/1.md) options returned by\
              roy-config --libs

## SEE ALSO

[*roy*(3)](/roy/3.md)
