]> granicus.if.org Git - rtmpdump/commitdiff
Include -lgmp in the pkg-config file when building with gnutls
authorMartin Storsjo <martin@martin.st>
Mon, 23 Sep 2013 19:45:29 +0000 (22:45 +0300)
committerMartin Storsjo <martin@martin.st>
Mon, 23 Sep 2013 19:49:58 +0000 (22:49 +0300)
This is required when a user of librtmp is linking statically to
librtmp (when it is built with gnutls support).

Ideally everything of the Requires line should be in
Requires.private, and -lgmp would go into Libs.private - but if
only building a static lib, they should go where they are right
now instead. Keeping all of this where it is right now, for now,
for simplicity.

librtmp/Makefile
librtmp/librtmp.pc.in

index 8e7c8a1b410e3c69fa00ea7736a89e6b082c826f..3f26d075028cbf0c79b21de6fdb3755e0319c6e3 100644 (file)
@@ -24,6 +24,7 @@ DEF_GNUTLS=-DUSE_GNUTLS
 DEF_=-DNO_CRYPTO
 REQ_GNUTLS=gnutls,hogweed,nettle
 REQ_OPENSSL=libssl,libcrypto
+PUB_GNUTLS=-lgmp
 LIBZ=-lz
 LIBS_posix=
 LIBS_darwin=
@@ -35,6 +36,7 @@ PRIVATE_LIBS=$(LIBS_$(SYS))
 CRYPTO_LIB=$(LIB_$(CRYPTO)) $(PRIVATE_LIBS)
 CRYPTO_REQ=$(REQ_$(CRYPTO))
 CRYPTO_DEF=$(DEF_$(CRYPTO))
+PUBLIC_LIBS=$(PUB_$(CRYPTO))
 
 SO_VERSION=0
 SOX_posix=so
@@ -100,6 +102,7 @@ librtmp.pc: librtmp.pc.in Makefile
        sed -e "s;@prefix@;$(prefix);" -e "s;@libdir@;$(libdir);" \
                -e "s;@VERSION@;$(VERSION);" \
                -e "s;@CRYPTO_REQ@;$(CRYPTO_REQ);" \
+               -e "s;@PUBLIC_LIBS@;$(PUBLIC_LIBS);" \
                -e "s;@PRIVATE_LIBS@;$(PRIVATE_LIBS);" librtmp.pc.in > $@
 
 install:       install_base $(SO_INST)
index a82beca4edbd476b7cd47bb5933d0f1edafc53c7..551b4d96be28aef3a2f3f71694ab03a345014d3e 100644 (file)
@@ -8,6 +8,6 @@ Description: RTMP implementation
 Version: @VERSION@
 Requires: @CRYPTO_REQ@
 URL: http://rtmpdump.mplayerhq.hu
-Libs: -L${libdir} -lrtmp -lz
+Libs: -L${libdir} -lrtmp -lz @PUBLIC_LIBS@
 Libs.private: @PRIVATE_LIBS@
 Cflags: -I${incdir}