man roy-config (Commandes) - 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) 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) required to link a program that uses roy.

--cflags Print the includes arguments for cc(1) 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:

CW$ roy-config --libs --cflags

Will output:

CW-I/usr/local/include CW-L/usr/local/lib -lroy

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

EXAMPLES

CWcc `roy-config --libs --cflags` foo.c -o foo

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

CWcc `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:

CWcc `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). 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) options returned by roy-config --cflags

ROY_LIBS The list of cc(1) options returned by roy-config --libs

SEE ALSO

roy(3)