Skip to content

Commit

Permalink
Add Pthreads (and possibly other) flags to the pkg-config file (#332)
Browse files Browse the repository at this point in the history
Proper Libs.private enables linking applications statically against
libqb: static archives (.a) don't carry their own dependency
information, unlike shared libraries (.so).  Modern libc versions
include socket and RT functions, so socket_LIBS and rt_LIBS will be
empty there, but we include them for strict correctness on older
platforms; basically, we're matching libqb_la_LIBADD here.
Consequently, nsl_LIBS and GLIB_LIBS don't enter this field, since they
are only used in the examples and tests, not in the library proper.

Cflags, on the other hand, is emitted all the time and (under GCC)
propagates the -pthread option (which also affects the preprocessing
stage) to all users of libqb even when compiling modules or linking
everything dynamically.

Signed-off-by: Ferenc Wágner <[email protected]>
  • Loading branch information
wferi authored and chrissie-c committed Dec 13, 2018
1 parent 60887f4 commit f67b428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/libqb.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Version: @PACKAGE_VERSION@
Description: libqb
Requires:
Libs: -L${libdir} -lqb
Libs.private: @LIBS@ @SYSTEMD_LIBS@
Cflags: -I${includedir}
Libs.private: @LIBS@ @dlopen_LIBS@ @PTHREAD_LIBS@ @socket_LIBS@ @rt_LIBS@ @SYSTEMD_LIBS@
Cflags: -I${includedir} @PTHREAD_CFLAGS@

0 comments on commit f67b428

Please sign in to comment.