[PATCH] Make crypto support configurable through make variables
Hi, Currently, if one wants to build librtmp without crypto support, one has to edit rtmp.h to remove the CRYPTO definition and then edit the makefile to remove the reference to hashswf.o. With the attached patch, a user can simply do make CRYPTO=no to compile without crypto support, without having to edit the checked out files. // Martin
Martin Storsjö wrote:
Hi,
Currently, if one wants to build librtmp without crypto support, one has to edit rtmp.h to remove the CRYPTO definition and then edit the makefile to remove the reference to hashswf.o. With the attached patch, a user can simply do
make CRYPTO=no
to compile without crypto support, without having to edit the checked out files.
You used Gmake-specific syntax in your patch, I've committed a generic solution instead. Just use "make CRYPTO=" to turn off crypto support. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
On Wed, 7 Apr 2010, Howard Chu wrote:
Martin Storsjö wrote:
Hi,
Currently, if one wants to build librtmp without crypto support, one has to edit rtmp.h to remove the CRYPTO definition and then edit the makefile to remove the reference to hashswf.o. With the attached patch, a user can simply do
make CRYPTO=no
to compile without crypto support, without having to edit the checked out files.
You used Gmake-specific syntax in your patch, I've committed a generic solution instead. Just use "make CRYPTO=" to turn off crypto support.
Thanks, that looks very good! // Martin
Martin Storsjö wrote:
On Wed, 7 Apr 2010, Howard Chu wrote:
Martin Storsjö wrote:
Hi,
Currently, if one wants to build librtmp without crypto support, one has to edit rtmp.h to remove the CRYPTO definition and then edit the makefile to remove the reference to hashswf.o. With the attached patch, a user can simply do
make CRYPTO=no
to compile without crypto support, without having to edit the checked out files.
You used Gmake-specific syntax in your patch, I've committed a generic solution instead. Just use "make CRYPTO=" to turn off crypto support.
Thanks, that looks very good!
This patch is still problematic. Removing CRYPTO from rtmp.h makes it impossible for an app using librtmp to determine whether CRYPTO support is present or not. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
On Wed, 7 Apr 2010, Howard Chu wrote:
This patch is still problematic. Removing CRYPTO from rtmp.h makes it impossible for an app using librtmp to determine whether CRYPTO support is present or not.
Yes, that's true... Is the issue ok with the latest commits you made? Apps using the lib still won't know if crypto support is available, but I guess the lib simply fails cleanly if it tries to do something that would succeed otherwise? I guess this isn't an issue in the cases where the user explicitly has chosen not to include support for that. // Martin
Martin Storsjö wrote:
On Wed, 7 Apr 2010, Howard Chu wrote:
This patch is still problematic. Removing CRYPTO from rtmp.h makes it impossible for an app using librtmp to determine whether CRYPTO support is present or not.
Yes, that's true... Is the issue ok with the latest commits you made? Apps using the lib still won't know if crypto support is available, but I guess the lib simply fails cleanly if it tries to do something that would succeed otherwise? I guess this isn't an issue in the cases where the user explicitly has chosen not to include support for that.
rtmpdump, rtmpgw, and rtmpsuck need to be rewritten to avoid the question. rtmpdump and rtmpgw need to be rewritten to use the new option parser anyway though... Right now I'm faced with the question of how to maintain backward compatibility for the command line, without adding a bunch of redundant code. (I hate bloat.) The easiest thing of course would be to rip out all of the old option handling and drop backward compatibility. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
participants (2)
-
Howard Chu -
Martin Storsjö