Skip to content

Commit 994c447

Browse files
author
Christian Hergert
committed
build: add libmongoc-ssl-1.0.pc
This allows consumers to check for the presence of libmongoc, but require SSL support. The libraries are in fact the same, but libmongoc-ssl-1.0 will only be present if the library was compiled with SSL support. If using autoconf, you can check with: PKG_CHECK_MODULES(MONGOC, [libmongoc-ssl-1.0]) Fixes CDRIVER-260.
1 parent 5c62d97 commit 994c447

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ mongocdoc_DATA += README
2424
pkgconfigdir = $(libdir)/pkgconfig
2525
pkgconfig_DATA =
2626
pkgconfig_DATA += $(top_builddir)/mongoc/libmongoc-1.0.pc
27+
if HAVE_SSL
28+
pkgconfig_DATA += $(top_builddir)/mongoc/libmongoc-ssl-1.0.pc
29+
endif
2730

2831
EXTRA_DIST += $(mongocdoc_DATA)
2932

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ dnl **************************************************************************
267267
AC_CONFIG_FILES([
268268
Makefile
269269
mongoc/libmongoc-1.0.pc
270+
mongoc/libmongoc-ssl-1.0.pc
270271
mongoc/mongoc-config.h
271272
mongoc/mongoc-version.h
272273
])

mongoc/libmongoc-ssl-1.0.pc.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
prefix=@prefix@
2+
exec_prefix=${prefix}
3+
libdir=@libdir@
4+
includedir=${exec_prefix}/include
5+
6+
Name: libmongoc-@MONGOC_API_VERSION@
7+
Description: SSL support for the libmongoc-@MONGOC_API_VERSION@ library.
8+
Version: @VERSION@
9+
Requires: libmongoc-1.0
10+
Libs:
11+
Cflags:

0 commit comments

Comments
 (0)