45
45
46
46
VERSION = 1.2.0 ;
47
47
48
- # rule for linking the correct libraries depending
49
- # on features and target-os
50
- rule link-openssl ( properties * )
51
- {
52
- local result ;
53
-
54
- # openssl libraries, if enabled
55
- # exclude gcc from a regular windows build to make mingw
56
- # link against the regular unix library name
57
- if <openssl-version>pre1.1 in $(properties)
58
- && <target-os>windows in $(properties)
59
- && ! <toolset>gcc in $(properties)
60
- {
61
- result += <library>ssleay32 <library>libeay32 ;
62
- }
63
- else
64
- {
65
- # on windows the library names were changed to be in line with other
66
- # system starting with OpenSSL 1.1
67
- result += <library>crypto <library>ssl ;
68
- }
69
-
70
- if <crypto>libcrypto in $(properties)
71
- {
72
- # exclude gcc from a regular windows build to make mingw
73
- # link against the regular unix library name
74
- if <openssl-version>pre1.1 in $(properties)
75
- && <target-os>windows in $(properties)
76
- && ! <toolset>gcc in $(properties)
77
- {
78
- # it should be possible to cleanup this list, but this is safe for now
79
- result += <library>libeay32 ;
80
- }
81
- else
82
- {
83
- result += <library>crypto ;
84
- }
85
- }
86
-
87
- # windows needs some more libraries when using openSSL
88
- if <target-os>windows in $(properties)
89
- && ! <toolset>gcc in $(properties)
90
- {
91
- result += <library>advapi32
92
- <library>user32
93
- <library>shell32
94
- <library>gdi32
95
- ;
96
- }
97
- echo "link openssl = " $(result) ;
98
- return $(result) ;
99
- }
100
-
101
48
rule linking ( properties * )
102
49
{
103
50
local result ;
@@ -419,7 +366,6 @@ rule openssl-lib-path ( properties * )
419
366
420
367
local result ;
421
368
result += <search>$(OPENSSL_LIB) ;
422
- echo "openssl-lib-path = " $(result) ;
423
369
return $(result) ;
424
370
}
425
371
@@ -454,7 +400,6 @@ rule openssl-include-path ( properties * )
454
400
455
401
local result ;
456
402
result += <include>$(OPENSSL_INCLUDE) ;
457
- echo "openssl-include-path = " $(result) ;
458
403
return $(result) ;
459
404
}
460
405
@@ -588,16 +533,51 @@ variant test_arm : debug
588
533
<export-extra>on <asserts>on
589
534
;
590
535
591
- lib crypto : : <name>crypto <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
592
- lib ssl : : <name>ssl <use>crypto <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
593
-
594
- # required for openssl on windows
595
- lib ssleay32 : : <name>ssleay32 <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
596
- lib libeay32 : : <name>libeay32 <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
597
536
lib advapi32 : : <name>advapi32 ;
598
537
lib user32 : : <name>user32 ;
599
538
lib shell32 : : <name>shell32 ;
600
539
lib gdi32 : : <name>gdi32 ;
540
+ lib z : : <link>shared <name>z ;
541
+
542
+ # windows variants for libssl and libcrypto (they have different names and some
543
+ # additional dependencies)
544
+ lib crypto
545
+ : # sources
546
+ : # requirements
547
+ <target-os>windows
548
+ <openssl-version>pre1.1
549
+ <name>libeay32
550
+ <conditional>@openssl-lib-path
551
+ : # default-build
552
+ : # usage-requirements
553
+ <conditional>@openssl-include-path
554
+ <library>advapi32
555
+ <library>user32
556
+ <library>shell32
557
+ <library>gdi32
558
+ ;
559
+
560
+ lib ssl
561
+ : # sources
562
+ : # requirements
563
+ <target-os>windows
564
+ <openssl-version>pre1.1
565
+ <name>ssleay32
566
+ <use>crypto
567
+ <conditional>@openssl-lib-path
568
+ : # default-build
569
+ : # usage-requirments
570
+ <conditional>@openssl-include-path
571
+ <library>advapi32
572
+ <library>user32
573
+ <library>shell32
574
+ <library>gdi32
575
+ ;
576
+
577
+
578
+ lib crypto : : <name>crypto <use>z <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
579
+ lib ssl : : <name>ssl <use>crypto <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
580
+
601
581
lib dbghelp : : <name>dbghelp ;
602
582
603
583
# required for networking on beos
@@ -609,8 +589,7 @@ lib libiconv : : <name>iconv <link>shared <search>/usr/local/lib ;
609
589
610
590
# openssl on linux/bsd etc.
611
591
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
612
-
613
- alias openssl-libraries : : : : <conditional>@link-openssl ;
592
+ lib dl : : <link>shared <name>dl ;
614
593
615
594
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib <link>shared ;
616
595
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib <link>shared ;
@@ -825,8 +804,9 @@ lib torrent
825
804
<link>shared:<define>TORRENT_BUILDING_SHARED
826
805
<define>BOOST_NO_DEPRECATED
827
806
<link>shared:<define>BOOST_SYSTEM_SOURCE
828
- <crypto>openssl:<library>openssl-libraries
829
- <crypto>libcrypto:<library>openssl-libraries
807
+ <crypto>openssl:<library>ssl
808
+ <crypto>openssl:<library>crypto
809
+ <crypto>libcrypto:<library>crypto
830
810
831
811
<dht>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
832
812
<dht>on:<source>ed25519/src/$(ED25519_SOURCES).cpp
0 commit comments