>Synopsis: pkg-config --cflags --libs prints libs for Requires.private
>Category: user
>Environment:
System : OpenBSD 7.3
Details : OpenBSD 7.3-current (GENERIC.MP) #1200: Tue May 23
15:22:30 MDT 2023
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
The pkg-config script is supposed to:
- print the cflags of $pkg, its Requires, and its
Requires.private iff --cflags is given
- print the libs of $pkg and its Requires if --libs is
given
- print the libs of $pkgâs Requires.private if --libs
and --static are given
What it does is: If --libs and --cflags are given, the
cflags and libs of $pkg, its Requires, and
its Requires.private are printed; i.e., --cflags causes
it to print the libs for static linking.
>How-To-Repeat:
$ pkg-config --cflags egl
-I/usr/X11R6/include -I/usr/X11R6/include/libdrm
$ pkg-config --libs egl
-L/usr/X11R6/lib -lEGL
$ pkg-config --cflags --libs egl
-I/usr/X11R6/include -I/usr/X11R6/include/libdrm -L/usr/X11R6/lib -lEGL
-lXfixes -lX11-xcb -lxcb-glx -lxcb-dri2 -lXxf86vm -lXext -lX11 -lxcb -lXau
-lXdmcp -ldrm