---
name: "pthread-config"
section: "1"
platform: "linux"
package: "libpth-dev"
version: "1.2.3-2.1"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/pthread-config"
---

# pthread-config(1)

Pth pthread library build utility

## NAME

**pthread-config** - Pth pthread library build utility

## VERSION

GNU Pth 1.2.3 (04-Feb-2000)

## SYNOPSIS

**pthread-config**  \[**--help**\] \[**--version**\] \[**--cflags**\] \[**--ldflags**\] \[**--libs**\]

## DESCRIPTION

The **pthread-config** program is a little helper utility for easy configuring and building applications based on the pthread emulation API of the GNU Portable Threads (pth) library.  It can be used to query the C compiler and linker flags which are required to correctly compile and link the application against the [*pth*(3)](/pth/3.md) library.

## OPTIONS

**pthread-config** accepts the following options:\

- **--help**

  Prints the short usage information.\

- **--version**

  Prints the version number and date of the installed [*pth*(3)](/pth/3.md) library.\

- **--cflags**

  Prints the C compiler flags which are needed to compile the [*pth*(3)](/pth/3.md)-based application. The output is usually added to the `CFLAGS` variable of the applications `Makefile`.\

- **--ldflags**

  Prints the linker flags (`-L`) which are needed to link the application with the [*pth*(3)](/pth/3.md) library. The output is usually added to the `LDFLAGS` variable of the applications `Makefile`.\

- **--libs**

  Prints the library flags (`-l`) which are needed to link the application with the [*pth*(3)](/pth/3.md) library. The output is usually added to the `LIBS` variable of the applications `Makefile`.

## EXAMPLE

```
 CC=cc
 CFLAGS=-O `pthread-config --cflags`
 LDFLAGS=`pthread-config --ldflags`
 LIBS=-lm `pthread-config --libs`

 all: foo
 foo: foo.o
     $(CC) $(LDFLAGS) -o foo foo.o $(LIBS)
 foo.o: foo.c
     $(CC) $(CFLAGS) -c foo.c
```

## SEE ALSO

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

## AUTHOR

```
 Ralf S. Engelschall
 rse@engelschall.com
 www.engelschall.com
```
