On 12/02/2013 01:05 PM, Pádraig Brady wrote: > each project would have > to add LIB_CRYPTO_MD5 etc. to their list of libs similarly > to the coreutils patch I had inline in my previous mail.
Thanks for explaining. I tried that for Emacs and came up with the patch appended to this message. Unfortunately, it means that Emacs is now linked with a command of this form: gcc $(objects) ... -lcrypto -lcrypto -lcrypto -lcrypto ... because Emacs calls md5, sha1, sha256 and sha512 and there's a separate LIB_CRYPTO_XXX for each algorithm. This works, but it's a bit ugly. How about adding support for LIB_CRYPTO, so that there's only one -lcrypto in the above line? LIB_CRYPTO can be the concatenation of tall the LIB_CRYPTO_XXXs with duplicates removed. That would simplify the following patch, since I'd need to add just LIB_CRYPTO. Perhaps we could even dispense with the LIB_CRYPTO_XXX macros for now; they shouldn't be needed unless we know of an O.S. where they differ from each other. === modified file 'src/Makefile.in' --- src/Makefile.in 2013-11-27 18:25:44 +0000 +++ src/Makefile.in 2013-12-02 22:26:31 +0000 @@ -139,6 +139,10 @@ LIB_ACL=@LIB_ACL@ LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ +LIB_CRYPTO_MD5=@LIB_CRYPTO_MD5@ +LIB_CRYPTO_SHA1=@LIB_CRYPTO_SHA1@ +LIB_CRYPTO_SHA256=@LIB_CRYPTO_SHA256@ +LIB_CRYPTO_SHA512=@LIB_CRYPTO_SHA512@ LIB_EACCESS=@LIB_EACCESS@ LIB_FDATASYNC=@LIB_FDATASYNC@ LIB_TIMER_TIME=@LIB_TIMER_TIME@ @@ -403,6 +407,8 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(LIBX_OTHER) $(LIBSOUND) \ $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ + $(LIB_CRYPTO_MD5) $(LIB_CRYPTO_SHA1) \ + $(LIB_CRYPTO_SHA256) $(LIB_CRYPTO_SHA512) \ $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) \ $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \